Тёмный

Pixi.js Tutorial For Complete Beginners - Create 2D Games & All Sorts Of Interactive Content With JS 

Wael Yasmina
Подписаться 18 тыс.
Просмотров 93 тыс.
50% 1

Опубликовано:

 

15 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 139   
@WaelYasmina
@WaelYasmina 3 месяца назад
Pixi.js v8 Videos ru-vid.com/group/PLjcjAqAnHd1ELH6j5RZaT2Ilvwj1sMCi6 Article waelyasmina.net/articles/pixi-js-tutorial-for-complete-beginners/
@nikolajankovic3073
@nikolajankovic3073 2 года назад
Recently I applied for a job and they asked me to develop a game using Pixi JS. In that moment I didn't even know what Pixi JS is but I managed to develop that game because of this tutorial and got my first job as developer. Thank you!
@WaelYasmina
@WaelYasmina 2 года назад
Congratulations! I'm so glad to hear that!!
@dvz131
@dvz131 2 года назад
I wish I had seen the video when I had my test
@gorankukic777
@gorankukic777 Год назад
Nikola, kako se zove firma u kojoj si dobio posao? Sutra krećem da radim u novoj firmi sa Pixi-jem :)
@redisotschek8643
@redisotschek8643 Год назад
Hi there! So glad for you❤ Any open positions?🫣
@ΙΩΑΝΝΗΣΤΖΙΑΚΑΣ
@ΙΩΑΝΝΗΣΤΖΙΑΚΑΣ 3 года назад
Now i can believe on humanity, some with real knowlegde give it to us with the most simple way.Very good explanation!
@WaelYasmina
@WaelYasmina 3 года назад
This comment made my day! I really appreciate your kind words, thank you very much!
@II-is4ft
@II-is4ft Год назад
Thank you - it’s the best game dev introduction that I ever seen
@timotheeastier249
@timotheeastier249 Год назад
This was amazingly well made and clear. Thank you!
@CodeSmart_
@CodeSmart_ Год назад
i'm so thankfull that i found your chanel!!! EXCELENT CONTENT ☺☺♥
@snakemanluffy7645
@snakemanluffy7645 3 года назад
Thank you for such an amazing tutorial. I've watched the whole video while also coding but I didn't quite get some of the object's properties/methods around my head but I guess it's because it's my first time trying something like this. feels amazing. I have to explore & practice.
@WaelYasmina
@WaelYasmina 3 года назад
Thank you very much! Don't worry, just a bit of practice and you'll be fine. Everything has a learning curve.
@nelsinosouza8387
@nelsinosouza8387 2 года назад
Thank you for the effort to build this tutorial, now I feel prepared to explore the official pixiJS documentation!
@WaelYasmina
@WaelYasmina 2 года назад
Nice! Thank you for your kind words.
@theoryofeverything2150
@theoryofeverything2150 2 года назад
This is the best pixijs tutorial that I’ve had. Thank you so much. Please do a Udemy pixijs lesson or any other pixijs video compilation and I’ll buy.
@WaelYasmina
@WaelYasmina 2 года назад
You just made my day with such kind comment, thank you very much! I really appreciate it!
@danielmarcano752
@danielmarcano752 11 месяцев назад
Amazing video! Quite a lot of knowledge, but you have made it very easy to follow along.
@amventures1
@amventures1 Год назад
Thank you. Looking forward for extended tutorial (or better project example) on PixiJS
@SomeIrishLad
@SomeIrishLad 7 месяцев назад
This video is great. The documentation is a bit overwhelming when you are completely new to PixiJS.
@n1kb0t
@n1kb0t Год назад
Thanks, very interesting. Such a good explanation, even a beginner can understand.
@smyrnian_
@smyrnian_ Год назад
Awesome demo, thank you!
@mycloudvip
@mycloudvip 8 месяцев назад
Awesome content! How do you use this library for production? do you have a tutorial on that? Thanks!
@sSJunSs
@sSJunSs 3 года назад
Thank you from Korea so wonderful tutorial
@WaelYasmina
@WaelYasmina 3 года назад
I love Korea! Thanks 😊
@elvinasss2767
@elvinasss2767 3 года назад
I'm already halfway this video and I can tell that is a HIGH quality tutorial that I wouldn't mind to pay for!. Thank you :)
@WaelYasmina
@WaelYasmina 3 года назад
That's so kind of you, thank you very much!
@gebbygebbers
@gebbygebbers 3 года назад
Your teaching style is so great, it reminds me of my old vocational high school days! Thank you so much ❤
@WaelYasmina
@WaelYasmina 3 года назад
Thank you, glad you think so!
@botanicspark
@botanicspark Год назад
Great and clear tutorial. Thank you!
@goswamianshuman
@goswamianshuman 2 года назад
its very amazing that you are teaching this perfectly this component of js , very appreiciating !!!
@WaelYasmina
@WaelYasmina 2 года назад
Thank you very much!
@alekseiperedurowain7730
@alekseiperedurowain7730 Год назад
Did anyone else get to 27:00 and gut stuck on the line `const loader = PIXI.Loader.shared` ? With errors suggesting that Loader is not defined? I'm big confuse : everything else worked fine for me in this tutorial up to that point.
@spixels6880
@spixels6880 Год назад
Same...
@h3avyl
@h3avyl Год назад
Same problem here : const loader = PIXI.Loader.shared gave me a very frustrating error...
@miki-g4q
@miki-g4q Год назад
sorry. I cannot use english well. but i think you must change pixi.js version. In PixiJS 7, PIXI.Loader.shared is deprecated. So, if you change the version to 6 as shown in this video, the error will disappear. I hope this helps you solve the issue.
@vishnubhaskaran2521
@vishnubhaskaran2521 10 месяцев назад
Thanks for the tutorial mate, it is super helpful
@timofeybabisashvili7077
@timofeybabisashvili7077 5 месяцев назад
Awesome! Great video! Huge thanks
3 года назад
I think it would be my new favorite channel
@WaelYasmina
@WaelYasmina 3 года назад
That's nice to hear! thank you!
@kirilkorukov1031
@kirilkorukov1031 8 месяцев назад
thank you brother for this tutorial, really good job
@swarupkesarkar2783
@swarupkesarkar2783 3 года назад
Most underrated channel ever. Best tutorial available for the language. Thanks!
@WaelYasmina
@WaelYasmina 3 года назад
I appreciate your kind words, thank you!
@nandoaires
@nandoaires 3 года назад
I hate you because you just made me want to play Phantasy Star 4 again while I'm working. (Just kidding, loved the tutorial and the references! :) )
@WaelYasmina
@WaelYasmina 3 года назад
Haha man I LOVE that game! I have finished it multiple times on MegaDrive back in the day and I still play it on online emulators from time to time. Thank you!
@ruckboger
@ruckboger 2 года назад
Good stuff! I used the steps on the Webpack startup page so that I can use standard Node syntax and have a local environment with a dev server so I can use localhost:3000.
@WaelYasmina
@WaelYasmina 2 года назад
Thanks! Generally speaking, I highly recommend learning and using a bundler like Weback or Parcel even for people who are new to the world of web development. However, in this case where I assume you don't know how to use one so you had to go learn one then come back to learn Pixi. It would be easier if you just installed the LiveServer extension that I used in the tutorial so that you focus on one only thing. Anyways, you did what it seemed right for you and it worked fine so that's a win I guess.
@felipe_crea
@felipe_crea 3 года назад
Excelente tutorial, muchas gracias, tienes una gran "pedagogía"
@WaelYasmina
@WaelYasmina 3 года назад
Thank you! I really appreciate your positive feedback.
@namaefumei
@namaefumei Год назад
this really helped a lot! please do more!
@Nerdle
@Nerdle 2 года назад
Thank you for this tutorial! You've gained a new subscriber.
@WaelYasmina
@WaelYasmina 2 года назад
That's so kind of you! Thank you
@slambingo_
@slambingo_ 5 месяцев назад
2:10 If this doesn't work for somebody, try this: Start(); async function Start() { const app = new PIXI.Application(); await app.init({ width: 640, height: 360 }); document.body.appendChild(app.canvas); }
@iliqnew
@iliqnew Год назад
Yes. Great job! Thanks!
@SrrePro
@SrrePro 6 месяцев назад
Great job!!!
@manaswini713
@manaswini713 4 месяца назад
nice tutorial thanks man
@FVVictor
@FVVictor 2 года назад
Thanks a lot! Greetings from Brazil :)
@WaelYasmina
@WaelYasmina 2 года назад
You're welcome! I ❤️ Brazil
@michaelmarocchi3503
@michaelmarocchi3503 7 месяцев назад
ok, i finished your video and i wanna tell you THANK YOU. The only "bad thing" i found, is that "loader" didn't work, so in the last minutes, i'm not strong enough to let the dragon "fly". Also the music gave me problem after i installed howler. It did not sound at all on me :( maybe my foult but nothing found in console about it :S
@monsieurbouclier7341
@monsieurbouclier7341 2 года назад
Very good tutorial, thank you for all your work on it.
@WaelYasmina
@WaelYasmina 2 года назад
I appreciate your kind words. Thank you!
@custardcream2226
@custardcream2226 2 года назад
Awesome video, great pace, thanks! )
@WaelYasmina
@WaelYasmina 2 года назад
You're welcome!
@shivamjha2625
@shivamjha2625 2 года назад
Great video, much thanks
@naidenovt
@naidenovt Год назад
Awesome tutorial man! Can you help me with one task they gave me for the job interview ? Will be much appreciated!
@jugibur2117
@jugibur2117 Год назад
First thanks for your effort! PIXI seems more intuitive for me as Phaser. But a Question at 32:98 : I honestly don't understand that behavior. Yes, it points to the same texture object, but you have set a different rectangle. So I assumed it just copied this other part from the texture bitmap. Intuitively, it seems inefficient to me in this way to load a whole new instance of a texture of the *same* bitmap into memory.
@prnvrna
@prnvrna Год назад
Thank you!
@joaocesarlima7339
@joaocesarlima7339 3 года назад
Excellent tutorial! Thanks a lot!
@WaelYasmina
@WaelYasmina 3 года назад
You are welcome!
@helguuhucu
@helguuhucu 11 месяцев назад
Hi! First of all, thank you for this tutorial. It really introduces the basics of Pixi JS and prepares us for doing more. However, I have come across a few problems. I wonder if it occured to others to and I am hoping I can find some solutions. 1. The loader.shared class/function is not working for me, no matter what I try. It says cannot read properties of undefined (reading 'shared') pixijs 2. The graphics extra pack was not working either, and I proceeded as in the video. The star and the other thing would not appear and no error was given either.
@TurtleKun
@TurtleKun 10 месяцев назад
I was stuck on the loader part and got the error "reading shared", in PIXI v7 they removed the loader and added Assets and Sprite. Just a heads up for anyone else stuck!
@TurtleKun
@TurtleKun 10 месяцев назад
This is how i have my 'setup' function now: const loader = PIXI.Assets const Sprite = PIXI.Sprite async function setup (resource, spriteName){ let texture = await loader.load(resource) spriteName = Sprite.from(texture) spriteName.y = 400 app.stage.addChild(spriteName) } setup("path/to/sprite.jpg", "char4Sprite")
@vikingvikingviking2806
@vikingvikingviking2806 3 года назад
Great crash course! Thanks
@WaelYasmina
@WaelYasmina 3 года назад
No problem!
@hakuenstudio
@hakuenstudio 2 года назад
Amazing tutorial!!
@WaelYasmina
@WaelYasmina 2 года назад
Thank you!
@bonanzainteractive7771
@bonanzainteractive7771 5 месяцев назад
please create a video to demonstrate how to use spine in pixi
@sk3ptik0s49
@sk3ptik0s49 3 года назад
So far so good, this is my third tutorial lol
@WaelYasmina
@WaelYasmina 3 года назад
I'm also still researching and learning about this library, and I think it's worth every second I spend on it. I highly suggest you to bookmark the examples page! The examples are not hard to analyze and understand, and they can help you to better visualize the role of a lot of functions. pixijs.io/examples/#/demos-basic/container.js Good luck!
@sk3ptik0s49
@sk3ptik0s49 3 года назад
@@WaelYasmina Thank you very much for the heads up, that´s exactly how I learn the fastest with programming, copying examples and then trying to modify them. One thing that I miss, since I started last year studying with Java, is that when hovering above a method etc, an explanation is given, or better yet, you have the scroll down pop up with options. Can this be achieved with libraries such as this? I´m using VScode.
@WaelYasmina
@WaelYasmina 3 года назад
There are extensions you can add to VSCode which provide that feature. But it's rare to find one for libraries/frameworks (except popular ones like React or Angular).
@sk3ptik0s49
@sk3ptik0s49 3 года назад
@@WaelYasmina Well, I got a clickable rectangle moving already! These examples sure help a lot, along with the searchable documentation.
@wasuuu
@wasuuu 2 года назад
Thanks for the quick reply, Wael. I've checked and the file path I've used is correct (I store app.js in the root directory and have a file called wine.png in the images directory, in root). For the file path used for importing the texture, I'm using `./images/wine.png`. The error message is as following: =========================== Uncaught (in promise) error { target: img, isTrusted: true, srcElement: img, eventPhase: 0, bubbles: false, cancelable: false, returnValue: true, defaultPrevented: false, composed: false, timeStamp: 99, … } ​ bubbles: false ​ cancelBubble: false ​ cancelable: false ​ composed: false ​ currentTarget: null ​ defaultPrevented: false ​ eventPhase: 0 ​ explicitOriginalTarget: ​ isTrusted: true ​ originalTarget: ​ returnValue: true ​ srcElement: ​ target: ​ timeStamp: 99 ​ type: "error" ​ : function isTrusted() ​ : EventPrototype { composedPath: composedPath(), stopPropagation: stopPropagation(), stopImmediatePropagation: stopImmediatePropagation(), … } =========================== I'm not sure if this error has anything to do with crossorigin because it's not supposed to throw an error for CORs since I'm using a local file, but perhaps I'm wrong about this. Once again, thanks for your help!
@WaelYasmina
@WaelYasmina 2 года назад
Try using another browser. In the meantime, I'll create a small project and I'll send it to you so you can test and see if the problem comes from your code or from something else.
@WaelYasmina
@WaelYasmina 2 года назад
Well, I ended up uploading the entire project. github.com/WaelYasmina/pixitutorial
@wasuuu
@wasuuu 2 года назад
@@WaelYasmina Woah, thanks! Unfortunately the same issue still occurs :( I've added an issue to the repository so you could view it in more detail
@theman7050
@theman7050 2 года назад
At around 40:20, why didnt the newly added background got added on top of the previously added sprite, i.e. dragon? I mean the layer / stacking which you explaind earlier in the video is not applying here? :)
@WaelYasmina
@WaelYasmina 2 года назад
Smart question. My guess is that since the tiling sprites are mainly used for backgrounds, the creators of the library made it in a way that the tiling sprites have lower order compared to the other types of sprites thus they're placed behind. I'm not 100% sure though.
@theman7050
@theman7050 2 года назад
@@WaelYasmina makes sense. Thanks again. Love ur work
@PawelGrzelak
@PawelGrzelak 2 года назад
Great tut quality.
@WaelYasmina
@WaelYasmina 2 года назад
Thank you!
@innocentcarrot5832
@innocentcarrot5832 8 месяцев назад
I followed the steps but at 1:59, I did not see the text on the console on my screen, what could be the problem.
@prantoislam5529
@prantoislam5529 Год назад
hi, im getting errors setting it up. Where can I show my problems or who can I seek for help?
@thesuperyou2829
@thesuperyou2829 2 года назад
Hats off man!!!!!!!!!!!!!!!!!!!!!
@WaelYasmina
@WaelYasmina 2 года назад
Thank you!
@vishnubhaskaran2521
@vishnubhaskaran2521 10 месяцев назад
if anyone is stumpled upon the Pixi loader then try using the below code // Load the enqueued assets PIXI.Assets.load('../../assets/images/zombiefiles/png/male/Attack (5).png').then((texture) => { // Once assets are loaded, create a sprite from the texture const char4Sprite = new PIXI.Sprite(texture); // Position your sprite as needed char4Sprite.y = 450; // Set the y position as needed // Add the sprite to the stage application.stage.addChild(char4Sprite); }).catch((error) => { console.error('Error loading assets:', error); }); Basically in the modern version pixi is providing Assets class for loading assets.
@myomyintaung1516
@myomyintaung1516 Год назад
how to use new pixi.js version with vue 3 sir, any ideas for this?
@emmanuellazarte8904
@emmanuellazarte8904 3 года назад
Thx.! you're the best one :D
@WaelYasmina
@WaelYasmina 3 года назад
Haha thank you!
@theman7050
@theman7050 2 года назад
Thank you.!!!!
@alexfrozen
@alexfrozen Месяц назад
@asyncasync
@asyncasync 2 года назад
I am writing a physics simulator and am using native canvas right now. My fear is performance when I start to scale things up. It seems to be getting laggy with only 300 particles already. So my thought was to replace the canvas rendering with WebGL. Trouble is it looks tremendously complex to code. I don't want to worry about buffers and memory allocation, but I do require high performance. Does it make sense to then to replace canvas with PIXIJS instead? Would it increase the performance? If it would increase the performance then why doesn't canvas do whatever PIXIJS + WebGL does under the hood, as they both use the GPU? Is it that PIXI slightly more complex to code compared to native canvas so they kept it that way? If the difficulty is the same I don't see why canvas is not deprecated then. Compatibility?
@WaelYasmina
@WaelYasmina 2 года назад
I'm not an expert in the matter so I can't give you precise answers to these questions, unfortunately. However, here's something that might be a little insightful regarding your last question (read the last 2 paragraphs of the chosen answer): stackoverflow.com/questions/36908427/webgl-vs-canvas-2d-hardware-acceleration Now from what I understand from those paragraphs, the main difference between WebGL and 2D Canvas is that the latter lets the browser handle all the optimizations. while the former gives you the total control to do the optimizations by yourself. And based on that, *I think* Pixi.js takes the control WebGL provides and does the optimization work for you behind the scenes. Anyways, I'd suggest you give Pixi.js a try which is super easy. Just learn the basic stuff that will make you able to do the same things that you are capable of using native canvas. And then based on the results you decide if you're satisfied or you need more advanced tools like shaders, buffers, etc... Finally, you can get better answers from real experts if you ask your questions here: github.com/pixijs/pixijs/discussions/ www.html5gamedevs.com/forum/15-pixijs/
@asyncasync
@asyncasync 2 года назад
@@WaelYasmina thanks. If its easy to work with I guess I will just go ahead and try. Then I will do some stress testing, then checkout to the canvas implementation again and compare the results. If the bottleneck truly is the graphics drawing and not the physics calculations then I might see some improvement.
@sambhavsaraswat5585
@sambhavsaraswat5585 2 года назад
The docs gave me a nightmare this tutorial is great
@WaelYasmina
@WaelYasmina 2 года назад
Thank you!
@quinnstevens7970
@quinnstevens7970 3 года назад
Hi, when i try app.renderer it doesn't seem to work. The background colour doesn't change and the resize only stretches the height far down the screen. Do you know what might be wrong?
@quinnstevens7970
@quinnstevens7970 3 года назад
Okay I found a solution. Turns out it wasn't the renderer but for the background color. The issue was i spelt "colour" the UK way which simply doesn't work. I'm not sure as to why the resize wasn't working but I found that placing "resizeTo: window" inside the configuration object works the same
@WaelYasmina
@WaelYasmina 3 года назад
The resize method is there just in case you wanna resize the canvas later in your code. So yes, you can skip it and just set the size in the configuration object.
@DagestanShop
@DagestanShop 2 года назад
35:20 when try function setup() { const texture = PIXI.Texture.from('blob_1.png') console.log(texture) const sprt = new Sprite(texture) sprt.position.set(50,50) console.log(sprt) app.stage.addChild(sprt) } get uncaught promise error , should i ihave also blo_1.png separate file ?
@WaelYasmina
@WaelYasmina 2 года назад
I don't get what you mean by having blo_1.png as a separate file. Can you copy and paste me the entire error message.
@wasuuu
@wasuuu 2 года назад
@@WaelYasmina There's unfortunately no error message. It just shows up as uncaught promise error :(
@WaelYasmina
@WaelYasmina 2 года назад
Are you running your project on a local server?
@DagestanShop
@DagestanShop 2 года назад
@@WaelYasmina yes , but I already switched to phaser )
@wasuuu
@wasuuu 2 года назад
@@WaelYasmina Yes, all the files are local
@sugendhamangla5868
@sugendhamangla5868 Год назад
i am getting an error below Uncaught TypeError: Cannot read properties of undefined (reading 'shared') at app.js:76:33 127.0.0.1/:1 Refused to execute script from '127.0.0.1:5500/node_modules/@pixi/graphics-extras/lib/' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled. (index):50 Live reload enabled. :5500/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
@Leonardo-qe1on
@Leonardo-qe1on 3 года назад
is it possible to create a multiplayer? what would you use?
@WaelYasmina
@WaelYasmina 3 года назад
Of course it is. I'd use Node.js, Express and Socket.io
@ed1849x
@ed1849x 2 года назад
gracias
@WaelYasmina
@WaelYasmina 2 года назад
No problem!
@sntlol
@sntlol 2 года назад
did you have a video for pixi spine?
@WaelYasmina
@WaelYasmina 2 года назад
No, but it's in my to-do list.
@iilyaa
@iilyaa Год назад
Where to find textures pack?
@WaelYasmina
@WaelYasmina Год назад
github.com/WaelYasmina/pixitutorial/tree/main/images
@dnbc177
@dnbc177 Год назад
It doesnt recognise npm what is that?
@Schwartz866
@Schwartz866 Год назад
Why not use web server ?
@பாமரமனசாட்சி
Total summary in 1 line : "PiXi js " is a library like 'Photoshop '
@WaelYasmina
@WaelYasmina 2 года назад
LOL 😂
@terric8501
@terric8501 Год назад
When I try to use PIXI.Loader.shared I just get this error message: "Uncaught TypeError: Cannot read properties of undefined (reading 'shared')" Do you have to install something separately?
@javideas
@javideas Год назад
01:24 worked for me without console errors
Далее
Making a Game in JavaScript with No Experience
5:49
Просмотров 858 тыс.
Three.js Tutorial For Absolute Beginners
53:26
Просмотров 425 тыс.
6 Months of Learning JavaScript Game Dev in 6 Minutes
6:35
Dear Game Developers, Stop Messing This Up!
22:19
Просмотров 719 тыс.
I Tried Making a 3D RPG Game in JavaScript
14:19
Просмотров 1,2 млн
The Tablet For When You're Dying
16:52
Просмотров 149 тыс.
Sprite sheet animation tutorial with HTML and CSS
25:29