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 / Is there an easier way

Author
Message
DarkSith
22
Years of Service
User Offline
Joined: 8th Nov 2002
Location: United Kingdom
Posted: 10th Jun 2003 18:05
I have a game i created in the style of "Sky Roads" (perhaps you've heard of it) where a shuttle/car speeds along roads in space, jumping from brightly coloured blocks and tiles. The only problem was that I couldn't get the model car check whether it was landed or not. In the end I had to create an array with a value for every place the car could be and say that unless it was jumping, if the car was in a place where the array had a "N" value, the car would fall away. But now each road takes around ten minutes to load. Is there an easier way???
"He will join us, or die my Master..." - Darth Vader
Wiggett
21
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 10th Jun 2003 18:32
hmmmm, why not give it up and wait for f-zero on the game cube to come out

i need a copy of the 1.03 exe or i cant work on my game anymore
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 10th Jun 2003 20:09 Edited at: 10th Jun 2003 22:07
robx: that wasn`t exactly helpfull was it .
DarkSith: I am assuming you have a fixed section of road and the car and camera move along it?, if thats the case then you could make a matrix textured black and of the same proportions as the "road" and broken into sections that are equal to half the area of the road tiles, then where you have a section of road you raise the matrix tile heights to say 1, and where you don`t then you leave them at 0, then all you have to do is "get ground height" and where it is lower than one then you are off the edge of a block, if you set the transparency flag to 0 then the matrix will not be visible, the matrix can be alterd at the same time as you create the road, hope thats some help, cheers.

Mentor.

Hell IVIonkey
22
Years of Service
User Offline
Joined: 1st Apr 2003
Location: Outer Limits
Posted: 11th Jun 2003 00:39
I already made this game, sorry to tell ya. But don't let this stop you from making a better version!

You don't want any internal matrix functions. It's best to create a 3d array that tells what type of block is there. For me, 1-16 are blocks, 17-32 are tunnels, 33-48 are flattop tunnels, and things after that are special blocks and items and such. You check the array cells that are nearby the skycar and tell the physics to behave in the correct way depending on the block type and how close the skycar is to the block.

Hell IVIonkey
22
Years of Service
User Offline
Joined: 1st Apr 2003
Location: Outer Limits
Posted: 11th Jun 2003 09:24 Edited at: 11th Jun 2003 09:26
Oh, sorry to sound daunting, but my track collision code is 585 lines long! No simple tests are going to do it for you. I feel that my code is very efficient also and that it runs really well. The reason 585 lines is efficient is because of it's tree structure. With the first test, you cut the remaining time in two. With a few more concluding tests, you've really only executed about 20 commands, all of which are simple arithmetic math, not built-in DB functions. There are just so many possibilities to test for with this type of game's collision code. Consider these tests:



There's a LOT to consider!
Now that I think about it, I'm glad I did all this, but I would hate to do it over again from scratch!

freak
22
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 11th Jun 2003 12:39
[B][I] would hate to do it over again from scratch![/B][/I]

lol you're really encouraging darksith

[href]www.bernardfrancois.com[/href]
Hell IVIonkey
22
Years of Service
User Offline
Joined: 1st Apr 2003
Location: Outer Limits
Posted: 11th Jun 2003 12:49
Nah, it's really a great way to learn it! I'm glad I did it, and I think everybody should learn how to do a similar thing. But once is enough!

Hell IVIonkey
22
Years of Service
User Offline
Joined: 1st Apr 2003
Location: Outer Limits
Posted: 11th Jun 2003 12:57
In fact, unless you're anal about details and performance (like me), you'd be better off using built-in collision test methods, or perhaps BSPs or even models with the clipping information pre-calculated.

It's crucial to have a top-down approach though. Start with the basics of your problem, break it up into managable parts (like my outline above), figure out how to implement the parts, then do the coding & trial and error.

Login to post a reply

Server time is: 2025-05-18 15:26:08
Your offset time is: 2025-05-18 15:26:08