Locas Ants Sim Remake
Posted: Wed Mar 21, 2018 4:05 pm
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.
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.