Space Flight/Combat Tech Demo #1.2
Space Flight/Combat Tech Demo #1.2
Download 1.0: http://www.mediafire.com/?pneg3mb4dlm
Download 1.2: http://www.mediafire.com/?x2bdjmxyfxr
This is a personal space flight/combat Tech demo. Code from this tech demo will be used in future games.
Tech Demo 1.2 Notes
In this release of the tech demo I have removed the space station, Nuclear Power planet, and Ship Hanger. I have been working on the dynamic Solar System. So far I have test spheres for the first 6 Planets plus the sun. Each planet is a child of the sun and rotate around the sun at different speeds. Please let me know what you like and dislike about the solar system!
Problems: I did run into some problems. When you are out by Earth and beyond you can barely see the sun is there some way to make the sun more visible and if so how would you go about doing it? The 2nd problem I ran into is that when you are out by earth and the farthest 3 planets the camera shakes really badly how can this be corrected?
Sun
Distance from the sun: 0
Scale: 100x normal sphere
Mercury
Distance from the sun: 4,000F
Scale: 5x normal sphere
Venus
Distance from the sun: 8,000F
Scale: 7x normal sphere
Earth
Distance from the sun: 12,000F
Scale: 10x normal sphere
Mars
Distance from the sun: 16,000F
Scale: 7x normal sphere
Jupiter
Distance from the sun: 20,000F
Scale: 20x normal sphere
Saturn
Distance from the sun: 24,000F
Scale: 7x normal sphere (Not changed to represent Saturn's true size)
Instructions:
Arrow Keys - Turn left, right, up, down
W Key - Increase speed
S Key - full stop
F Key - Fire lasers
Mouse - Aim
Finished:
Space flight
Lasers (does nothing at the moment accept fire)
Future release:
Full combat system
Combat AI
Particle system
Physics
Network
Sound
Download 1.2: http://www.mediafire.com/?x2bdjmxyfxr
This is a personal space flight/combat Tech demo. Code from this tech demo will be used in future games.
Tech Demo 1.2 Notes
In this release of the tech demo I have removed the space station, Nuclear Power planet, and Ship Hanger. I have been working on the dynamic Solar System. So far I have test spheres for the first 6 Planets plus the sun. Each planet is a child of the sun and rotate around the sun at different speeds. Please let me know what you like and dislike about the solar system!
Problems: I did run into some problems. When you are out by Earth and beyond you can barely see the sun is there some way to make the sun more visible and if so how would you go about doing it? The 2nd problem I ran into is that when you are out by earth and the farthest 3 planets the camera shakes really badly how can this be corrected?
Sun
Distance from the sun: 0
Scale: 100x normal sphere
Mercury
Distance from the sun: 4,000F
Scale: 5x normal sphere
Venus
Distance from the sun: 8,000F
Scale: 7x normal sphere
Earth
Distance from the sun: 12,000F
Scale: 10x normal sphere
Mars
Distance from the sun: 16,000F
Scale: 7x normal sphere
Jupiter
Distance from the sun: 20,000F
Scale: 20x normal sphere
Saturn
Distance from the sun: 24,000F
Scale: 7x normal sphere (Not changed to represent Saturn's true size)
Instructions:
Arrow Keys - Turn left, right, up, down
W Key - Increase speed
S Key - full stop
F Key - Fire lasers
Mouse - Aim
Finished:
Space flight
Lasers (does nothing at the moment accept fire)
Future release:
Full combat system
Combat AI
Particle system
Physics
Network
Sound
Last edited by empirepro on Fri Jul 18, 2008 2:43 am, edited 4 times in total.
Around 750fps OGL on my work PC.
The controls seem a bit weird... you just have to quickly tap W to get a manageable speed, anything more and you fly off really fast.
Also it seems that when i get close to an object i get a big speed burst...
The draw distance is also painfully small so at the start you can't actually see anything until you get closer to it.
Not a bad start to a project though, good luck with the future
The controls seem a bit weird... you just have to quickly tap W to get a manageable speed, anything more and you fly off really fast.
Also it seems that when i get close to an object i get a big speed burst...
The draw distance is also painfully small so at the start you can't actually see anything until you get closer to it.
Not a bad start to a project though, good luck with the future
-
- Posts: 34
- Joined: Sun Jul 06, 2008 5:05 am
- Location: NC, USA
I start at about 1700fps (DX9). When I can see the various ships and such, it drops to 200, and when I fly out where I can't see anything but stars, I get 3000+. :p
However, I noticed that you don't tie the accel speed into the framerate or anything... therefore, because I start at 1700fps, the slightest touch of W sends me ultrafast - I have to tap then hit S to see the other ships. :p
However, I noticed that you don't tie the accel speed into the framerate or anything... therefore, because I start at 1700fps, the slightest touch of W sends me ultrafast - I have to tap then hit S to see the other ships. :p
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Re: Space Flight/Combat Tech Demo #1
I call Hoare's dictum on that.empirepro wrote:Please let me know what your Frame rates are. Thanks!
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
-
- Posts: 34
- Joined: Sun Jul 06, 2008 5:05 am
- Location: NC, USA
shaking could be due to floating point problem maybe, if you're actually 24,000 units out i dunno if that causes problems, seems like that's been mentioned before.
you could search the forum for people's solar system projects that have been done before, they've talked about issues like this and getting nice scales as you can't achieve true to life scales and distances in an application.
there's probably not much you can do about making the sun more visible, is it just too small? you could put a glowing halo around it to try and make it more visible i suppose...
you could search the forum for people's solar system projects that have been done before, they've talked about issues like this and getting nice scales as you can't achieve true to life scales and distances in an application.
there's probably not much you can do about making the sun more visible, is it just too small? you could put a glowing halo around it to try and make it more visible i suppose...
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Re: Space Flight/Combat Tech Demo #1.2
That's a peculiar definition of "finished".empirepro wrote:Finished:
Space flight
Lasers (does nothing at the moment accept fire)
Sorry, it was unusable for me. It looks like you're using framerate dependent movement, i.e. the faster it runs, the faster things move.
What you'll want to do is to make all of your movement framerate independent. The faster the game is running, the smaller your movements should be.
A common way to do this is to calculate a frame delta time, and multiply your movements by this, e.g.:
Code: Select all
const u32 now = device->getTimer()->getTime();
const f32 frameDelta = (now - then) / 1000.f;
then = now;
// And multiply all of your motions by frameDelta
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
-
- Posts: 88
- Joined: Tue Jul 29, 2008 11:48 am
Re: Space Flight/Combat Tech Demo #1.2
Wow man! Very simple and useful solution!!rogerborg wrote: A common way to do this is to calculate a frame delta time, and multiply your movements by this, e.g.:Code: Select all
const u32 now = device->getTimer()->getTime(); const f32 frameDelta = (now - then) / 1000.f; then = now; // And multiply all of your motions by frameDelta
Thanks a LOT!
-
- Posts: 83
- Joined: Fri Apr 11, 2008 3:06 am
- Location: Beaverton, Oregon, US
Re: Space Flight/Combat Tech Demo #1.2
Sorry for this offtopic questions, but I thought that getTime() was not real time and was incremented everytime smgr->beginScene() was called and that getRealTime() was from the actual system clock- so what's the difference between the two?rogerborg wrote:That's a peculiar definition of "finished".empirepro wrote:Finished:
Space flight
Lasers (does nothing at the moment accept fire)
Sorry, it was unusable for me. It looks like you're using framerate dependent movement, i.e. the faster it runs, the faster things move.
What you'll want to do is to make all of your movement framerate independent. The faster the game is running, the smaller your movements should be.
A common way to do this is to calculate a frame delta time, and multiply your movements by this, e.g.:
Note that up to 1.4.1, getTime() on Windows has a problem with its resolution - I'd recommend using the SVN trunk.Code: Select all
const u32 now = device->getTimer()->getTime(); const f32 frameDelta = (now - then) / 1000.f; then = now; // And multiply all of your motions by frameDelta
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
Hi, empirepro
This demo have a good potential to be a fun game.
Can you check to allow a more FARZ value on your camera? Some planets seem to be cropped. (View Frustum culling) Increasing the value of the ZFAR on the camera should have them fully rendered.
This could lower the frame rate on some machine because since you'll view farther away, and you have more objects in that view, there will be much more to render. For the moment, there isnt much so I don't think it will be a problem.
Later, one solution would be to replace some very far objects with BILLBOARDS (as planets) or lower detailed objects (stations, ships). (LOD implementation)
Rogerborg is right about the way you render your current animation controller on your camera, it's frame based and not time based, this caused the game on my computer, to move the ship at incontrolable speed (Like moving to warp each time I press the forward button). Forward movement is too fast to control.
frostysnowman, this is not important, because what is needed is the DELTA time (time difference from one frame to the other) This way the camera movement will have a time reference. (Made the same mistake on my FPS rig when I first made it)
This demo have a good potential to be a fun game.
Can you check to allow a more FARZ value on your camera? Some planets seem to be cropped. (View Frustum culling) Increasing the value of the ZFAR on the camera should have them fully rendered.
This could lower the frame rate on some machine because since you'll view farther away, and you have more objects in that view, there will be much more to render. For the moment, there isnt much so I don't think it will be a problem.
Later, one solution would be to replace some very far objects with BILLBOARDS (as planets) or lower detailed objects (stations, ships). (LOD implementation)
Rogerborg is right about the way you render your current animation controller on your camera, it's frame based and not time based, this caused the game on my computer, to move the ship at incontrolable speed (Like moving to warp each time I press the forward button). Forward movement is too fast to control.
frostysnowman, this is not important, because what is needed is the DELTA time (time difference from one frame to the other) This way the camera movement will have a time reference. (Made the same mistake on my FPS rig when I first made it)
-
- Posts: 83
- Joined: Fri Apr 11, 2008 3:06 am
- Location: Beaverton, Oregon, US
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Heck, don't take my word for it; you have the source available.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
-
- Posts: 83
- Joined: Fri Apr 11, 2008 3:06 am
- Location: Beaverton, Oregon, US
There's a lot going on in Timer with handling the time and I couldn't get how it worked so I was hoping for someone who knew the inner workings of Irrlicht well could give an answer. Maybe we can leave it at. Or we could battle to the death with witty comments. It's your choice.
@empirepro, your demo is pretty cool, but other than what others have already mentioned maybe you could use a spaceship 3d model, like one from this page? Unfortunately a lot of them are only available in 3ds Max format, but there's probably one there you could use.
@empirepro, your demo is pretty cool, but other than what others have already mentioned maybe you could use a spaceship 3d model, like one from this page? Unfortunately a lot of them are only available in 3ds Max format, but there's probably one there you could use.