Theory behind bullet trajectories in shmups?

Started by
3 comments, last by LorenzoGatti 13 years, 8 months ago
I was reading a text about the mathematical theory of points rendezvousing to a common point or spreading over an area and then I thought that something similar is happening in (some) shoot em up games with the bullets. See for example Touhou game series (e.g.
or
).

I was wondering if there is actually some math behind those bullet trajectories and tried to look around the Internet but without any results. Some of my friends pointed out that it is most likely just pure trial and error but before I trust that it is just that I thought I'd ask from some game dev forum about it.

So is there any math theory behind the trajectories and if so, any ideas where I could find out more (e.g. is there a term for it I could search with)?
Advertisement
I think most patterns are hand-crafted by combining linear movement with other more interesting movement such as bezier curves or sine waves (at least that was how I was doing it). If you want something more formal or just want some ideas then you should probably check out BulletML.

Hope that helps.
Bullets in this type of game are basically particles -- their movement, color shift and general behavior is all a function of time, typically.

In short, lots of particle bullets + slight deviations in spawn properties leads to quite impressive, immergent patterns. As a simple example, assume a particle emiter at some position, pointing in an initial direction. Now, imagine that this emitter fires a single linear-travelling particle, turns 5 degrees, fires another identical particle, turns 5 degrees... repeat ad-nausium. The effect this produces is a "spiral of bullets" -- already this effect, taken as a whole, seems much more complicated than the sum of its parts would lead you to believe.

Throw in some color-shifting effects, some non-linear acceleration, some spline-like paths or sinusoidal motion, or even some "swarming" behavior for sub-particles in some combination -- put a couple identical emitters at different places to crank up the combinitorial complexity of the effect and suddenly the combination of just a few simple things becomes something that appears to have awe-inspiring complexity.

Think of the patterns produced by a koleidoscope, for example -- you only actually see about 1/6th of the image which is unique, and the rest of the complexity is just mirroring that image. The effect is the same -- the visual complexity appears much higher than the sum of its unique parts suggest.

throw table_exception("(? ???)? ? ???");

"already this effect, taken as a whole, seems much more complicated than the sum of its parts would lead you to believe."

Now that I think about it, that might actually be true and most likely is for many cases.

"If you want something more formal or just want some ideas then you should probably check out BulletML."

Thanks. Reading the BulletML documentation made me understand how those bullets are composed of very simple elements.
Another thing you can vary is the speed of plain dumb bullets: faster ones will overtake slower ones at fixed distances from the source, creating a wave interference pattern that's independent of where they are aimed.

Omae Wa Mou Shindeiru

This topic is closed to new replies.

Advertisement