Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.

Neato?
Ye
 81%  [ 9 ]
Nay
 18%  [ 2 ]
Total Votes : 11

I've been working on a game called Agar.io+, which will be an expansion of the classic Agar.io game. I've almost completed the basic game engine, so I've decided to share it.
Light Mode

Dark Mode


DONE
Movement (it's inverted mouse control, but that should be easy to fix)
Mass generation
Changing the theme (using the '1' and '2' keys)


TO-DO
Try to actually finish a project all the way through
Finish the basic game engine (recreating the original Agar.io)
Add Gamemodes
-This will include modes like CTF, TDM, DM, and CP. More ideas are welcome Smile
Add multiplayer functionality
Automatic Night Mode
Create game menus

I'm having trouble with detecting if mass is "eaten", so if somebody could help me, I'd appreciate that (Source Code). Note that you have to install Processing 3.3.5 to open this.

Let's see if I can actually finish this project Razz
This looks pretty sweet so far! Keep it up Razz
Nice, it's looking good so far! For collision detection, I would check if (X_player - X_pellet) + (Y_Player - Y_pellet) < (R_Player + R_pellet). It's a long time ago I programmed in Processing, but I remember you can do awesome things with it. Goodluck with this project! Smile
PT_ wrote:
Nice, it's looking good so far! For collision detection, I would check if (X_player - X_pellet) + (Y_Player - Y_pellet) < (R_Player + R_pellet). It's a long time ago I programmed in Processing, but I remember you can do awesome things with it. Goodluck with this project! Smile


Thanks! Very Happy
For R_player and R_pellet, are you referring to the player/mass radius?
Yes, he is.

Basically, he is checking whether your "circle" intersects the pellet's circle, by checking if the distance from your position to the pellet's position is less than your radius plus the pellet's radius.

I used a similar trick when creating my TI-BASIC game, "The Game of Finding Free WIFI".
This is super fun! Why did you decide to do it in Processing, out of curiosity? Anywho you should totally post deip.io next; that's even better than agar.io hehe Razz
MateoConLechuga wrote:
This is super fun! Why did you decide to do it in Processing, out of curiosity? Anywho you should totally post deip.io next; that's even better than agar.io hehe Razz


I don't know any other language fluently (that's fast, sorry TI Basic Razz) plus I learned it over the summer at a technology 'boot camp'. It's still pretty flexible, and as far as I can see, I'll be able to implement everything on my to-do list. Honestly, at this rate, I'm gonna recreate all of the .io games Very Happy
Thanks PT_, it worked! I was checking if the distance from the center to a mass was less than the players mass, which I thought would work Razz
I've added viruses today. Made them meself Smile


TO-DO
Make the viruses "work" (plus space them out, they are too close together)
Create Menu's (gonna do this next)
Add splitting and ejecting mass
Create CTF, TDM, DM, and CP modes (I've started to create the images for those)
Add multiplayer
Fix inverted mouse issue (or add it as an option)
I think that in light mode, the pellets should *look* bigger, without actually being bigger, for visual purposes.
That looks fantastic! I'm curious how you will handle multiple balls, for example after you split or exploded on a virus. Could you maybe explain that? 2 notes about the viruses: I think they are a bit too big and exploding at a virus is not that hard. You can partially go in the virus without exploding, and I think it's super simple to check whether or not you explode on the virus. I think there is a small 'inner virus', like 10 pixels width, and if you that with you ball, you explode. However, you don't need to check if the outer border of your ball is within that round, because you have go over a virus with 2 balls, if the virus stay in the middle. Good luck! Smile
The part where you can go partially into the virus is intentional behavior; it is like that in the actual game.
To handle multiple balls, I'll use an array to keep track of the ball's position (which I think will work). They'll split into n balls, depending on the mass, and this will determine the size of the array.

And I've shrunken the viruses from 200px to 125px. My friends were like 'tahts too big m8' Razz

In other news, I've discovered the power of p5.js, which is Javascript plus Processing. There are many powerful libraries and commands (which means I don't have to create unnecessary code), and I'll be able to move this to online easier (which I could do with Processing, but with a more complicated process). I'll continue the game in regular Processing, and I'll also be converting the current code to p5.js.
Minor updates, fixed the inverted mouse issue, plus some other things I can't remember. Get it here.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement