Ant colony simulation

Update

Decided to switch to Libgdx in order to port to android, and jump to Opengl ES 2.0 while I was at it. Whew… also discovered how much weaker a mobile device is compared to a gaming computer :smiley: While my PC could handle 1000 ants, my Kindle could barely muster 20. So this update has some major optimizations. Now my PC does up to 8000 before getting too choppy, and the Kindle gets up to 80, still not good. Very curious though if anyone here tries with a newer nvidia tablet/phone, how it will run.

The jar file below is cleaned up, hoping it will run on more computers now. Also new testing number keys:

[1] - add 1 black ant
[2] - +10
[3] - +100
[4] - +1000

[5] through [8] do the same for red ants (testing big battles, just hit 4 and 8)

Windows Runnable Jar
https://docs.google.com/file/d/0BzuKZNfpDTUuTUZXTzZJNi1Zb0E/edit?usp=sharing

Android apk (low graphics since I’m testing with Kindle Fire 1st-gen)
https://docs.google.com/file/d/0BzuKZNfpDTUuakhxc3dkNnR5QUU/edit?usp=sharing

===============

Hi Everyone,

So my favorite games growing up were the Sim series by Maxis. While SimCity lived on due to popularity, two great games were forgotten: SimEarth and SimAnt.

Knowing there will never be a sequel for them, I took it upon myself to create new versions of them with updated graphics. After creating a base engine for SimEarth, it dawned on me how much work it would be, a hundred or so animated models is not feasible for a solo hobby programmer (with no artistic ability). So I turned my attention to SimAnt, and have been surprised how much I have done with little time on my hands.

I do intend on releasing this at some point, so I will eventually make it less like SimAnt, and more its own game.

Planned features on release:

  • All aspects of original simulation from SimAnt
  • Single player vs. COM
  • Two ant species (Black/Red)
  • Simple campaign with several map types
  • Sandbox mode

Added features after release

  • New species (ex: honeypot, fire ants)
  • Each species has own traits/special abilities (for example, milking aphids for Black)
  • New environments (house, roadside, desert, etc)

Wish-and-hope future features

  • Multiplayer (4 player ffa)

Current status - The simulation is functioning, and if left alone, the black/red ants will find their own food and tend their eggs. Eventually one nest will lose out and starve.

The player can control an individual ant, and can command the nest to attack the red nest (battles have no animation yet). Besides that, the game is very unpolished and buggy. Controls are awkward, etc :slight_smile: And there is no sound or music, I’ve got to figure out how I’m going to do that, will probably be my biggest challenge.

I’m targeting this for Android, but until I complete the game I’m building in Win7-64 for ease of development.

The demo may not work for everyone, I’ve tried it on 4 computers, only 2 worked. Will try to get a more robust build soon. (Download the zip and unzip into folder, and run the jar).

Controls:
Left-click: walk in direction of pointer
Right-click: take action (pick up or drop food/eggs/dirt)
Q: move queen to current location
H: speed up simulation

Please let me know what you think, and if you have any suggestions/encouragement on actually finishing this (especially sound/music!).

https://docs.google.com/folder/d/0BzuKZNfpDTUucFFrTVZPZzBTU1U/edit?usp=sharing

1 Like

That looks really promising!

If you’ve been able to do this as a solo developer, adding sound won’t be a problem at all (at least not from a technical pov).
As for sound content, there are lots of royalty-free resources available.
You might even consider just buying a mic and become your own foley artist (it’s fun!) :slight_smile:

Nice!
Although I never played sim ants, it looks quite good and seems like a great idea. This could also
sit well with the “wholesome games for my children” parent crowd. At least as long as you don’t
implement a looking glass hehehehehe

I am a huge fan of the Sim Ant game, and am baffled as to why a remake was never made, or has never been made. I have actually wanted to a remake myself for quite some time now, but do not have the skill required to do so. It’s great to see that someone else out there shares my enthusiasm for a game that really was quite awesome :smiley:

Best of luck to creating it, and I really like what I see here, not too shabby for someone who isn’t an artist :smiley:

Impressive. I find animations a pain to rig myself, but it should be doable if you’re only working with one model. Keep it up.

SimAnt is the shit. I played that allllll the time growing up.

Good luck with this! c:

I just spent 10 min digging a tunnel; I love this game.

Whaou ! Nice ! At first, I was thinking that a game concept like this one was weird, but actually it gets really interesting, fun and quite addictive. I enjoyed it!
Yet I saw some bugs (not only ants ;D ). Nothing really embarassing, but there is one thing that really bothered me while playing: if FPS falls down under its limit, then the game get slower. This is surely because of your gameloop which is not opimized . You should consider in game mechanism a delta time. There is a subject on this on JGO: http://www.java-gaming.org/topics/game-loops/24220/view.html
Keep on programming, it’s really nice :wink:

Thanks for the feedback everyone, glad to see it at least worked for someone and that their are other SimAnt fans out there :smiley:

@erikd This is my first real project so I’m fumbling through it, but it does look viable to use pub. domain stuff, thanks for the tip

@dejay That’s actually a good idea, a good sim needs disasters!

@tim Ah excellent thanks for that link. I need to start thinking about optimization, especially if I intend for this to run on devices.

@Morgan That’s given me hope that i can do this, since ants/bugs are rigid beings that are easy to model/animate. My biggest challenge right now is to get some good ant vs. ant fighting animation.

Well not much progress since I first posted, depends on my job how much i can work on it. My current priority is the simulation, I need the CPU nest to perform nearly as well as the human nest. Right now, I can speed up the simulation and see the back and forth fight, but one side wins quickly. And then the winner will have population booms & busts, then suddenly the queen will die of starvation :o So a few kinks to work out.

Also in SimAnt, not sure if anyone else noticed, but the Red nest always had a “commander” ant that acted like the yellow ant. I guess this was to make the game more difficult so that the commander could find food and lead attacks, where as the follower ants would have to naturally do these. I need to make a decision on how much Game there is compared to Simulation.

After the simulation is better, I will switch to UI and finish out game play rules. Content wise, i need to add some good fight animation, and the Spider as a neutral hazard.

This looks really great. Really important question though: will we be able to cheat by playing as the spider? :stuck_out_tongue:

Question: Ant lion’s scared me when I used to play SimAnt. Will you be implementing those nasty little critters? :slight_smile:

Now I am :wink: (can’t believe i forgot about them!)

Tell me how I run this! ;D

New version uploaded to the google-drive link. Download entire zip and unzip into folder of your choice, then run the jar file. Still iffy if it will work on most computers, if it doesn’t feel free to post your basic specs (Windows version, GPU maker, etc) so I can make it more stable.

New features

  • Game loop stability
  • Buff to colony maintenence
  • Ant corpses
  • Fight mechanics (still need to add animation)
  • Player ant respawn on death
  • Music tracks (I really like the enemy nest music I found, still thinking about the others) from Matt McFarland and Kevin Macleod

Current priorities

  • User Interface
  • Spider
  • Antlion (Otreum reminded me of this, I might give player chance to kill winged antlion before it lays eggs, otherwise it grows up and becomes a menace)
  • Sound effects
  • Victory conditions (non-sandbox game): Last Queen Standing, Winged Exodus

Thanks for the suggestions I’ve gotten, keep’em coming :slight_smile:

I had to run the game from the cmd. Dont know if that’s suppost to be or if it’s only me.

Yay :smiley: That would be a great feature. It’d be like one of the random events, like rain or something.

Are you going to put a few random critters in there like beetles, worms, dead critters etc?

Keep this game going, it has a LOT of potential, especially if you manage to port it to portable devices :slight_smile:

Tried the game on a school computer.
Got an error of some kind. I’ll post specs and error. But im pretty sure It’s the computer, because they are horrible…

Specs(the whole DxDiag ;D):
http://www.java-gaming.org/?action=pastebin&id=511

Error:
http://www.java-gaming.org/?action=pastebin&id=512

There are no sound outputs on that system.

Thanks for the test, I at least need to catch the error when there is no sound, probably would be additional errors after that, if it is a lower end computer.

New version is uploaded:

New features

  • Spider! - Hostile to everything and very fast when it sees you.
  • Antlion (winged form) - Will wander harmlessly for now. Have not coded traps yet.
  • Bug fixes

Spider was fun to work on. I started basing it on a regular wolf spider, but tried adding a fuzzy shader to it and thought it was very creepy that way (and decided to keep it) :smiley: Behavior-wise, I like where it is now, it is scary to be chased by it. You can’t actively hunt it right now since I don’t have “summon ants” ability yet, so its not terribly strong (4 or 5 ants can bring it down).

Current priorities

  • Finish antlion
  • Spruce up under-world, its hard to see black ants, and the background is missing.
  • Look into running this through a browser, I’ve seen other games do this. (Is there a particular method that is best?)