PokeVideoPlayer v23.9-app.js-020924_
0143ab93_videojs8_1563605_YT_2d24ba15 licensed under gpl3-or-later
Views : 885,821
Genre: Gaming
License: Standard YouTube License
Uploaded At Jul 27, 2024 ^^
warning: returnyoutubedislikes may not be accurate, this is just an estiment ehe :3
Rating : 4.957 (818/75,485 LTDR)
98.93% of the users lieked the video!!
1.07% of the users dislieked the video!!
User score: 98.40- Masterpiece Video
RYD date created : 2025-02-18T22:50:30.273012Z
See in json
Top Comments of this video!! :3
The much bigger optimization is to choose a completely different approach , on a low end machine you should be having hundreds of enemies pathfinding at once without dropping below 60 fps , especially in a 2d game, so the problem here is the algorithm itself and not the frequency, but i understand this is just an example
3.1K |
My game has about 500 enemies pathfinding on screen at a time. The pathfinder updates every 6 frames and I use multithreading and ECS to lessen the load on the main thread and reference the data more efficiently.
I still have some optimizing to do, currently creating and destroying enemies and I saw your video about instantiating all objects on start then disable and renable when needed but I feel like that takes the same amount if not more processing than creating and destroying.
God optimization is a real puzzle sometimes
200 |
Just make a task scheduler, if you don't want to use multi-threading.
1. Make a master controller that updates every frame.
2. Make a controllers for game mechanics that need to be updated regularly
3. Code a update budget, which is your preferable minimal fps, i.e 60 frames per second, so 1/60 second.
4. Put a priorities to controllers and desirable update period(i.e 0.5 second and etc)
5. Measure execution time
???
Just run all controllers that need to be updated every frame according to priority and skip them if there's not enough time to run them. Also you can spread loops inside your update function on the next frames
btw ECS-friendly
5 |
Just make sure to have each one checking on different frames so that you don't have a lag spike every 15 frames. You also only need to check the ones that are in frame or close enough to be relevant. You can also use 2D voxel pathfinding which may be more performant depending on the size of those voxels. There's probably some other methods too, but that's off the top of my head.
2 |
@InboundShovel
6 months ago
Wishlist Isadora's Edge on Steam!
store.steampowered.com/app/3125320/Isadoras_Edge/
And you can follow the Kickstarter here: www.kickstarter.com/projects/inboundshovel/isadora…
Thank you!
446 |