Coding Challenge #32.1: Agar.io - Part 1 (Basic Game Mechanics) - bladeofgame.com

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

The Coding Train
Views: 284658
Like: 4265
In this coding challenge, I create a clone of the multiplayer online game Agar.io 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:

🚂Website:
💡Github:
💖Membership:
🛒Store:
📚Books:
🖋️Twitter:

Links discussed in this video:
🔗Agar.io:

🎥Coding Challenges:
🎥Intro to Programming:

🔗 p5.js:
🔗 Processing:

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

70 Comments

  1. Let's create a Minecraft server with this minigame!

  2. 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.

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

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

  5. 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

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

  7. 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?

  8. 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.

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

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

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

  12. It says:

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

    Line 34 says blobs[i].show.

    What am I doing wrong?

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

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

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

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

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

  18. 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.

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

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

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

  22. function setup() {
    this.NoInternet = whycantiwatchthisvideo?
    }

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

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

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

  26. 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.

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

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

Leave a Reply

Your email address will not be published. Required fields are marked *