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.

Author
Message
Kamakazi
16
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: Moberly, Missouri
Posted: 10th Mar 2011 16:03
I have already asked earlier about working with 3D skyboxes and skyspheres. After spending most of the night working with the Reflective Sky demo that came with DarkGAME Studio, a sample from SkyMATTER, and a demo F1 Car that came with DarkMATTER, I believe I could have the starts of a racing game. The image below shows a car in the "air".




However, I have a question. What would I use to add a track to this? I remember seeing a demo with DBPro where two motorcycles are running down a road but I can't seem to find it now. I know I keep asking for help but this 3D stuff is new territory for me. Any suggestions are gratefully appreciated. Thanks in advance.
Coldfire
17
Years of Service
User Offline
Joined: 22nd Oct 2008
Location: Indiana
Posted: 10th Mar 2011 16:18
If you want to create a track with bankings and smooth curves, you should use a 3d modelling application for track creation, or if you feel comfortable enough, I'd even recommend reading up on beizer curves. Even with a simple understanding of them, it wouln't be too hard to create a track editor using memblocks to create the actual mesh. I've been thinking of trying to do something on the lines of this myself, but I'm already starting to fall behind on most of my other projects due to working extra hours.
Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 10th Mar 2011 17:39
The motorcycles demo was just a fake lil' eyecandy, has nothing to do with such complex projects.

I see two ways which are so fundamentally distinct from each other, you need to decide which way you want to go, and then stick to it no matter what.

The first one is a ground of ANY kind, from matrix to advanced terrain systems whatever, the important thing is the tricky texturing. You'd need to make some different types of curved roads, divide those up into tiles, and then in a little easy level editor you could puzzle some nice stages out of them. You can specify different height values to those tiles, so it can vary from total flat to all kinds of crazy tilts.

The second one is to directly make the mesh like how the road goes. Personally i'm not so fond of this one, because there is a need for REAL high poly count to make the curves nice. And of course there comes the problem of generating the stuff outside the road. Some do it like there is a simple matrix ground, and then have a utility to auto generate roads onto (above... well if more and more people feel blob shadows are the thing of the past, what about this one?) the ground according to the mentioned bezier (it's bezier not beizer...) curves. But that seems to be a hard AND primitive way of doing things to me.

Maybe there is a third, the combination of the two previous one: make many different parts of roads and stage elements, which you can easily put together fast and creatively in your editor. Of course there is the way to just say F it and do everything in a 3D modeler program, but that's for pro artists which i won't recommend not knowing how good you are in that.

The advantage you would earn with the first, is that the collision detection with ground is very easy and fast. Though with Sparky's dll i don't think the speed of collision is now an issue for a racing game at least.
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 10th Mar 2011 20:37
What I would do is create way points to force the cars to follow all the way (not the player). We can use a simple texture with a heightmap plus a texture with the track and Advanced Terrain .

Cheers.

I'm not a grumpy grandpa
Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 10th Mar 2011 21:37
ARrrrghhh, there was a racing game in the coding challenges thread, with some really stunning and amazing examples! I can't find it though... Can anyone else?

Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 10th Mar 2011 22:46
Racing Game challenge set by Nicholas Thompson on December 12, 2005. I'd link to the challenge entries on my website, but I discovered a bug. Since my site incorporates both DBC and DBP, and a DBC challenge exists with the same challenge name, it'll only pull up the DBC challenge.

But the date above should help someone find it in the challenge thread.

The Internet: Where men are men, women are men, and children are federal agents
BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 10th Mar 2011 22:51
Splines are the way to go. here's a whirlwind tour in under 2 minutes...

Polys -> Spline model -> Flat road -> Hilly Road -> Road on a terrain



Kamakazi
16
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: Moberly, Missouri
Posted: 10th Mar 2011 23:22
Wow...some great responses! What software would you all recommend for creating a track? And from the sounds of it, I'm going to have to possibly learn how to do terrains as well.
BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 10th Mar 2011 23:29 Edited at: 10th Mar 2011 23:32
@BatVink - your spline race track is a beautiful thing to see.
I would pay for something to help me create a track like that!
If it could work with the new BlitzTerrain, as well as matrix generated terrain, that would be really cool.
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 11th Mar 2011 00:06 Edited at: 11th Mar 2011 00:08
Spline based racetrack creator...



Free:
The dogs knackers race track maker!

Quote: "I would pay for something to help me create a track like that!"

No need!

Kamakazi
16
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: Moberly, Missouri
Posted: 11th Mar 2011 09:08
Well, I tried to use the track maker that baxslash posted, but I don't have the Matrix 1 utility to compile the source code...and I keep getting errors. I also noticed that the thread has been closed. If there is a way to get a compiled version of the track maker let me know because I'd like to try it. If there are some other spline-track editors out there then please let me know. Thanks.
Kamakazi
16
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: Moberly, Missouri
Posted: 11th Mar 2011 09:11
@BatVink: What did you use to create that track? Software/utility I mean. That is cool!
Kamakazi
16
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: Moberly, Missouri
Posted: 11th Mar 2011 09:23 Edited at: 11th Mar 2011 09:35
OK...another question: I have the DarkMATTER 1 pack, which is where the F1 came from. The model has move animation (wheels turn). How do I do animation in DBPro so the wheels are moving?

Nevermind...learned something new...used LOOP OBJECT command. Duh!
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 11th Mar 2011 10:01
Quote: "Well, I tried to use the track maker that baxslash posted, but I don't have the Matrix 1 utility to compile the source code...and I keep getting errors. I also noticed that the thread has been closed. If there is a way to get a compiled version of the track maker let me know because I'd like to try it. If there are some other spline-track editors out there then please let me know. Thanks."

I could compile it for you but really honestly you should get IanM's plugin it is invaluable! Get it get it get it get it get it...

Really, get it.

Click here and install the plugin if you want to solve half your coding problems in ten minutes. GET IT

Did I go too far? If so sorry. There's a reason people who write cool stuff like that track editor use it.

Kamakazi
16
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: Moberly, Missouri
Posted: 11th Mar 2011 12:08
Got the Matrix add-on. And everything except the Terrain Editor has compiled without issues. When compiling the Terrain Editor (as I'm calling it), I get an error message saying:

"Compilation Failed. Could not understand command at line 139."



Is this part of another add-on that I don't have?
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 11th Mar 2011 12:14
You need sparky's collision too!

That's another Rock for me:
Sparky's

Kamakazi
16
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: Moberly, Missouri
Posted: 11th Mar 2011 13:44
You seriously need to consider releasing this as an additional tool. What would normally take hours to do your program did in a matter of minutes. Only suggestions I would make is to reverse the mouse buttons. I use a laptop where the touchpad and right mouse button kept battling for domination. I know this may seem a little off topic, but this seriously needs to be added to TGCs arsenal of game development tools.



With that being said, I have a few questions about what can and can't be done. Bare with me, I haven't had time to see exactly how the Track Loader is using the data. But, even if the terrain creator for the tracks makes its own BMP files, these can be replaced/edited with custom-made images...like those from Photoshop right? And there is a way to place the tracks made with this utility (that's what I'm calling it) in the skybox/car image shown at the top of this thread correct?
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 11th Mar 2011 14:02
Quote: "even if the terrain creator for the tracks makes its own BMP files, these can be replaced/edited with custom-made images...like those from Photoshop right?"

Yes that's right. It makes images but you can substitute them with your own.

Quote: " there is a way to place the tracks made with this utility (that's what I'm calling it) in the skybox/car image shown at the top of this thread correct?"

Yes, the skybox is just a background after all. Just make sure the skybox is much bigger than the track, your camera range is larger than half the skybox and you always position the skybox at the camera position every loop.

BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 11th Mar 2011 18:19
Quote: "@BatVink: What did you use to create that track? Software/utility I mean. That is cool!"


I coded it in DBP, I'm making a track editor with a few more advanced features for a project. I haven't looked, but you'll probably find everything I did is in the other editor being talked about here.

paul5147
20
Years of Service
User Offline
Joined: 11th Jan 2006
Location: Hot & Sunny
Posted: 11th Mar 2011 20:24
Thanks for the link to my project Baxslash,its been a while since i saw that video myself,and i forgot how good it looked.
I havent stopped work on this just put in on the back burner for a while as no one really showed any intrest in it when i did it.
It is fairly hard to use but it does take out a lot of the work for you.

Kamakazi: I have upgraded this project a lot since those last posts and videos to make the track and landscapes even better,unfortunatley in the process what little bit of ease of use it had has long since gone,to the point were it would now be easier to learn how to use a good 3d modeling program that you can then go on to use in all your projects.

The main problem this whole racing game idea has got against it is what to do with all the lovely tracks you can make.
At present there just isnt a really good physics simulation of vehicles thats readily available,other than World Off Road (love it COwbox!) and thats using a physics dll that i simply dont have or know how to get hold of and the one COwbox has is only a beta version i think.
Beleive me if i had that and could get even the most basic of vehicles running,just a box and 4 capsules for wheel markers the WIP forum would be full of racing games.
Dont give up though,keep trying and i look forward to seing what you come up with.If You need any help with the track editor/scenary/loader code from my other post than let me know,ill be happy to help.
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 11th Mar 2011 21:25
Quote: "Thanks for the link to my project Baxslash,its been a while since i saw that video myself,and i forgot how good it looked."

Yeah I always think of that one when I think of DBP racing games

Quote: "At present there just isnt a really good physics simulation of vehicles thats readily available,other than World Off Road (love it COwbox!) and thats using a physics dll that i simply dont have or know how to get hold of and the one COwbox has is only a beta version i think."

That system C0wbox uses could be replicated in DarkPhysics. It's just (I believe) using physics objects, joints and forces. All of that could be replicated in DP. The dll he's using is still Beta and is still far from complete but who knows, it might be released some time soon... DP gets a hard time but it's not so bad. I'm sure you could make it work for you.

Kamakazi
16
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: Moberly, Missouri
Posted: 12th Mar 2011 03:00
@Paul5417: What I would do is keep it as a way to create tracks with terrains and keep the loader for testing purposes. Resort back to the versions that Baxslash sent me to and work on the user interface. I'd leave the car's physics up to the developer to code outside of the editor. Why? Because every programmer will want the cars to act different depending on their project. And it sounds like I'm not the only one that would like to see your project get finished.

I mention resorting back to the previous versions that Baxslash sent me to because they are simple, easy to use, and work. Maybe add buttons for the user interface (but keep the keyboard keys as shortcuts). I would like to use this for the project I'm working on.
Kamakazi
16
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: Moberly, Missouri
Posted: 12th Mar 2011 03:02
Quote: "Yes, the skybox is just a background after all. Just make sure the skybox is much bigger than the track, your camera range is larger than half the skybox and you always position the skybox at the camera position every loop."


What coding do I use to make the skybox bigger than the track? I'm still a newbie after all
Kamakazi
16
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: Moberly, Missouri
Posted: 12th Mar 2011 04:17
Paul: Would you object to creating a graphical-interface for the editor? If not, I would gladly help create something you could use to accomplish adding a graphical interface. Also, since it is your project, and I don't want to change the code without permission first, would you please reverse the mouse buttons where the left button moves points while the right button adds points? I tried to do this but couldn't get it to work.

What I did do: The saved files are no longer TXT files. The software now creates it's own TRK files. I hope you don't mind the change. I also compiled all three apps to where they work in fullscreen. For some reason, the windowed-screens would start in the lower right corner.

paul5147
20
Years of Service
User Offline
Joined: 11th Jan 2006
Location: Hot & Sunny
Posted: 12th Mar 2011 06:44
@Kamakazi: Feel free to modify this in any way you like

@Baxslash : I have tried to replicate cars with joints,but found them a bit on the week side.I´ve modeled them right from a basic box with 4 cylinders attatatched with revolute joints and no steering,rite upto double wishbone 4 wheel independent suspension and steering,but none have ever come close to being stable.The fewer joints you use the better it gets.

I do have a GUI version of this on the go at the moment,but its far from finished.Leave it with me and i promise i will keep working on it.
Kamakazi
16
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: Moberly, Missouri
Posted: 12th Mar 2011 10:16
Thanks Paul. To those who like Paul's program, I have reversed the mouse buttons. Left mouse button now moves points while the right mouse button adds.



I'm also uploading a compiled version of the track editor for others to try out. Thanks to Paul for creating a great editor and I am working on adding a graphics interface. I have to ask Paul for help on something though:

What portion of the code plots the points? I've noticed that they plot a little to the right of where the mouse pointer is. Thought I would try to correct this.
Kamakazi
16
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: Moberly, Missouri
Posted: 12th Mar 2011 12:40
OK, have a screenshot of what I've done with Paul's editor. I haven't got the buttons working yet and that might take me a while to learn as I've never worked with programming a mouse before.



What do you all think? If it's too bright I can darken it.
Kamakazi
16
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: Moberly, Missouri
Posted: 12th Mar 2011 16:30
Well...I added the F1 model to the Track Loader example program and...viola!



We have a car on the track! Just can't control it...yet. And I remade the Graphic Interface and gave the editor a name...simply called "Tracker". Hope Paul doesn't mind.



I still need to make the buttons work. For those that use Paul's Track Editor and Loader, add this to the Loader source to have the vehicle of your choice follow the course.



And to load your vehicle, this could probably be used as a starting point:



Hope this helps others out. Definitely a great starting point for creating racing games. Pretty much all that needs to be done is to work out any car physics and controls (obviously) and add a few cars to race against.
paul5147
20
Years of Service
User Offline
Joined: 11th Jan 2006
Location: Hot & Sunny
Posted: 12th Mar 2011 19:38
@kamakazi: Feel free to modify it in any way you please to make it work for you,all i ask is if you use it for something that you release as either a work in progress or better still a full program,then please just credit me with the track design,thanks.
The part that adds in points is this

Its basically a quick way to pick a 3d coordinate out of thin air,but it is as you say slightly out,but you can then just move the points to exactly were you want later.
C0wbox
20
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 12th Mar 2011 21:43
Just to clarify what was being said a few posts up^ - World Off Road used to use DarkPhysics. - So it's definitely all possible. I've even heard people telling me you can do it in Newton Physics too but I never tried because the interface bugged me xD.

If you decide to go with DarkPhysics you must be made aware of the limitations:
* Trying to use the vehicle support commands is a pain in the rear end so you'd need to use rigid bodies and joints like I did.
* In this form, you can't do suspension very easily
* You won't be able to have more than one map load per run of the application. - Each time you load a map into the physics memory then unload it for another map there is a leak or something and a strong chance the program will just break. - This is what ultimately caused me to change to DarkDynamiX when I received the offer to participate in the beta.

Kamakazi
16
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: Moberly, Missouri
Posted: 16th Mar 2011 11:34
@ Paul: I will do that. Not a problem.
paul5147
20
Years of Service
User Offline
Joined: 11th Jan 2006
Location: Hot & Sunny
Posted: 16th Mar 2011 23:54
@Kamakazi: Thanks,any help you need with it let me Know

@COwbox : Thanks,been using Dark Physics since it launched,its nice to know someone else has had the exact same problems.I did get the vehicle physics very similar to yours with the box and 4 revolute jointed cylinders to work a while ago,but gave up due to not being able to use more than one track to race on,or at least not always being able to use more than one track,it just seemed so unpredictable as to when or if it would crash!
I cheated with the suspension and used 4 blocks conencted to a thin central block with fixed joints(if only) in the shape of an ´H` and attatched the wheels to the 4 blocks.The fixed joints actually provided enough movement to give the illusion of suspension and steering.
Kamakazi
16
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: Moberly, Missouri
Posted: 19th Mar 2011 22:03
Ok...working with Paul's Track Loader, how would I get the camera to follow the car model instead of the track segments? I've tried using Point Camera and Position Camera...but obviously I'm missing something.
Kamakazi
16
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: Moberly, Missouri
Posted: 20th Mar 2011 21:30 Edited at: 20th Mar 2011 21:33
OK...found a CodeBase example I liked and tried to add to the Track Loader program to see how well it would work. However, I ran into an issue...the car sits below the track! I have tried various attempts to correct this but, obviously, I still have a lot to learn. Any suggestions?

Track Loader w/added car controls


CodeBase Car Controls Source


Thanks in advance!
paul5147
20
Years of Service
User Offline
Joined: 11th Jan 2006
Location: Hot & Sunny
Posted: 20th Mar 2011 21:53
@Kamakazi: Nice to see you going ahead with this,the problem seems to be that you arnt actualy placing the car on the track to begin with,and after that you arnt taking into account that the track can undulate,You seem to have given the car an object id of "objectnumber2" but then used "objectnumber" in its controls.
Kamakazi
16
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: Moberly, Missouri
Posted: 21st Mar 2011 02:31
Thanks for the response, Paul. Actually, the objectnumber2 car is a second car (future use) that I plan to add AI to. Right now, it's stationary. But I did have both cars on the track simultaneously before attempting to add some player controls. So, don't let the objectnumber2 confuse you too much

At first, I was placing the cars like so:



But, working on the game from this perspective left very little room for player controls. And I'm still trying to learn how to get the camera to follow the car. I guess I might as well let the cat out of the bag...I'm seriously thinking of pulling off a Pole Position clone. Figured that type of racing game wouldn't require too much to recreate.

Of course I'm going ahead with this project. It might take me a while to complete, I might have to restart the thread, and I know I'm going to need help with this being my first 3D programming experience, but it will be worth it. Especially if it gives others something to go on. Besides, I love the editor and would like to see something be created from using it.

Login to post a reply

Server time is: 2026-07-17 14:00:01
Your offset time is: 2026-07-17 14:00:01