coding game with Javascript | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

coding game with Javascript

Hi every one .. hope you enjoying learning like me from this cool website please i want learn Javascript to make game like Agar.io if it possible just with Javascript if not witch language are used on it Thank U <3

17th Jul 2017, 7:29 PM
Mosaab Yassir Lafrimi
6 Answers
+ 14
The Coding Train made a couple of videos using the p5.js framework (node.js and socket.io for the "multiplayer stuff"), here the fist one: http://bit.ly/2usH9VN With Javascript only i did not found anything, i recommend these videos just because i learnt a lot from that channel, frameworks are not the evil to make projects like this. I also found this playlist, if you are totally beginner it will give you a very good start point covering collision detection and stuff like that in pure JS, however (to make things easier) the OOP is bad explained and the author uses bad practices, check it out: http://bit.ly/2tjCXIa
17th Jul 2017, 8:20 PM
Maz
Maz - avatar
+ 10
Paulax for example he did not use the "this" keyword but a singular way to create object using normal functions (just putting an object inside the function and return it). In addition a strange way to manage the elements inside the array, stuff like that. This should make things easier but it is just an amount of useless lines of code, i do not recommend that playlist to those who already know how to work with constructors, but it is always the best start point to write in pure Javascript simple 2D games, many of my knowledges come from there, i practiced a lot following that playlist, sprite, controls, angles, all this stuff in pure JS. ^^ Anyway i tried your paint app, really well done! ;)
17th Jul 2017, 8:43 PM
Maz
Maz - avatar
+ 3
Oh thanks! Yes he tries to make the functions look like classes, but it's beautiful JS work.
17th Jul 2017, 9:18 PM
Paulax
Paulax - avatar
+ 2
That coding train serie is great I've been watching all of them. I actually tried that sketch (I want users to "paint" projections together from their phones) but the code works on my localhost but not online. Any suggestions? https://birthoftheegg.github.io/sketch-together/public/index.html to try https://github.com/BirthoftheEgg/sketch-together to view code
17th Jul 2017, 8:35 PM
Paulax
Paulax - avatar
+ 2
@Maz what bad practices? Just curious I don't want to reproduce his mistakes
17th Jul 2017, 8:38 PM
Paulax
Paulax - avatar
0
I'm enjoying
27th Sep 2017, 4:46 PM
Thelma