Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Spaceflight engine

Author
Message
SpaceInvader
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: United States
Posted: 12th Oct 2002 17:21
I and a group of programmers are starting work on a new game. We're not extremely ambitious, because we've had several failed projects before, and want to do a simple game and expand from there.
We need some pointers on how to write a basic 3D spaceflight engine in DBPro. For starters, we just need to know how we would create a basic infinite matrix with no terrain, just stars, and the ability to fly around in it. Any pointers?
SpaceInvader
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: United States
Posted: 12th Oct 2002 17:25
Sorry, I have no idea how there could be 4 copies of this message.

Milamber
21
Years of Service
User Offline
Joined: 27th Sep 2002
Location: Australia
Posted: 12th Oct 2002 17:38
Make a sphere, then texture the inside of it with a star pattern. The sphere has to be big, for preference with a bigger radius than the disappearing point (set it to ignore it) and you reposition it to the position of the camera each frame. Aside from that, certain bugs in DBPro rotation and turnng commands make the rest a little difficult right now, but if you don't care about setting the object or camera back to initial rotation, then I can make a basic movement engine and give it to you. I can whip up one in around an hour, probably.

System Specs: AMD Athlon 1700+ XP, GA-7VRX motherboard, 128MB DDR RAM, GeForce2 MX400 64MB VRAM
indi
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 12th Oct 2002 21:35
no worries I deleted the multis

no website at moment
ZeldaPhreak
21
Years of Service
User Offline
Joined: 9th Sep 2002
Location:
Posted: 12th Oct 2002 22:54
or you could just simply texture the backdrop and (optionally) use the scroll backdrop command too

Milamber
21
Years of Service
User Offline
Joined: 27th Sep 2002
Location: Australia
Posted: 13th Oct 2002 00:27
The scrolling gets tricky to do right when you're using free flight rotation, which you'd want to do with something in space. Also, how would you rotate the backdrop image?

System Specs: AMD Athlon 1700+ XP, GA-7VRX motherboard, 128MB DDR RAM, GeForce2 MX400 64MB VRAM
SpaceInvader
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: United States
Posted: 13th Oct 2002 01:54
Basically, what I need is just an engine which lets you turn in different directions, where the ship the player controls is an object like anything else, and which could be later expanded.

Milamber
21
Years of Service
User Offline
Joined: 27th Sep 2002
Location: Australia
Posted: 13th Oct 2002 02:16
Sure. Give me a couple of hours to make a nice polished one. You'll need your own object, and due to current issues, it will need updating when patch 2 comes out, and the only way to return it to starting orientation properly will be to delete and recreate it.

System Specs: AMD Athlon 1700+ XP, GA-7VRX motherboard, 128MB DDR RAM, GeForce2 MX400 64MB VRAM
SpaceInvader
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: United States
Posted: 13th Oct 2002 03:12
OK, thanks a lot. You won't retain copyright on this or anything, right?

Milamber
21
Years of Service
User Offline
Joined: 27th Sep 2002
Location: Australia
Posted: 13th Oct 2002 04:19
K, it's a simple engine, but rotation problems are getting in the way right now. Works fine in DBv1, but you'll have to wait for patch 2 b4 I can get it working properly in DBPro. And no, I won't retain copyright. When patch 2 comes out, I'll finish it off and put it in code snippets forum.

System Specs: AMD Athlon 1700+ XP, GA-7VRX motherboard, 128MB DDR RAM, GeForce2 MX400 64MB VRAM
Andy Igoe
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 13th Oct 2002 16:02
http://www.geocities.com/pneumaticdryll/3d

The spaceship snapshots may be what you are striving for, or something similar...

I achieved rotation by using a handler object and calling a routine like the example below:

function turn(obj,amt#)
set object to object orientation 1,obj
turn object right 1,amt#
set object to object orientation obj,1
endfunction

No more twisted thumb rotation problems in DB!

There are other ways too, such as keeping track of rotations and returning to 0 after sync. This is my favoured though as it's the simplest and neatest to execute.

Pneumatic of Xev@EQ

Life outside of MMORG's costs more, rewards less and features no end game content.
Zed
21
Years of Service
User Offline
Joined: 20th Sep 2002
Location:
Posted: 13th Oct 2002 18:18
Not being funny but what does this achieve that 'turn object right obj,amt#' does not?

Milamber
21
Years of Service
User Offline
Joined: 27th Sep 2002
Location: Australia
Posted: 13th Oct 2002 19:02
Give us some sample working code then, because I can't get it to work.

System Specs: AMD Athlon 1700+ XP, GA-7VRX motherboard, 128MB DDR RAM, GeForce2 MX400 64MB VRAM
Andy Igoe
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 15th Oct 2002 01:27
Use of the handler object allows you to continue using object angle x() and rotate object angle x() on your object thus allowing for bug free rotation and reading rotations back in without twisted thumb errors.

Pneumatic of Xev@EQ

Life outside of MMORG's costs more, rewards less and features no end game content.
Milamber
21
Years of Service
User Offline
Joined: 27th Sep 2002
Location: Australia
Posted: 16th Oct 2002 06:55
Doesn't work in DBPro, as turn object only alters the mesh rotation, not the object angle. This turns the mesh, but move object 1,5:turn object left 1,5:move object 1,5 would have the same effect as move object 1,10:turn object left 1,5. It would work in DB1.13, but not yet in DBPro. Patch 2 needs to come out before this sort of engine is possible.

System Specs: AMD Athlon 1700+ XP, GA-7VRX motherboard, 128MB DDR RAM, GeForce2 MX400 64MB VRAM

Login to post a reply

Server time is: 2024-04-25 13:05:18
Your offset time is: 2024-04-25 13:05:18