AntyVersum

    Making games with passion
UMeFate Sim Prototype: Lua spawning agents – Imagine you can mod smost of game logic from lua #6 CloneLife Sim Prototype: 1000 characters Lua controlled performance stress test with pathfinding – Mid end PC aiming for 60FPS stabilityUMeFate Sim Prototype: Lua spawning agents – Imagine you can mod smost of game logic from lua #9
This is one of many performance tests I conduct recently, as primary focus.
Want to help? Whishlist us on Steam (With Pre-Alpha Experimental Playtest Demo)
image

The video shows 1000 agents (characters) moving randomly between their destination points. When destination is reached, then next destination is given. Giving new destinations are controlled from Lua JIT. So it is fairly easy to modify behaviour, without needing game engine. Just any text editor. Literally preparing base framework for modding.


In the shown specific case scenario, I am using mid end PC. I aim to achieve 60 stable FPS in any case scenario. Obviously there are missing many mechanics and visuals, which will contribute to performance effect. But benchmark point it is there. In the worse case scenario, there is always option is to reduce number of agents (characters). But even at this point, I have many ways to optimize current code base.


For example, when zooming closely, it can be observed frame drop, when transparency rendering become more involved. Hiding / showing objects will be thing to optimise performance. But that is something for later work.


Next thing todo:


I want to start look into searchable items in the scene. That means, characters will be wanting find objects to feel their needs. So for example want to sit, look for nearest chair. Want to read, find a book. Want to eat, find food. That will be very basics behaviour at first.


The challenge is, to make search system performant. If having 1000 characters, and each one want find a food and there are multiple sources of food, that could easily be 1000 x number of food sources.


There are of course dozens ways of optimizing searching. I.e. creating plots. Spatial mapping. Filtering. Distance limit etc. But also, want to leverage power of modern hardware, with multithreading and available tech.


After this critical step, I will be able start looking into demands and hunger mechanics. In short Utility AI.


Then I will be able start looking into observerable world system. You characters should be able to react to nearby events. Can you hear? Can you see? can you feel? Etc. Simply put, a lot of complex work to do 😀

Reddit Discussion

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top