Space Scale Revisited

Blitz3D Forums/Blitz3D Programming/Space Scale Revisited

_PJ_(Posted 2005) [#1]
Okay,Im not too happy cos I just wrote this all out and the ie at work decided to have a random "BillGates Fit".

So, in short.

Space is big, really big (according to Douglas Adams)
Spaceships move fast, but they shouldn't accelerate too quick or they'd be overtaking Einstein riding on his photon.
Spaceship combat wouldn't be much fun if the spaeships can outrun bullets, so bullets need to move faster than the ships (Yes, I would like my bullets to be visible entities, not just a quick linepick)
Collisions require some delicate precision, becasue each spaceship has damage-able areas and extra modular parts. Also HUD sprites & objects need to be pretty darned close. I need a decent camera range, because whoever heard of poor visibility in space? admittedly, there's H-Alpha regions and dark matter, but when a gargantuan space station appears from out of nowhere when the distant stars were still totally visible, this becomes annoying.

Thenthere's physics. Newton forces my hand to write Thrust/mass gives acceleration. Because I am using delta-time functions to maintain multiplayer consistency, I can stick with seconds. Although what is a unit has no real meaning, Blitz units are arbitrary, but the hard bit is trying to maintain a 'safe' kind of ratio.

1:5000 perhaps?

All I know is that the z-buffer is gonna be working like a wh*re's clit*ris! In the previous version of Galactic (and Im suprised none of the playtesters picked up on it, was that every now and then, the fired bullets would suddenly fly backwards at the player, or even go shooting behind!


Rhyolite(Posted 2005) [#2]
Well, dont 'bind' yourself to real world physics - real space combat would be very different to how we see it portrayed in games and movies ;)

Make sure you use 32 bit color depth, this gives you a bigger z-buffer.

A lot of space games still use a 'skybox' for stuff a long way away.

Yes, space is big, really big - but God is even bigger!

Rhy :)


Ricky Smith(Posted 2005) [#3]

All I know is that the z-buffer is gonna be working like a wh*re's clit*ris! In the previous version of Galactic (and Im suprised none of the playtesters picked up on it, was that every now and then, the fired bullets would suddenly fly backwards at the player, or even go shooting behind!


That happens in X2-The Return as well. Quite often you arrive long before your missiles do when travelling at top speed ! Its not a problem because everybody has to slow down in order to combat and its quite acceptable because that's what would happen if you were flying at those speeds.


Shifty Geezer(Posted 2005) [#4]
I'd say don't try to be realistic. 'Frontier' was realistic and it was dull. Often games totally ignore real-world limitations to make for better gameplay. If characters responded exactly as they would in the real world, you won't get double-jumping platform romps nor anyone surving several whacks with a dwarven battleaxe!

Write a game that's fun regardless of whether or not it obeys Newton's or Einstein's aggravating limitations ;)


Andy(Posted 2005) [#5]
http://www.blitzcoder.com/cgi-bin/ubb-cgi/postdisplay.cgi?forum=Forum4&topic=000352

http://www.blitzbasic.co.nz/Community/posts.php?topic=36648


Additionally, you should propably consider using dual pass rendering like suggested in the second link, as it will give you truely astonishing camerarange.

Andy


_PJ_(Posted 2005) [#6]
Thanks for the replies...

Thanks Rhyolite - I think I'll try that, didnt realise it had such an effect. I doubt Il need any higher bit-depth than 16 really anyhow so that's great!

Smiff - Of course, some craft will be able to outrun some missiles, that's all part of the gampeplay and tactics of combat. Bullets on the other hand should (according to physics) have an initial speed which is added to the velocity of the firing craft ensuring they always move faster. And yeah, combat will involve slower speeds than just cruising, especially as I foresee most advantageous combat involves 'pinwheeling' opponents in order to keep them in your sights.

Shifty - Yeah, Frontier was bloomin' awkward because of the realistic physics. Elite was much better!

I am trying to mimic the D.A.N.C.E.R engine (sorry not much information available on this anywhere for the spaceflight which was very playable. The main issues here vs realism are that objects had a maximum speed in space (I give the 'reason' for this as being micro-debris in space being a threat to hull stability at higher speeds!) It resembles the original Elite flight engine with more emphasis on mass-related drag.

This means that small, light craft can turn faster and without losing too much speed, where heavy freighters would take a long time to slow down, accelerate or turn.

Andy - That makes for good reading, but the dual-pass stuff sounds a little techy at the mo. I'l try and knock out a few tests of this sorta thing until I can get the hang of it!


Andy(Posted 2005) [#7]
I seem to recall that B3D uses a 16bit Zbuffer in both 16bit and 32bit colour depth.

The dual pass rendering stuff is the easiest stuff to make. Less than 10 lines of code

Put this in the program initialisation:

Global near#=1.0
Global intermediate#=5000.0
Global far#=1000000.0


Put this in the rendering loop, replacing the normal renderworld.(remember this is for frame-tweened programs, but can be used in non frame-tweened programs as well)

;far
CameraRange cam,intermediate#,far# 
CameraClsMode cam,1,1 
RenderWorld frameTween

;near 
CameraRange cam,near#,intermediate# 
CameraClsMode cam,0,1 
RenderWorld frameTween


You can find an excellent example of frametweening here:
http://www.blitzbasic.com/codearcs/codearcs.php?code=9

Andy