Space Patch/Resource
by Anders Jacobsen · in Torque Game Engine · 09/24/2004 (2:11 am) · 15 replies
Wasn't there a space resource for patching the Torque Engine so it could be used for a space sim game?
Anyone know where to find? And most importantly, does it still work?
I've tried searching garage games, but... Search functionality on this site gets a rating of 1 in my opinion ;)
I find it utterly useless, but it might just be me and my ten thumbs and... well ;)
Anyway, I'm not experienced enough with Torque to do these modifications myself, so I'd need some sample code and instructions on where to put what :)
Also, I'm working with TGE 1.3
Anyone know where to find? And most importantly, does it still work?
I've tried searching garage games, but... Search functionality on this site gets a rating of 1 in my opinion ;)
I find it utterly useless, but it might just be me and my ten thumbs and... well ;)
Anyway, I'm not experienced enough with Torque to do these modifications myself, so I'd need some sample code and instructions on where to put what :)
Also, I'm working with TGE 1.3
#2
The Space Environment Code looks interesting, but alas, it's over 2 years old. Which probably means a LOT of fixing, which I'm not confident enough with Torque yet to do myself.
Are there anyone currently working on a Space Environment resource or Pack? I'd be willing to help out and/or be willing to pay for a code pack or something for this.
09/24/2004 (3:30 am)
Thanks.The Space Environment Code looks interesting, but alas, it's over 2 years old. Which probably means a LOT of fixing, which I'm not confident enough with Torque yet to do myself.
Are there anyone currently working on a Space Environment resource or Pack? I'd be willing to help out and/or be willing to pay for a code pack or something for this.
#3
I'd expect I'd have to do use a flyingvehicle and such, but I'll be able to solve such problems. It's not scripting I've got trouble with. It's the darn engine ;)
Any help much appreciated.
09/24/2004 (3:46 am)
Another question. What would be the simplest way of getting a space environment up and running? Putting in black pngs for the skybox. Removing terrain. What else? And how to do it? (Where to look etc)I'd expect I'd have to do use a flyingvehicle and such, but I'll be able to solve such problems. It's not scripting I've got trouble with. It's the darn engine ;)
Any help much appreciated.
#4
The fourth link in Nick's post above is for generating starboxes and worked well for me. There is another one called starbits that you can download here. Make sure in the mission editor in Torque you select both "renderBottomTexture" and "noRenderBans" for the sky so you can see the whole starbox.
To remove the terrain, just delete the terrain block from the mission file.
09/24/2004 (9:28 am)
I created a space environment simply by replacing the skybox, removing the terrain, and changing the flying vehicle. In order to get a flying vehicle with a space "feel," you are going to have to change the engine. I'm still working on my vehicle, but when I finish it I can release it as a resource. If you want to do it yourself, basically the only thing that needs changing is the updateForces function in flyingVehicle.cc.The fourth link in Nick's post above is for generating starboxes and worked well for me. There is another one called starbits that you can download here. Make sure in the mission editor in Torque you select both "renderBottomTexture" and "noRenderBans" for the sky so you can see the whole starbox.
To remove the terrain, just delete the terrain block from the mission file.
#5
1. Used Starbox tool above to generate a decent starry skybox. Don't forget to disable the clouds, however. (Set all of the cloud settings in the Sky box to zero.) Don't forget to turn on NoRenderBans and renderBottomTexture. This will give you a starry background.
2. Now, to give the player a visual reference for movement, you should really add the fxStarfieldReplicator resource listed above. With sufficient density, this will give the player something to gauge his/her movements.
3. Remove the terrain block from the mission file. You will need to do this manually by editing the .mis file, as the World Editor will not yet you do this. Some people have reported crashes when opening the terrain editor from that point onwards, but I haven't seen that. I just get a lot of errors. :)
4. Create a very large physical zone, with a scale of something like "2048 2048 2048". Set GravityMod to zero. This will cancel gravity for vehicles.
5. Replace the spawn code in game.cs so that instead of spawning a player, it spawns a flyingVehicle.
6. Tweak FlyingVehicle's physics to make it more spaceshippy. Some hints: Remove the code that calculates the mCeilingFactor in ::updateMove(), just make it always be 1.0f. This will stop Torque from lessening thruster force as the player moves up and down the Z axis. Also, to get the afterburner to stop applying upwards force, edit the thrusting code both in updateMove() and updateForces() (turbojet).
7. Throw in Paul Dana's turrets and hack in the AIFlyingVehicle changes and presto, instant enemies.
8. (Additional) The radar is a good resource, too. Plus, if you've got lots of vehicles flying around, you might encounter random lockups or crashes, see here for some good info on how to get around this.
The results don't look half bad, I think. Even with rushed art.
EDIT: Instead of a physical zone, you could just modify the FlyingVehicle physics to never apply gravity, but I prefer it this way as it will apply zero gravity to all game objects without me having to touch the engine at too many places. And who knows, maybe it'll come in useful, like gravity zones near large objects?
09/24/2004 (9:36 am)
Here's how I made a space game in less than six hours... (With about a week of playtesting/tweaking, heehee.)1. Used Starbox tool above to generate a decent starry skybox. Don't forget to disable the clouds, however. (Set all of the cloud settings in the Sky box to zero.) Don't forget to turn on NoRenderBans and renderBottomTexture. This will give you a starry background.
2. Now, to give the player a visual reference for movement, you should really add the fxStarfieldReplicator resource listed above. With sufficient density, this will give the player something to gauge his/her movements.
3. Remove the terrain block from the mission file. You will need to do this manually by editing the .mis file, as the World Editor will not yet you do this. Some people have reported crashes when opening the terrain editor from that point onwards, but I haven't seen that. I just get a lot of errors. :)
4. Create a very large physical zone, with a scale of something like "2048 2048 2048". Set GravityMod to zero. This will cancel gravity for vehicles.
5. Replace the spawn code in game.cs so that instead of spawning a player, it spawns a flyingVehicle.
6. Tweak FlyingVehicle's physics to make it more spaceshippy. Some hints: Remove the code that calculates the mCeilingFactor in ::updateMove(), just make it always be 1.0f. This will stop Torque from lessening thruster force as the player moves up and down the Z axis. Also, to get the afterburner to stop applying upwards force, edit the thrusting code both in updateMove() and updateForces() (turbojet).
7. Throw in Paul Dana's turrets and hack in the AIFlyingVehicle changes and presto, instant enemies.
8. (Additional) The radar is a good resource, too. Plus, if you've got lots of vehicles flying around, you might encounter random lockups or crashes, see here for some good info on how to get around this.
The results don't look half bad, I think. Even with rushed art.
EDIT: Instead of a physical zone, you could just modify the FlyingVehicle physics to never apply gravity, but I prefer it this way as it will apply zero gravity to all game objects without me having to touch the engine at too many places. And who knows, maybe it'll come in useful, like gravity zones near large objects?
#6
Thank you guys so much for the information, and for pointing me to
some rather interesting resources. I suddenly feel a bit more confident with Torque now :) (Hope it lasts)
@Adam
I'll try that starbits thing out for sure.
@David
3. I've got my own tool for generating mis files so that won't be a problem.
4. How large is large? At 150kp/s how fast would I go from one side to the other? I expect I'll have to divide here to make 150kp/s be more like
0.15kp/s or so... This is probably going to be the nut to crack. How to get
speeds and distances to work out ok. Or is it just straight forward using large large large numbers? ;)
6. Very good tip. Saves me a bunch of time I am sure :)
Very cool results, looks kind of Descent'ish :)
Thank you all. If there's anything else, feel free to post more :)
09/24/2004 (11:06 am)
Guess who's a happy camper now? :)Thank you guys so much for the information, and for pointing me to
some rather interesting resources. I suddenly feel a bit more confident with Torque now :) (Hope it lasts)
@Adam
I'll try that starbits thing out for sure.
@David
3. I've got my own tool for generating mis files so that won't be a problem.
4. How large is large? At 150kp/s how fast would I go from one side to the other? I expect I'll have to divide here to make 150kp/s be more like
0.15kp/s or so... This is probably going to be the nut to crack. How to get
speeds and distances to work out ok. Or is it just straight forward using large large large numbers? ;)
6. Very good tip. Saves me a bunch of time I am sure :)
Very cool results, looks kind of Descent'ish :)
Thank you all. If there's anything else, feel free to post more :)
#7
4. Since you're in space, there's not much limit on how big you want your world. I keep within 2k x 2k, but that's because I don't need very large missions. (Mine is more of an action/racing game than a space sim sort.) The values for positions are all floating point, and have decent ranges, so you should be good.
Sure thing, just figured I'd speak up (even if Adam beat me to it ;), as I am working on this very sort of game right now.
09/24/2004 (12:06 pm)
Oh and if you need a nebula skybox texture, I made a quickie right here. I eventually plan on trying to mix a nebula like that with a starry skybox, as a seperate, blended layer. Wouldn't be that hard to mod the skybox to do that.4. Since you're in space, there's not much limit on how big you want your world. I keep within 2k x 2k, but that's because I don't need very large missions. (Mine is more of an action/racing game than a space sim sort.) The values for positions are all floating point, and have decent ranges, so you should be good.
Sure thing, just figured I'd speak up (even if Adam beat me to it ;), as I am working on this very sort of game right now.
#8
The nebulae looks very nice. Is there any tools to create these kind of nebuales with script? We're only two members so we "automate" a lot the content creation process. We want to spend more time on the finer details of things. Like game mechanics and playability :)
Not to mention story. Our game development document is growing very large indeed. And we've managed to hold back on programming for months only focusing on documentation. We finally burst a couple of weeks ago tho and started coding the data generation tools... No biggie, the GDD is fat enough :)
09/24/2004 (3:08 pm)
Cool, and thanks again.The nebulae looks very nice. Is there any tools to create these kind of nebuales with script? We're only two members so we "automate" a lot the content creation process. We want to spend more time on the finer details of things. Like game mechanics and playability :)
Not to mention story. Our game development document is growing very large indeed. And we've managed to hold back on programming for months only focusing on documentation. We finally burst a couple of weeks ago tho and started coding the data generation tools... No biggie, the GDD is fat enough :)
#9
And good you've got a plan and clear reference for it. That will help a lot. :)
09/25/2004 (11:19 am)
Rakessh, I posted a short tutorial on how I made those nebula images -- You could probably write a program to automatically generate nebula maps. However, how many skyboxes are you going to need? Making a halfdozen or so by hand shouldn't take too long.And good you've got a plan and clear reference for it. That will help a lot. :)
#10
The tutorial is very handy information indeed. And you make some good points about environment reflections on surfaces. Looks like we'll have to code up a tool to generate nebulae and other stuff automatically for our use. Or script Lightwave to do it. I guess it would be a good thing to have it create generated textures for the nebulae too, for more diversity than only using a handful.
Atleast something to think about for us.
Thanks for all your help :)
09/26/2004 (3:38 pm)
Ah yes, just getting into things. I'll make an updated .plan and such in the near future :)The tutorial is very handy information indeed. And you make some good points about environment reflections on surfaces. Looks like we'll have to code up a tool to generate nebulae and other stuff automatically for our use. Or script Lightwave to do it. I guess it would be a good thing to have it create generated textures for the nebulae too, for more diversity than only using a handful.
Atleast something to think about for us.
Thanks for all your help :)
#11
09/30/2004 (3:06 pm)
Have a look at www.draysoft.net they've released a FREE content pack for commercial and none commercial torque use. It consists of a load of things that never made it into their purchasable content packs. Whether you decide to use them in your game or not is up to you, but they certainly make great stand-in skyboxes :)
#12
11/22/2005 (7:39 am)
The links from David Grace look very interesting, but appear to be broken.. Are they available somewhere?
#13
11/22/2007 (12:26 am)
Are these Space Modification still usable in TGE 1.5.2?
#14
11/22/2007 (5:53 am)
They would still work, but becouse of the many code changes the engine has undergone, you will want to merge the changes into torque.
Torque Owner Nick Zafiris
I found them typing the word "space" and selecting "Resources" from the drop down list.
fxStarfieldReplicator Object
Space Environment code
Star Rendering
Starbox, Tool for rendering starfield skyboxes
Nick