About speed setting in 2d shmup games

This forum is for discussing shmup development, tools, engines and techniques.
Posts: 11
Joined: Wed Nov 02, 2016 2:52 am

About speed setting in 2d shmup games

Postby xmzhang » Tue Feb 07, 2017 12:20 am

I am doing my own 2d shoot them up game, and I really have no experience, really hope someone kindly give me some advice. Now I meet a problem about setting speed in my game, exactly the player speed and bullet speed. My game screen is 600 px * 800 px, player hit box is 8 px * 8 px. FPS is 60.0, I set player speed 4 px(or 5 px) per frame, that 240 px (300 px) per second. and the bullet speed is 5 px to 7 px per frame, that is 300 px to 420 px per second. I am not sure it is OK or not, or I am totally wrong in this way.

Site Admin
User avatar
Posts: 233
Joined: Thu Jul 26, 2012 2:32 pm
Location: Melbourne

Re: About speed setting in 2d shmup games

Postby monoRAIL » Wed Feb 08, 2017 4:32 am

Those numbers sound pretty good. It's usual for the enemy bullets in shmups to be a similar speed to the player, with some of them faster and some of them slower. The player's bullets are usually extremely fast, 5 or 10 times faster than the enemy bullets. There are no exact rules though, you just have to decide what feels right for your game.

Remember to keep the player's speed the same when traveling diagonally (by multiplying the horizontal and vertical motion by 0.7).

Posts: 11
Joined: Wed Nov 02, 2016 2:52 am

Re: About speed setting in 2d shmup games

Postby xmzhang » Wed Feb 08, 2017 6:07 am

monoRAIL wrote:Those numbers sound pretty good. It's usual for the enemy bullets in shmups to be a similar speed to the player, with some of them faster and some of them slower. The player's bullets are usually extremely fast, 5 or 10 times faster than the enemy bullets. There are no exact rules though, you just have to decide what feels right for your game.

Remember to keep the player's speed the same when traveling diagonally (by multiplying the horizontal and vertical motion by 0.7).


many thanks for your kind suggestions, I multiply the motion by 0.7071 when traveling diagonally ^ v ^ . I want to imitate Dodonpachi, make a bullet hell pattern shmups, the player should move among a lot of bullets. I am worried about the speed is wonky and make my game brutally hard. Your words have really put my mind at rest :)

Site Admin
User avatar
Posts: 233
Joined: Thu Jul 26, 2012 2:32 pm
Location: Melbourne

Re: About speed setting in 2d shmup games

Postby monoRAIL » Thu Feb 09, 2017 2:48 am

When you have a prototype working with the bullets moving, post a video - even if it doesn't have any final artwork it's still useful to judge the relative speeds. Guessing from the raw numbers is never as good as seeing the thing in motion.

Posts: 11
Joined: Wed Nov 02, 2016 2:52 am

Re: About speed setting in 2d shmup games

Postby xmzhang » Fri Feb 10, 2017 1:47 am

monoRAIL wrote:When you have a prototype working with the bullets moving, post a video - even if it doesn't have any final artwork it's still useful to judge the relative speeds. Guessing from the raw numbers is never as good as seeing the thing in motion.

Sure! I will post my video, there is an embarrassing situation that I can not easily access to youtube, google, etc. Our country is not good in these respects. As you said, there are no exact rules about speed, so I should check it by myself first. When I finished my code, I will upload my work in ‘Show Case’ to ask for guidance :D . As you predicted, I really meet problem on artwork, I just find pictures on opengameart.org, but it still cost me a lot of time to deal with them.

Site Admin
User avatar
Posts: 233
Joined: Thu Jul 26, 2012 2:32 pm
Location: Melbourne

Re: About speed setting in 2d shmup games

Postby monoRAIL » Fri Feb 10, 2017 3:41 am

Here are some free pixel-art ships from the old forum. http://cokane.com/shmupdevarchive/index ... pic=1693.0

Posts: 11
Joined: Wed Nov 02, 2016 2:52 am

Re: About speed setting in 2d shmup games

Postby xmzhang » Fri Feb 10, 2017 12:28 pm

monoRAIL wrote:Here are some free pixel-art ships from the old forum. http://cokane.com/shmupdevarchive/index ... pic=1693.0

Thank you! :D well, monoRAIL, one more question. Now I use keyboard to control the player moving in my game. For example, when get key_w KEYDOWN event, the player would move up (direction [0, -1]), when get KEYUP event (key_w release), the player would stop (direction [0,0]). For myself, the fast speed I can tap a key is in about 50 ms (time between KEYDOWN and KEYUP), in 60.0 FPS, it is about 3 frames, my player speed is 5 px per frame, so the shortest delta distance I can move each time is 5 * 3 = 15 px, if the bullet gap is 10 px, it is OK to move in theoretical analysis (10 > 5), but I can not move my player, because the shortest delta distance for me is not 5 px, it is 15 px, because I can not tap a key in one frame. I do not know whether someone who are good at shmup games can have one frame control, or I have to consider the distance between bullets when I creat bullet hell mode.

Site Admin
User avatar
Posts: 233
Joined: Thu Jul 26, 2012 2:32 pm
Location: Melbourne

Re: About speed setting in 2d shmup games

Postby monoRAIL » Sat Feb 11, 2017 3:38 pm

Again, it's hard to judge without seeing the scale of everything, or some motion. But my initial thought is that when the player taps the key, their ship shouldn't move by more than half its size. So if the ship is 30 pixels across, and I tap the key and it moves 15 pixels, that seems ok. But if the ship is smaller this will feel too fast.

Don't worry about the specific numbers at the start. Just write up the code to get the player and enemies and bullets working, then adjust the numbers to make it feel right once it's playable.

Posts: 11
Joined: Wed Nov 02, 2016 2:52 am

Re: About speed setting in 2d shmup games

Postby xmzhang » Sat Feb 11, 2017 10:47 pm

monoRAIL wrote:Again, it's hard to judge without seeing the scale of everything, or some motion. But my initial thought is that when the player taps the key, their ship shouldn't move by more than half its size. So if the ship is 30 pixels across, and I tap the key and it moves 15 pixels, that seems ok. But if the ship is smaller this will feel too fast.

Don't worry about the specific numbers at the start. Just write up the code to get the player and enemies and bullets working, then adjust the numbers to make it feel right once it's playable.


Many thanks! I get it, and I think I should first finish my first game, I am not writing a game engine (in fact I also don't have that ability), when the game is done, I can check everything by myself. if I put too much attention on these magic numbers, I will never get my work done. :D

Return to Development

Who is online

Users browsing this forum: No registered users and 2 guests