Intermediate level SHMUP example project with efficient colision detection?

A place for people with an interest in developing new shmups.
Post Reply
missilestriker
Posts: 1
Joined: Sun Dec 15, 2024 7:55 pm

Intermediate level SHMUP example project with efficient colision detection?

Post by missilestriker »

Hi, I'm looking for a barebones "intermediate" level example project for reference.
I've experimented with bevy_spatial, which has an API limiting the tree refresh rate to once a second.
https://github.com/Lommix/quadtree_boid_simulation was promising, although having the tree update & physics run with a dynamic timestep, even having only 10 objects on the screen bouncing around, I saw graphical "tears".

I played Blue Revolver recently, and was impressed with its performance. I saw no slowdown or tearing. I learned it's written in LOVE2D. I've searched some for a good example project, have not found anything recent.

I'm looking for a sample project that includes:

* Performant projectile movement (hundreds of bullets on screen and moving)
* Performant Collision detection - at least, distance checking, but something smart, like a k-tree, so every bullet isn't checked against every other object constantly, and subsections of the trees are updated immediately as needed, for accuracy.

Does such a project exist, do you know of it?

I wrote a few games in JS many years ago, without regards to performance. I experimented with porting 1 to C, but I'm looking for a better development environment. I have bevy in mind because I've heard good things, but I struggle to find the kind of project I need. I could write Lua for LOVE2D, with a functioning example.

I don't want to re-invent the wheel. I'm trying to avoid taking the vulkan tutorial and build my own system from scratch in C++.

I appreciate your advice and project recommendations, thank you.
User avatar
Krushal
Posts: 79
Joined: Sat May 04, 2019 4:14 pm
Location: Hyperspace

Re: Intermediate level SHMUP example project with efficient colision detection?

Post by Krushal »

Are you sure you need "fancy" collision detection?
I was experimenting with Love2d recently and could push 10,000 bullet sprites before any slowdown occurred (fixed-timestep model, minimal logic, just naive collision detection with walls).

Some of the standard Lua modules (libraries) for C.D. are Bump, HC and Strike.
Awesome-Love2d is a good resource.


Also worth knowing is that LuaJIT (used by Love2d) can integrate C code for performance-critical tasks, by means of the FFI library.
A project that heavily utilises this is LuaSTG (e.g. https://github.com/KaleiAlma/LuaSTG-Evo).


Since you mentioned Blue Revolver, interestingly every hitbox is the same size, presumably to optimise C.D. routines.


Not exactly what you were asking for, but hopefully some of that helps.
oab
Posts: 70
Joined: Tue Mar 19, 2019 4:14 am

Re: Intermediate level SHMUP example project with efficient colision detection?

Post by oab »

missilestriker wrote: Sun Dec 15, 2024 8:09 pm Hi, I'm looking for a barebones "intermediate" level example project for reference.
I've experimented with bevy_spatial, which has an API limiting the tree refresh rate to once a second.
https://github.com/Lommix/quadtree_boid_simulation was promising, although having the tree update & physics run with a dynamic timestep, even having only 10 objects on the screen bouncing around, I saw graphical "tears".

I played Blue Revolver recently, and was impressed with its performance. I saw no slowdown or tearing. I learned it's written in LOVE2D. I've searched some for a good example project, have not found anything recent.

I'm looking for a sample project that includes:

* Performant projectile movement (hundreds of bullets on screen and moving)
* Performant Collision detection - at least, distance checking, but something smart, like a k-tree, so every bullet isn't checked against every other object constantly, and subsections of the trees are updated immediately as needed, for accuracy.

Does such a project exist, do you know of it?

I wrote a few games in JS many years ago, without regards to performance. I experimented with porting 1 to C, but I'm looking for a better development environment. I have bevy in mind because I've heard good things, but I struggle to find the kind of project I need. I could write Lua for LOVE2D, with a functioning example.

I don't want to re-invent the wheel. I'm trying to avoid taking the vulkan tutorial and build my own system from scratch in C++.

I appreciate your advice and project recommendations, thank you.
Could you show the code that you use for doing collision detection? Maybe it has an issue with the code.
A few hundred projectiles should not cause a problem.

Or have you tried using a k-d tree for filtering bullets around objects that you want to check collision? (https://crates.io/crates/kiddo)
I am making a horizontal shmup game: WDF

Released USG, Flesh and miniStrike
Post Reply