I created a game a few years ago that was also a simple top down shooter and it was pretty laggy. I recently saw a video uploaded onto The Coding Train channel on youtube that was about boid flocking. I remembered hearing about it when I was trying to figure out a way of stopping the zombies in my game converging into one zombie (I ended up using HUMPs collision detection I think, since I didn't know how to go about doing boid simulation).
A few days later, I had made this: A really simple top down shooter with boid AI.
From my old version, I remember it starting to drop frames when there were 10+ zombies on screen. In this one, I can get 800~ zombies on screen without lag (although, spamming bullets will cause FPS to drop to 30 - I still need to figure out a better way of checking if bullet is hitting zombie other than looping through all of the zombies and checking each one).
It's not much and is mostly for my university portfolio but I thought the whole boid flocking was p cool.
Github source: https://github.com/badf/zomboid
The boids are slightly hardcoded to be zombies but the basic functionality for generic boids that fly around the screen is still there and you could probably use boid.lua & flock.lua in your own games.
For some reason I couldn't get the game to run as a .love file so you'll have to deal with it being a .rar. Sorry.
Show off your games, demos and other (playable) creations.
1 post • Page 1 of 1
- Zombie shooter.rar
- (6.19 KiB) Downloaded 68 times
Users browsing this forum: Bing [Bot] and 4 guests