Advertisement

Approaches to Gravity in Simple Space Game

Started by January 28, 2009 07:54 PM
13 comments, last by kseh 16 years ago
I've been working on a space game prototype (think Escape Velocity or Diablo with a starship) that features very simple controls (WASD/mouse), an isometric (slanted top down) view, Newtonian movement and gravity. I added gravity because it's something I really like and (to me) it helps give the feeling of being in space, despite how simple the view. But things like accelerating then reversing direction to decelerate or orbiting not very intuitive. (For example, if you wanted to orbit closer on one side of a planet, you actually have to slow down on the opposite side.) What do you think about these sorts of aspects in non-simulator space games? I'm considering a few things: * Making the movement optional (default no gravity and you stop when you stop thrusting) * Offering a good "space movement and orbiting" tutorial * Minimizing the effects of inertia and gravity (by making ship thrust more powerful) * Offering difficulty levels / expert modes * offering "automatic circular orbit" upgrades to the ship as an incentive to level One glaring problem is that gravity is pretty much fluff: There's no planetary collision (remember the view is essentially 2d) and you have no real incentive for mastering orbits of different types. It can also be very hard to establish stable orbits let alone dock with something that's moving in orbit. I've been considering adding "pseudo effects" for collision, such as atmospheric heat damage or "hull stress" and rewards for orbiting within certain bounds-- for instance, maybe if you keep the ship within two super-imposed rings around the planet, you get a scanner or fuel bonus. Anyway, thoughts on this appreciated.
--------------------Just waiting for the mothership...
I'm not sure what will work and what won't from just a text description. I think this sort of gameplay decision can only be accurately determined through prototyping. It should be pretty straightforward to demo 2D ship movement and a range of different gravity options.
Advertisement
FWIW I have been wrestling with this same issue in a 3D space sim..

Gravity complicates a lot of things, not least CPC AI.

But like you I love the idea of a nice orbiting tutorial, and the possibility of atmospheric resistance, debris from battles entering the atmosphere and burning up, and landing on small moons taking some skill...

I have the option to turn it off in the sim at the moment.

The only other solution I came up with was to keep the Newtonian model but make gravity a much much weaker effect until you are well into trouble and are going to crash / burn up anyway.
So effectively only when you are close to planets does it really have a noticeable effect, and I plan to compensate for that with some pretty rudimentary auto-pilot functions which will get you into a geo-stationary orbit.

That way it becomes a minor irritation at worst, and simply makes paths close to large bodies a little bit 'curvey'.

Whatever happens from my POV very very good HUD information is a must so you can see the effect happening.
I also have some very clear on screen indicators that let you know you are falling into a gravity well and alert you to do something about it.


Feel free to 'rate me down', especially when I prove you wrong, because it will make you feel better for a second....
Quote:
Original post by scratt
The only other solution I came up with was to keep the Newtonian model but make gravity a much much weaker effect until you are well into trouble and are going to crash / burn up anyway.


I've been playing with lower the effects of gravity as well, along with the "active area" of gravitation. Gentle gravity is a lot easier to deal with, so maybe that can be an option.

Quote:

So effectively only when you are close to planets does it really have a noticeable effect, and I plan to compensate for that with some pretty rudimentary auto-pilot functions which will get you into a geo-stationary orbit.


That's a good idea. I haven't been able to actually get geo-stationary because the scale of things is so small, but I'm still playing with this.

Quote:

Whatever happens from my POV very very good HUD information is a must so you can see the effect happening.
I also have some very clear on screen indicators that let you know you are falling into a gravity well and alert you to do something about it.


Do you have any sort of indicators that forward predict your flight path, say maybe in a MFD window or radar view? At the moment I'm planning on providing trails showing where you've been, and possibly indicators for where targets and your ship are heading. This helped me to learn orbital mechanics in an old educational game I once played, so it may help those new to the idea as well.

--------------------Just waiting for the mothership...
Quote:
Original post by WavinatorDo you have any sort of indicators that forward predict your flight path, say maybe in a MFD window or radar view? At the moment I'm planning on providing trails showing where you've been, and possibly indicators for where targets and your ship are heading. This helped me to learn orbital mechanics in an old educational game I once played, so it may help those new to the idea as well.


Absolutely. Do you remember the green boxes in the HUD that the lander flew through in Aliens?
I am working on something like that for approach.

Also in the HUD as well as the instruments I am showing orbital curves.

One thing I really hope to introduce into the gameplay is limited fuel, and with a nice interface being able to play with courses so that you can slingshot around planets and moons to achieve an objective... In my minds eye I can see all sorts of sexy splines with grab points and things in a top down plotter on the HUD to do this.... but that is a way off yet.. :)
Feel free to 'rate me down', especially when I prove you wrong, because it will make you feel better for a second....
My current line of thinking is a pretty radical departure from WASD controls. Instead of showing aliens-style trajectory boxes and asking the pilot to fly through them, I'm experimenting with a piloting UI which allows you to pilot by laying out the trajectory boxes.

I currently have room in a part-time paid position working on this exact prototype topic. If you are at all interested, send me an email davidj@gmail.com.
Advertisement
Quote:
Original post by jeskeca
My current line of thinking is a pretty radical departure from WASD controls. Instead of showing aliens-style trajectory boxes and asking the pilot to fly through them, I'm experimenting with a piloting UI which allows you to pilot by laying out the trajectory boxes.


That's the idea behind the splines and HUD stuff I also mention...

WASD, what's that!?!? ;) If you haven't got a joystick with a billion buttons you aint playing my game!! ;)

Feel free to 'rate me down', especially when I prove you wrong, because it will make you feel better for a second....
scratt - yes, I see that we're thinking along the same lines. Your analogy to splines with grab handles is a good one. I'd also like to experiment with allowing the user to move the timeline, so they can draw paths through objects which are moving by seeing where the objects will be at future points in time.
Quote:
Original post by jeskeca
scratt - yes, I see that we're thinking along the same lines. Your analogy to splines with grab handles is a good one. I'd also like to experiment with allowing the user to move the timeline, so they can draw paths through objects which are moving by seeing where the objects will be at future points in time.


Yummy. Orbital mechanics too...

It's all possible. I do already have orbits running for planets etc.

But this poses another problem. The speed of movement and the scale of things is gonna get very confusing for the player.

So I am still in two minds about whether to go that route, or fudge it with very slow orbits, or none at all...

Certainly in my version I am going to play with it, but whether it actually makes it out into the wild I don't know.

But yeah, I love the concept. At the end of the day, for me on my project anyway, it's finding that balance between being able to do some running and gunning, but also having to do some thinking.. Too much one way or the other and you lose one.. Too much of both and it just gets frustrating...
Feel free to 'rate me down', especially when I prove you wrong, because it will make you feel better for a second....
This is a bit off the subject, but you mentioned in passing that you were considering "Making the movement optional (default no gravity and you stop when you stop thrusting)". One way to read this is that you don't intend for your ship movement to be inertial (i.e. ships that do not thrust eventually stop regardless of where they are). I'd like to strongly suggest you not do that, since in my opinion it'll really ruins immersion. Moreover, it makes it really hard to conduct combat with any ships that have forward-facing fixed guns, since you have to be flying into your opponent to shoot at them (in contrast, inertial ships can fly to the side of their opponents, then turn to face them and shoot as they drift by).
Jetblade: an open-source 2D platforming game in the style of Metroid and Castlevania, with procedurally-generated levels

This topic is closed to new replies.

Advertisement