Coding Challenge #32.1: - Part 1 (Basic Game Mechanics) -

Coding Challenge #32.1: – Part 1 (Basic Game Mechanics)

The Coding Train
Views: 297313
Like: 4510
In this coding challenge, I create a clone of the multiplayer online game using JavaScript (p5.js). This is only the beginning of this challenge where I build out the basic game mechanics. I plan to make a follow-up to this video and add the multiplayer functionality of the game using node.js and websockets.

💻Challenge Webpage:
🎥Part II:


Links discussed in this video:

🎥Coding Challenges:
🎥Intro to Programming:

🔗 p5.js:
🔗 Processing:

📄 Code of Conduct:
🌐Help us caption and translate:
🚩Suggest Topics:
👾Share your contribution:


  1. Just a minor optimisation: you never need to use pi to scale up the blob's radius. Consider,
    new_area = pi * new_radius^2 = pi * old_radius^2 + pi * other_radius^2
    Divide everything by pi and take the square root to get:
    new_radius = sqrt( old_radius^2 + other_radius^2 )
    And thus we have a formula for the new radius with no pi's involved.

  2. I have 1 problem.
    Everytime I try to execute it I get " is not a function"
    How do I fix this?

  3. These videos just makes me happy. Its so awesome to take part of your energy and passion.
    Thank you!

  4. Awesome vid, but I'm curious.. What do you need to change to make this playable over the internet? Agario has thousands of players? It is perfectly realistic. Are TCP heartbeat updates really fast enough for a totally real-time gaming experience. – Not in a home LAN. There is no UDP ability from browsers. I have access to a Godaddy pro dedicated server, non VPN. I have lots of experience coding Java authoritative RTS servers How does agario do it? Thanks

  5. when i do
    function Blob(x, y, r) {
    I cant run it and it says syntax error, maybe missing a semicolon?
    Please help

  6. Very interesting and great videos. makes coding fun again, but the code doesn't work at all… its one error after another.. maybe show us how to set up the environment?

  7. Make a T1000 simulator. Near the end of Terminator 2 when the T1000 gets frozen and blown apart, all the little blobs of liquid metal steered toward the nearest other blob, melded together, and repeated until there was only one main blob.

    Then, for fun, you could make it explode again with a mouse click.

  8. very very good, please speak game lightbot, rs

  9. The blob speed smoothness is actually an side artifact of ping.

  10. Why does the main blob 'judder' when the mouse is held still?

  11. It says:

    Uncaught TypeError: Cannot read property 'show' of undefined (sketch: line 34).

    Line 34 says blobs[i].show.

    What am I doing wrong?

  12. did you no blobs.forEach(function(value){});

  13. If you look closely you can see that shiffman has a slice in his forehead

  14. I searched in the reference and this splice function was remove, what can I do to have the same effect?

  15. Please tell me how to make PAPER.İO. please please.

  16. you forgot to do the mouse thing where the thurther your mouse is from the circle it moves quicker.

  17. I’m so disappointed in myself for not continuing to program. I started on Khan Academy when I was literally 9 and I was making simple games and animations but I just stopped doing it and now I’m almost 14 and I just wish I stuck with it. I’m gonna start coding again.

  18. .show isn’t working for me can somebody help me

  19. Sir it was coming the numbers added are not enough for sequence

  20. How much do the square root calculations slow this down?

  21. function setup() {
    this.NoInternet = whycantiwatchthisvideo?

  22. Hi can you make a game like tik tac toe, chess , pinball etc., please
    Or some great 2 player games

  23. I didnt know that a brazilian coded it! Im so proud

  24. Im so happy. To be an aspiring coder ( i suck and currently failing my courses but still want to try)

  25. Do you do tutorials your fun to watch and make things simple, i wish school was fun but we code in java and VB .net framework, it is such a snooze.

  26. It's been 3 seconds and I already fucking love this guy

  27. do you have understandings in android and apk's (applications)

  28. Thanks for your great tutorials!
    Why do I het a «ReferenceError: createVector is not defined» at 2:47. I'm working with the p5JS-Editor

Leave a Reply

Your email address will not be published.