It's been a while! Here's the release version. I think it's pretty reasonable. I didn't manage to implement bucket sorting, but if I revisit the concept that's something I want to tackle.
All of the buttons are now functional....I think I am going to call this game Pico Zombie Smasher. I tried to wrap my head around the bucket sorting thing, but it's beyond me...for now.
Ninja-edit: There are some bugs that have cropped up as a result of the new Dist()...but I hope to squash them given time.
I used Fred72's advice for distance checking (thanks for the help, Pico-8 Discord!!) and received a significant performance boost! I can fit more entities onscreen at any given time, now. The bucket sorting thing (I think that's what it is) is another beast entirely...hopefully I can implement that as well.
At this point, I feel like this is pretty obviously a loose demake of Atom Zombie Smasher...so I may do a play off of that for the final name. The gameplay in this version is nice, I feel like. It will probably be better once I implement fred72's advice.
Now you can set down a signal, post soldiers and create barricades. I'm quite pleased with how this is looking, even if the entity counts are lower than I would've hoped.
This is a neat little zombie apocalypse sim thing. I think I'm going to try and make it into a proper game.
Couple of remarks to speed up your game:
- don’t use sqrt for distance check. Comparing with dxdx+dydy<r*r works equally well for much less cpu
- to further reduce unnecessary collision checks, use a bucket map. See my code on this thread: https://www.lexaloffle.com/bbs/?tid=29466
@freds72: thank you for playing! I really appreciate the advice on how to speed up the game. I've toyed with this kind of rts strategy-ish game stuff for a while but always ran up against CPU limits, so hopefully this will help me get past that.
This is nothing short of ASTOUNDING, Remagamer !! I am very impressed. I am especially interested in the method you are using for the citizens. It's like you're really in a helicopter watching people from above.
You've earned this:
Here's a star ⭐
and favorited. ❤
You're very welcome, Remagamer. Moving objects in actual directions from SIN() and COS() is pretty new stuff to me. I can see how you can get some very interesting movements out of it.
At some point I'll have to sit down and write what my Dad did years ago. A simulation of civilization. Had people milling about, but if someone got too crowded by others, they turned RED.
Red would then kill the green. Green turns to yellow. Too many greens see yellow they turn BLUE, which kills red. And the cycle continues.
[Please log in to post a comment]