This site requires JavaScript, please enable it in your browser!
Greenfoot back
TheGoldenProof
TheGoldenProof wrote ...

2019/4/2

Best way to coordinate a bullet hell?

TheGoldenProof TheGoldenProof

2019/4/2

#
I'm trying to make a bullet hell game (similar to the main touhou games), and I've procrastinated making the actual game play as long as I possibly could. I have the main menu and stuff finished so now i have to make the actual game. What would be the best way to do this? what would be the simplest, shortest way to coordinate when bullets and enemies should enter the screen? do i need like 500 things to check a timer and determine whether to add each enemy? how do most bullet hells work in that regard?
Super_Hippo Super_Hippo

2019/4/3

#
You will have a timer so you know when to add enemies. Afaik, the enemies themselves have their shooting behavior, so they decide when to shoot and what bullets. The bullets will probably just move straight in different speeds / images. So you will need at least 3 Actor subclasses: One for the player controlled object. One for the enemies. One for the bullets. On top of that, you probably want to have health/life and score counters. I have a little game like this on the site, but it seems like it is outdated and can't be opened: Space Shooter Maybe I can update it to the newest version. Edit: I just updated it. Lags a little bit in the HTML5 version, but at least it is working at all. In my game, there is no strict rule like "if timer is at xy, then spawn this enemy". The creation of enemies is random, but the chance that one appears and what enemies can appear depends on how long the game is running already. (Only exceptions are that one enemy appears right at the beginning and the boss and his "friends" which appear at a specific time.)
TheGoldenProof TheGoldenProof

2019/4/3

#
That was my plan on how to do it. Have spawning patterns/random spawns and those entities spawn bullets in patterns, maybe spawn enemies ever x frames for y amount of time until a boss. it looks like Its going to be along tedious process no matter what.
Super_Hippo Super_Hippo

2019/4/3

#
My game doesn't have that much code. Ok, it isn't really complex, but the idea is that you don't make it more messy than it has to be. For example I only have one class for all enemies (except the boss). I only pass a parameter to decide which one should be added (general type, what it fires and how fast it fires). So you don't need a crazy copy&paste festival for every different enemy/bullet you want to add.
You need to login to post a reply.