Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Ant colony simulation  (Read 8325 times)
0 Members and 1 Guest are viewing this topic.
Offline WillyWonka

Junior Member


Medals: 3
Projects: 1



« Posted 2013-03-08 19:54:37 »

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  Cheesy  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 Cool


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  Smiley 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
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #1 - Posted 2013-03-09 23:21:39 »

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!) Smiley

Offline Dejay

Senior Newbie


Medals: 3



« Reply #2 - Posted 2013-03-10 03:15:34 »

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
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Otreum

Junior Member


Medals: 6



« Reply #3 - Posted 2013-03-21 14:10:00 »

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 Cheesy

Best of luck to creating it, and I really like what I see here, not too shabby for someone who isn't an artist Cheesy
Offline Morgan Allen
« Reply #4 - Posted 2013-03-21 14:55:46 »

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.
Offline StonePickaxes

JGO Coder


Medals: 4
Projects: 2


Nathan Kramber


« Reply #5 - Posted 2013-03-21 17:29:11 »

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

Good luck with this! c:

Check out my website!
Offline tyeeeee1
« Reply #6 - Posted 2013-03-21 19:55:20 »

I just spent 10 min digging a tunnel; I love this game.
Offline Tim Spekler
« Reply #7 - Posted 2013-03-21 20:49:54 »

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  Grin ). 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
Offline WillyWonka

Junior Member


Medals: 3
Projects: 1



« Reply #8 - Posted 2013-03-22 17:51:52 »

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

@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  Shocked  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.


Offline KevinWorkman

JGO Wizard


Medals: 52
Projects: 11
Exp: 12 years


klaatu barada nikto


« Reply #9 - Posted 2013-03-22 21:44:42 »

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

Static Void Games - Play indie games, learn game programming, upload your own games!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Otreum

Junior Member


Medals: 6



« Reply #10 - Posted 2013-03-27 11:49:32 »

Question: Ant lion's scared me when I used to play SimAnt. Will you be implementing those nasty little critters? Smiley
Offline WillyWonka

Junior Member


Medals: 3
Projects: 1



« Reply #11 - Posted 2013-03-27 18:45:02 »

Now I am  Wink  (can't believe i forgot about them!)
Offline Gamerulf

Junior Member


Medals: 2



« Reply #12 - Posted 2013-03-27 19:04:19 »

Tell me how I run this! Grin

- Gamerulf
Offline WillyWonka

Junior Member


Medals: 3
Projects: 1



« Reply #13 - Posted 2013-03-27 20:38:00 »

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  Smiley
Offline Gamerulf

Junior Member


Medals: 2



« Reply #14 - Posted 2013-03-27 20:45:41 »

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

- Gamerulf
Offline Otreum

Junior Member


Medals: 6



« Reply #15 - Posted 2013-03-28 08:51:32 »


* 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)


Yay Cheesy 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 Smiley
Offline Gamerulf

Junior Member


Medals: 2



« Reply #16 - Posted 2013-03-28 09:59:01 »

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 Grin):
http://www.java-gaming.org/?action=pastebin&id=511

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

- Gamerulf
Offline ra4king

JGO Kernel


Medals: 338
Projects: 2
Exp: 5 years


I'm the King!


« Reply #17 - Posted 2013-03-30 06:25:04 »

There are no sound outputs on that system.

Offline WillyWonka

Junior Member


Medals: 3
Projects: 1



« Reply #18 - Posted 2013-03-30 16:37:09 »

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.
Offline WillyWonka

Junior Member


Medals: 3
Projects: 1



« Reply #19 - Posted 2013-04-02 22:23:35 »

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)  Cheesy  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?)

Offline KevinWorkman

JGO Wizard


Medals: 52
Projects: 11
Exp: 12 years


klaatu barada nikto


« Reply #20 - Posted 2013-04-03 01:30:07 »

* Look into running this through a browser, I've seen other games do this. (Is there a particular method that is best?)

That would be great. I'd love to play this as an applet or webstart. Which method is best probably depends on what framework/libraries you're using. Sorry if you mentioned that already!

Static Void Games - Play indie games, learn game programming, upload your own games!
Offline WillyWonka

Junior Member


Medals: 3
Projects: 1



« Reply #21 - Posted 2013-04-03 04:43:35 »

* Look into running this through a browser, I've seen other games do this. (Is there a particular method that is best?)

That would be great. I'd love to play this as an applet or webstart. Which method is best probably depends on what framework/libraries you're using. Sorry if you mentioned that already!

No I haven't mentioned that yet  Smiley  It's running on LWJGL.  I looked into libgdx this afternoon, mentions desktop/android integration, if it does applets too that would be perfect
Offline sproingie

JGO Kernel


Medals: 202



« Reply #22 - Posted 2013-04-03 04:59:32 »

gdx does not do applets.  it does html5 via gwt and webgl.
Offline KevinWorkman

JGO Wizard


Medals: 52
Projects: 11
Exp: 12 years


klaatu barada nikto


« Reply #23 - Posted 2013-04-03 05:44:51 »

gdx does not do applets.  it does html5 via gwt and webgl.


Unless I'm misunderstanding something, you can use LwjglApplet to launch libGDX games as an applet. You can also launch them as webstarts. Here's a little game I made that uses both, if an example would help: http://staticvoidgames.com/play/?game=AvalancheRider

Static Void Games - Play indie games, learn game programming, upload your own games!
Offline sproingie

JGO Kernel


Medals: 202



« Reply #24 - Posted 2013-04-03 05:49:46 »

LibGDX has its own native bits, but if you shipped those over, sure, I imagine it could work.  It just doesn't go out of its way to help you package applets or anything.
Offline KevinWorkman

JGO Wizard


Medals: 52
Projects: 11
Exp: 12 years


klaatu barada nikto


« Reply #25 - Posted 2013-04-03 13:38:22 »

LibGDX has its own native bits, but if you shipped those over, sure, I imagine it could work.  It just doesn't go out of its way to help you package applets or anything.


Yeah, it works fine. And it's extremely easy, too. Here is all the code I needed:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
public class MyGameApplet extends LwjglApplet
{
   public MyGameApplet()
   {
      super(new MyGame(), false);
   }
}

public class MyGame extends Game implements ApplicationListener {  
//...

 
And it works fine. You just have to export it as a runnable jar (which grabs everything for you) and I believe sign the jar, and you're set!

Static Void Games - Play indie games, learn game programming, upload your own games!
Offline WillyWonka

Junior Member


Medals: 3
Projects: 1



« Reply #26 - Posted 2013-04-18 21:06:39 »

Updated links at top /info, plus APK.  Still need to figure out how to get HTML version (libgdx) to work.
Offline WillyWonka

Junior Member


Medals: 3
Projects: 1



« Reply #27 - Posted 2013-05-03 21:56:31 »

New version on the desktop jar link. Finally getting behind-the-scenes code working good, and can move on to fleshing out the game.

Still having a big issue with performance on mobile devices.  GPU is fine, but CPU struggles at about 100 ants (I want it to handle at least 500).


==================== Updates  =================

* Antlion added
   - Winged version wanders looking for suitable spot for egg
   - (Currently egg grows instantly into larva, for testing)
   - Winged flys away, leaving larva and trap
   - Ants that fall in are eaten

* UI improvements
   - Job assignment window
   - Caste assignment window


========== Current priorities =================
* Finish UI
* Find bottle-neck in simulation causing slowdown on mobiles


And then there are sound effects, scenarios, saving progress, other tiny details that need to be fixed... Dang, how do ya'll finish a game?  Shocked
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Riven (18 views)
2014-07-29 18:09:19

Riven (13 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (31 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (42 views)
2014-07-24 01:59:36

Riven (41 views)
2014-07-23 21:16:32

Riven (28 views)
2014-07-23 21:07:15

Riven (29 views)
2014-07-23 20:56:16

ctomni231 (60 views)
2014-07-18 06:55:21
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!