Here's an easy math riddle!

wonder

Expert
Licensed User
Longtime User
256 as boolean ???

Oops!!! Ahahah!! That was a good one! :D:oops:o_O:confused::cool:
I wrote the code in the forum's code box, it wasn't copy-pasted from the real thing. ;p
 
Last edited:

ilan

Expert
Licensed User
Longtime User
i think u r asking for to much collisions

Do you have a player and want to check if he collide with other objects?
 

wonder

Expert
Licensed User
Longtime User
My "Stress Test" stage has 256 guys fighting each other on screen. Due to the AI decision process and hit detection, the minimal number of collision I was able to implement so far was (N^2 + N) / 2, which is 32896 collision tests per cycle. @Informatix suggested me the usage of a QuadTree algorithm (thanks!), but I'm still studying its implementation. :) Each character has a shadow, a special effects layer and a lifebar. That's 512 (to max 1024) objects (libGDX tex regions) being rendered per frame.
Untitled.png


This is just a stress test, a normal stage will never have more than 16 characters per stage. Dead characters will always get recycled as new characters for the next stage area(s). :)

PS: I'm going to write my collision detector in C++ this week and compile it as an .so library, so hopefully this will give some extra horse power. ;)
 
Top