Sign in to follow this  
marcusz

2D player controls joypad/keyboard

Recommended Posts

Hi! My game is 2D space shooter where you control a little space ship and you see the world from above and explore in all directions. So far the player has controlled the space ship like in Asteroids: [rotate CW] [rotate CCW] [accellerate] [deaccellerate] [Shoot]. I don't like it. Too hard. You get the radio-controlled-car problem when your ship points downwards - the controls feel reversed. The game can be played either via the computer keyboard or a joypad, so I have plenty of buttons, but I want controlling the ship to be easier than Asteroids so I can't use _that_ many buttons for steering. These are the methods I can think of: 1) Asteroids: too hard! 2) Defender / SpaceTripper: very nice, but what about going north/south? 3) PacMan: easy but limits directions to four directions - left/right/up/down (via cursor keys) - which isn't enough Questions: 1) What other ways are there that I've missed? 2) What is your favorite way for this kind of game? 3) Any games I should check out for inspiration? Any help much appreciated! /Marcus

Share this post


Link to post
Share on other sites
Gyruss was a Tempest-like shooter, in that you were fixed to a perimeter and always faced inward. In the home computer version you moved toward the side of the screen you pressed the joystick toward, and stopped moving toward that side when you released, so you could move just part of the way. This was more akward than a clockwise / counter-clockwise arrangement in this case, but something similar may actually make more sense for an Asteroids-like game.

Share this post


Link to post
Share on other sites
Gamepad:
Are you planning on using the D-pad or mini-joysticks? I think for this type of game it would be easier to use the mini-joystick axes values to determine direction, which unlike the D-pad wouldn't be limited to 8 directions. It sounds like your ship movement is similar to Star Control's. What I would suggest is assigning accelerate to a button and use the mini-joystick or D-pad to point in the direction you want to go. This way, you could do things like accelerate in one direction, then turn around with accelerate, and shoot behind you.

Keyboard & Mouse:
I think this type of game is more suited to a gamepad, but if I would use a mouse & keyboard, I would try out a Diablo-esque system. Use the mouse to point in the direction you want to go and use a keyboard button for accelerate/brake.

Share this post


Link to post
Share on other sites


I would keep the current controls but add on 360 degree acceleration points (or at least octoganal points).

Basically repeat the code you have for acceleration at each point and beef up your deceleration.

You could do this with an array to keep all the directions and computations in one neat function.

Share this post


Link to post
Share on other sites
Are you using the UP arrow to accelerate? To get rid of the reversy feeling you should make Accelerate a different key like the space bar.

Share this post


Link to post
Share on other sites
Thanks for all your input! Much appreciated! I will consider each of your suggestions.

I found some info on Gyruss:
http://www.klov.com/game_detail.php?letter=&game_id=8060

(sorry, no idea how to make it clickable, it's not in the FAQ...)


I found three other methods:

1) Area 2048 - the ship always moves leftwards when you press left button etc. - just
like Defender and SpaceTripper - BUT: the program automatically handles rotating your ship to point at the closest enemy! Player needn't rotate it!

Area 2048:
http://www.megagames.com/news/html/freegames/area2048.shtml


2) Have not seen this in any game: absolute cursor keys/joypad steering but with timing.
When you press the left-button the ship rotates so it points leftwards (etc.) - but
this takes a while. If you release the left-button, the ship stops rotating and
points in an in-between direction. Separate accellerate and deaccellerate
buttons are needed - moves the ship in the direction it points.


3) Robotron/Mutant Storm - one set of buttons moves the ship in an absolute
direction (8-way left-button moves left etc.), another set points the ship in, possibly _another_
direction.


SpaceTripper and Mutant Storm:
http://www.pompomgames.com/


BTW: try SpaceTripper - I've become addicted to this game!

I'll try to check out Star Control's method somehow.


Thanks!


/Marcus

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this