Game Development Community

Space! I see space!

by Aaron Davenport · in Torque Game Engine · 08/16/2001 (9:21 pm) · 9 replies

ajd.itgo.com/v12_00001.jpg
Well its a start, I got him to stop falling and also got rid of the "ban" that block's the lower half of the skybox.

,Aaron

edit - btw, the space texture was something did in a couple of min., was focusing on getting rid of the land and gravity first. = )

#1
08/16/2001 (9:37 pm)
Can you share how you did it :)
#2
08/16/2001 (9:43 pm)
Looks cool :)
#3
08/16/2001 (11:11 pm)
Cool, now you just need a set of jets to fly around with and a space shuttle or a space-station to try to fix.
#4
08/16/2001 (11:18 pm)
Maybe a few asteroids to bang against wouldnt hurt either hehe :)
#5
08/17/2001 (8:25 am)
I don't have the code infront of me (I am at work) sorry for the lack of detail

1) create textures for the skybox and a .dml file (which has the name of the textures)



space_001
space_002
space_003
space_004
space_005
space_006
space_007

2) a)create a mission (copy another mission) and edit all objects and fog out,
b)set visibility farther than the skybox
c)change the .dml file space.dml
d)set renderbottom to "1"

3) go to game\player.cc and set the gravity to 0 (currently -20)

4) Edit - see post below, made this an option

Anyway that's it, tonight I am going to get the player moving since once you remove gravity and the terrain the player cant move anymore (but the camera still can). I was going to wait to post how I did it once I got the player moving again, but was so happy that I got so much done in a short amount of time I had to post a screenshot = )

,Aaron
#6
08/17/2001 (9:41 am)
Actually, while I was going through the code last night I noticed how easy it is to add to the scripting, so I will probably clean up my code with an option to turn on/off the ban in the mission script.

Also, I think I am going to leave the player code alone and create a cSShip class for movement in space since my actual end goal is to have Spaceships, but should be easy to apply the class to a player shape in space (ie. spacesuit w/ pack for movement if the player was doing repairs 'n such)

Don't mind me, just rambling out thoughts since I am stuck here at work and not home playing with the code. = )

,Aaron
#7
08/17/2001 (3:22 pm)
Okay, I tried everything you did, but I see a grey box cutting through the middle of the scene. Any idea what this is?

-Mark
#8
08/17/2001 (4:10 pm)
Now made the ban a preference:

(all changes are Bold)


class Sky : public SceneObject
{
.
.
.
private:
static bool smClipBanOn;
.
.
.
}


.
.
.
//Static Sky variables
bool Sky::smClipBanOn = false;
.
.
.

void Sky::consoleInit()
{
.
.
.
#endif
Con::addVariable("pref::ClipBanOn", TypeBool, &smClipBanOn);
.
.
.

void Sky::render(SceneState *state)
{
.
.
.
// if completly fogged out then no need to render
if(smClipBanOn && (alphaBan[1] < 1.0f || depthInFog < 0.0f))
.
.
.

void Sky::renderSkyBox(F32 lowerBanHeight, F32 alphaBanUpper)
{
.
.
.
if(smClipBanOn)
sgUtil_clipToPlane(renderPoints, numPoints, PlaneF(0.0f, 0.0f, 1.0f, -lowerBanHeight));
.
.
.

This add's a pref to clientPrefs.cs, you can then toggle with 0/1
#9
11/05/2001 (2:07 pm)
Well.... this was an old post ( I was browsing right from the beginning )... so I was wondering... since the time you posted this, have you perhaps found out how to make it per-map ???

(so u can have regular missions with gravity.. missions in other terrains with lower gravity... missions in space with NO gravity)

Its kind of an important feature in the game im making. Just wanted to check no-one else had done it before I take a crack at it.

Thx for any help.