Hi, I'm new here and my name is Denys ,
The original "Locas Ants" was an Ant path algorithm simulation I made many years ago. Watch here: https://www.youtube.com/watch?v=G5wb4f5n6qQ&t=53s
Many people liked and wanted to understand and play with my awkward code made with Delphi 7. Recently I started a remake and selected Lua + Love2D as the best candidates trying to give a more accessible, cleaner and simpler code while adding some new cool features.
The project is in progress and anyone can access my new-less-awkward code on GitHub: https://github.com/piXelicidio/locas-ants
The idea is to have an integral base to share with anyone who wants to study the real-time simulation of ants optimization algorithm (with some personal approaches toward more fun), or create their own simulation|game.
Watch the last screencap showing the implementation of "grass":
Quick notes about Love2D:
- The performance was something of my concern for this project and Love2D did better than many other similar API/Engines that work with Lua.
- Loved the easy to setup and iterate along with ZeroBrane Studio
- The API is simple and that gives you the whole power.
- Thank you for the well-maintained documentation.
- Love the love2d.org website design.
Hope you enjoy the little ants.
Run the .love: https://github.com/piXelicidio/locas-an ... 0.2.1.love
Github source: https://github.com/piXelicidio/locas-ants
Some useful keyboard shortcuts:
'2'- Toggle: Ants will check and obey pheromones every frame. Result in less natural but prettier path.
'4'- Switch on/off the algorithm. Ants will stop.
'5'- Toggle: Show pheromones traces.
'6'- Toggle: Disable object avoidance.
'0'- Toggle: Do not draw ants.
'm' - Prints used RAM on console.
PD: If the framerate run too slow reduce the # of ants in code\simconfig.lua > simconfig = { numAnts = 4500 ... } Also I'll be very grateful and happy to hear how many Ants you can handle at 30fps and your PC specs.
Locas Ants Sim Remake
- pixelicidio
- Prole
- Posts: 5
- Joined: Sat Mar 17, 2018 2:47 pm
- Contact:
Re: Locas Ants Sim Remake
Can't. Stop. Staring.
Straight from GH without modifications, revision 1622d10 (latest as of this writing), I get 30 FPS on my computer. i7-4790 @ 3.6GHz
Edit: Forgot to specify the GPU. nVidia GeForce 8600GT with proprietary drivers. The OS is Debian 9.4.
Edit 2: It was a challenge to make them follow two paths with different lengths, but I finally managed to get it:
It seems to be metastable at best, but this one seemed to last for quite a long time.
I'm very impressed with the simulation. Great work.
Straight from GH without modifications, revision 1622d10 (latest as of this writing), I get 30 FPS on my computer. i7-4790 @ 3.6GHz
Edit: Forgot to specify the GPU. nVidia GeForce 8600GT with proprietary drivers. The OS is Debian 9.4.
Edit 2: It was a challenge to make them follow two paths with different lengths, but I finally managed to get it:
It seems to be metastable at best, but this one seemed to last for quite a long time.
I'm very impressed with the simulation. Great work.
- pixelicidio
- Prole
- Posts: 5
- Joined: Sat Mar 17, 2018 2:47 pm
- Contact:
Re: Locas Ants Sim Remake
Hey! @pgimeno, that's and interesting "kite" formation...
Thanks for sharing your PC specs! very appreciated. It's running well, that revision is set to 4,500 ants. I'll be going to show the # of ants on the screen.
Thanks for sharing your PC specs! very appreciated. It's running well, that revision is set to 4,500 ants. I'll be going to show the # of ants on the screen.
Don't understand, sorry. I never use metatables, don't know how , I use closures.It seems to be metastable at best, but this one seemed to last for quite a long time.
Thanks again!I'm very impressed with the simulation. Great work.
Re: Locas Ants Sim Remake
Sorry for the confusion. I meant "metastable" as in "only stable when not affected by anything but small fluctuations". But no, it's not even that. I've seen it end up on the left path, and on the right path, meaning the lengths are probably well adjusted but it's just not stable enough. Kinda like a pin you try to stabilize in the upright position: it will always tip over one way or another, but it will take longer if you get a good equilibrium.pixelicidio wrote: ↑Thu Mar 22, 2018 2:42 amDon't understand, sorry. I never use metatables, don't know how , I use closures.It seems to be metastable at best, but this one seemed to last for quite a long time.
-
- Party member
- Posts: 712
- Joined: Fri Jun 22, 2012 4:54 pm
- Contact:
Re: Locas Ants Sim Remake
Very cool project! I really hope someone turns this into a game
trAInsported - Write AI to control your trains
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de
- pixelicidio
- Prole
- Posts: 5
- Joined: Sat Mar 17, 2018 2:47 pm
- Contact:
Re: Locas Ants Sim Remake
Hi, update:
Implemented portals:
Ants can teleport!
Implemented portals:
Ants can teleport!
Who is online
Users browsing this forum: Bing [Bot] and 0 guests