Wanna do my own shoot em up - Outline

Started by
5 comments, last by Sivak 14 years, 1 month ago
Hey all. This is something I've wanted to do for a while, but I guess I'll bring my thought process thus far to here. This game will be a bullet hell that's vertical scrolling. I'm intending to do it using Dev C++ and will probably use SDL, though may consider something else. I've made games in ASM before, so doing one in C++ will be a little new to me, but I definitely have the concepts under my belt. It'll just be learning how to do the same material with new things. I've done the typical assignments in college, so I know about C++ syntax and whatnot. Now then, what I'm wondering would just be some general ways things tend to be handled in these type of games. I know the character you play as will generally have a small hitbox but a fairly sizable sprite around it, as will the bullets that can hurt you. Enemies will have a bigger hitbox in relation to your shots, etc. What I wonder, mainly, is typical methods of enemy spawning. The way I was thinking of doing this is have some timer variable increase every frame and using a lookup table, spawn an enemy once that time is reached from whatever location and just keep doing this until you reach the end of a stage. Another thing would be handling the enemies/bullets... I'm thinking you'd almost have to use vectors for these... I don't know. Does it sound like I'm on the right track in terms of the thought process thus far? Thanks.
- Sivak
Advertisement
Forget about Dev-C++. It is bugged and unmaintained for years. The last version is dated 2005-02-22 and it was a beta version. It also doesn't work on Windows Vista (and Windows 7 I suppose). A better IDE would be Code::Blocks if you like opensource or Microsoft Visual C++ Express (a reduced and free version of Microsoft's IDE).

Players play the game at different speeds. A solution based on time isn't therefore quite ideal. A possible solution can be to separate your level in regions, when the player leave a region the enemies of a further region will be spawned and the enemies you leaved behind will be destroyed. Other solutions are also possible. You can for example have "spawn points" activated when the player is near enough.
I created a game just like yours, except it was a side-scroller. Basically, I created a simple script I would create for the levels, and the scripts were what enemy would come onto the screen, when (in seconds from the start of the level), and the location and starting variables (speed, direction, health, etc.)

My game would load up the 1st level, and store the data in a list, by time enemy's come onto the screen. So, the game plays, and each loop i check the time versus the time to release the next enemy. When the time hits, I move the enemy from the List and place him in the OnScreen List, and begin processing it. i also keep a list of the bullets on the screen, both enemies and my own (they each have their own attributes), and update it based on a speed (which is pixels per second).

For the hit-boxes, I use per-pixel collision detection, by creating a bit-map of the objects that can be interacted with. You certainly don't have to go to that level, a simple bounding-box would be OK, I just wanted to see if I could do it :).

You can take a look at my game and the source if you like. it written in C, but it's fairly OO based.

Alpha Game Link (the game itself)

Alpha Source

Hope that helps. It was made long ago (2000/2001), but it was alot of fun, I just got tired of creating new levels and enemies. Good Luck!

My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)

Might I recommend trying SFML rather than SDL? it your just doing a simple Bullet Hell, SFML would be perfect since its pretty easy to learn and hardware excellence so it will easily handle 1000's of bullets.
-Jawshttp://uploading.com/files/eff2c24d/TGEpre.zip/
Thanks for the replies folks. I've never heard of SMFL. The main reason I chose SDL is because I've heard of it and know of some who have used it, but anything that's easier is welcome.

I haven't really gotten too far off the ground yet. Getting this all to even compile in VC++ has been ridiculously hard and I've taken some time away from it.

I think I'll expand on my post on what I want to do: I want to have PNG support. I know a few folks who have made some files that allegedly make the process of handling such files easier, though I haven't gotten far enough yet to really see. I like PNGs due to them being fairly versatile.

SDL also stated OpenGL support, which had features such as rotating graphics (aimed bullets rotated would be cool).

So, that's why I just used SDL... It had the support, but I'll look into SMFL when I can. Thanks!
- Sivak
Using SFML you can easily load and save PNG files. It is hardware accelerated (it is based on OpenGL) so you can probably get good performance using its 2D API. But you can also use the OpenGL API if you want to. You can find better information on its main site: SFML.
Hey again. Well, this SFML is already leaps and bounds over SDL. I've already gotten a preliminary graphical screen going.

http://img441.imageshack.us/img441/3633/shmuppyprelim.png

The main BG and 2 other objects for the Score captions work nicely. It even has the PNG transparency, so that's even better.

Thanks again. Now the real fun begins!
- Sivak

This topic is closed to new replies.

Advertisement