Author Topic: Shmup (Touhou) mathematical pattern research  (Read 4837 times)

Shmup (Touhou) mathematical pattern research
« on: November 21, 2015, 03:42:48 PM »
Hello and greetings to all of you,

I am busy with my school project with the following research question:  What types of mathematical bullet patterns (Touhou games) exist and how can they be implemented in Unity.

Unity is a 2/3d game engine that is being used in school to learn us the process about how to make a game.
The reason I have chosen for this subject is because I am busy making a shmup game and I want to look at the more difficult part of the game itself namely the bullet patterns.

Now as for the main issue.
I am in the process of researching different aspects of mathematical ways to spawn bullets in a pattern.
Does any of you have a way that is not in this list or have more input about some of these solutions?

Subjects I already have researched are:
- Lindenmayer System (L-system)
- Fractals
- Cos / Sin
- Built in Unity (eulerAngle, instantiate and object pooling)

Subjects I want to research
- Twirls (not much to find except for a image filter option :P )

I am very happy with any sort of input. thx for your help!

Uruwi

  • Nightmare of Torrential Precipitation
  • 478 million goober
Re: Shmup (Touhou) mathematical pattern research
« Reply #1 on: November 21, 2015, 08:17:10 PM »
Parametric and polar equations.
Patterns aimed at the player.
foo = foldl $ flip ($)
Highest difficulty 1CCed for each game, by shot type in the original order. (-: never 1CCed on any difficulty, or never used; E: easy, N: normal, H: hard, L / U: lunatic / unreal.)
EoSD [NNNE] PCB [EE--N-] IN [NEEE + Ex Border] PoFV [Mystia N, Mystia E no charge] MoF [EN--H- + Ex Marisa B] SA [N-----] UFO [----EN] TD [NENE] DDC [EE-EHE + Ex Marisa B & Sakuya A] LoLK [PD --N- Legacy ---N] EE [N- + Ex Yabusame] EMS [N-- + Ex Yabusame] RMI [NHN + Ex YaoSuku]
Avelantis (demo) Easy YuukiB 426,077,200

Re: Shmup (Touhou) mathematical pattern research
« Reply #2 on: November 21, 2015, 11:34:23 PM »
First thx for the reply! I looked it up and aren't both of them based on Sinus and Cosinus?

When I look at them the kind of give those feelings off. Maybe I need to dig deeper into this.

Edit:
after watching the diffirents I have some understanding of the basic

Parametric is calculating the x and y based on velocity and gravity
Polar equation is how to get to a point on the (x,y) based on the calculation on of the degree with sin, cos or tan

hope i got this right.
« Last Edit: November 22, 2015, 08:01:23 AM by Helepolis »

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: Shmup (Touhou) mathematical pattern research
« Reply #3 on: November 22, 2015, 02:01:55 AM »
ZUN really only uses basic trig (cos/sin) for majority of his danmaku patterns, looking through the ecl scripts (after carefully examining what does the actual danmaku part), he uses very simple approaches to accomplish the job. Sure these things can technically be used, much like anything that involves graphing, but the most important part is what gets the job done the easiest and simplest way (as well as fastest for the game to process something that excessive trig, and things like cardioids, polar equations, etc.. aren't particularly known for).

Just my 2 cents just incase you think these extra methods are required for danmaku making.

Re: Shmup (Touhou) mathematical pattern research
« Reply #4 on: November 23, 2015, 11:41:20 AM »
ZUN really only uses basic trig (cos/sin) for majority of his danmaku patterns, looking through the ecl scripts (after carefully examining what does the actual danmaku part), he uses very simple approaches to accomplish the job. Sure these things can technically be used, much like anything that involves graphing, but the most important part is what gets the job done the easiest and simplest way (as well as fastest for the game to process something that excessive trig, and things like cardioids, polar equations, etc.. aren't particularly known for).

Just my 2 cents just incase you think these extra methods are required for danmaku making.

Unfortunately the subject is about to research the possibilities. So saying this is the best way while it's the only way you know or is known by many doesn't make it a acceptable research document.
But you do have a point! Given the way it is I will use the best and fastest way to produce patrons based on what I research. It won't be something like polar equations or that. But if it gives me some results it won't hurt to use it!

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Shmup (Touhou) mathematical pattern research
« Reply #5 on: November 23, 2015, 07:39:45 PM »
The main point Ultima is making is that you don't need anything fancy to make good danmaku - in the Danmakufu community at least, we've come to the point where originality and creativity are key.

Yes, you *can* use extremely complicated math to develop danmaku, but any practical application of given math will require further manipulation of the given forms in order to account for originality, effect, user experience, aesthetics, etc. Personally, the more complicated the math, the less likely people will like it because the essence of many mathematical curves is not necessarily compatible with the overarching themes of danmaku.

From a research perspective, you obviously want to explore possibilities outside of basic trigonometry and standard acceleration, which, unfortunately, is the foundation of danmaku in Danmakufu. Your question states that you specifically want to present a theory in the scope of Unity, but that does not change the fact that your focus is simply spawning bullets in mathematical patterns. Spawning is limited. What transformations and the way you spawn the bullets is what really creates 'good' danmaku.

Of course, I'm just rambling from the perspective of someone who has seen so much ineffective danmaku that of course, I am speaking from an application standpoint rather than simple theory. But at least in Danmakufu, parametrics, polar equations, rotation matrices, and other trigonometry-based methods of spawning bullets are the most complicated mathematics-based patterns usually get.

Sorry I can't be of more help.

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: Shmup (Touhou) mathematical pattern research
« Reply #6 on: November 25, 2015, 04:15:20 PM »
Unfortunately the subject is about to research the possibilities. So saying this is the best way while it's the only way you know or is known by many doesn't make it a acceptable research document.
But you do have a point! Given the way it is I will use the best and fastest way to produce patrons based on what I research. It won't be something like polar equations or that. But if it gives me some results it won't hurt to use it!


What I mean is just, these methods of spawning and plotting the bullets on the screen can't really help. Sure you can use them but what comes after that? That is what is really important and would make a better research topic than "I can use polar equations to put bullets on the screen". I suggest studying Touhou games and pay close attention to how his danmaku patterns work, and the many different things he does with danmaku that branches far out from just putting them on the screen.

A question to think about, what is the difference in danmaku design if the bullets do the same thing regardless of how you spawn them? How do these methods help in creating interesting danmaku designs?

Just some stuff you need to take into consideration while you conduct your research, ultimately it is up to you how you do it but this is just my suggestion.