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 Discussion / trying to do the following...

Author
Message
Mr_Insane
21
Years of Service
User Offline
Joined: 14th Nov 2002
Location: United States
Posted: 22nd Nov 2002 05:26
1. trying to create a real space flight phsyics engine.. I tottaly forgot how the engine thing work.. However chaging the simple maths example to make the object pitrch, yaw, and move instead of having the object turn and move on horizontal plane.

2. How are weapon shots fired? Having to wait forever for a billion of them the shot models to load and then use the hid and show function when a bullet is activated??

For me I'm trying to solve every problem there is unfortunitly I never seem to get things right. My game... is currently screwed up. i used the Load object when firing laser bullets and there is no real flight phsyics in my game.. just the one ripped from the free flight example.. I am no pro at this type hehe..
Naf
21
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 22nd Nov 2002 11:35
try doin all the slow loading of objects etc. at the start of your program that way they are already there to use for firing shots when u need them

if it works... DONT FIX IT!!!
just tweak it a bit around the edges till it dont work... THEN fix it!!!
-my BASIC programming motto
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 23rd Nov 2002 00:30
1. You're using DB, so the free flight commands should work. Use turn object left/right, pitch object up/down and roll object left/right with some damping to get a fairly reallistic :S space sim.

2. You don't need very many bullets, if they move at a reasonable speed then they will go out of range fairly quickly, and then it only depends on your rate of fire as to how many you need. You check through an array of bullets to see which ones aren't moving, then position them near the player ship (preferably in the cannons, but accuracy doesn't matter too much), and give them an orientation and a speed, which they move at until they are out of range, then the values in the array are reset. If you want I can post some code, but I'll have to write it first.
Mr_Insane
21
Years of Service
User Offline
Joined: 14th Nov 2002
Location: United States
Posted: 23rd Nov 2002 02:18
Sure I would like to see the code.

I am patient too.
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 23rd Nov 2002 22:51
Here's some code I knocked up in a few minutes. It demonstrates the free flight commands and also shooting.



I changed my mind about the way it's done about halfway through but couldn't be bothered to change the code.

Hopefully that will get you started.

Login to post a reply

Server time is: 2024-03-03 14:47:31
Your offset time is: 2024-03-03 14:47:31