simple racing track

BlitzMax Forums/MiniB3D Module/simple racing track

redmoth(Posted 2011) [#1]
Hi, I''ve been practising with minib3d, making simple games with cubes or moving objects around and so on..

What I want to do is create a very simple racing game, (I've previously started making a very basic one in 2d, so know about getting the other cars to follow checkpoints, so although I'm a 'noob', I'm not a clueless noob/ )

What I can't get my head around is how to make the track
I want something simple and flat (but can be improved later)
I found this http://www.blitzbasic.com/Community/posts.php?topic=75279#841435 and here is an example of a flat track style that I'm after (the second picture)
http://www.blitzbasic.com/Community/posts.php?topic=81964

One approach I tried (as shown below) is to load the previously created tile track from my 2d game and create cubes for each tile, but I think this would be too resource intensive, so can anyone explain to me in basic terms what a simple but good approach would be.

	Local noobjects:Int = ReadInt(ts_loadmap)
	For Local j:Int = 0 To noobjects-1
	
		
		track= New trackType
		track.mesh=createCube()
		track.id = ReadInt(ts_loadmap)
		track.x = ReadInt(ts_loadmap)
		track.z = ReadInt(ts_loadmap)
		scaleEntity track.mesh, 6,0,4
		EntityAutoFade track.mesh, 200, 120

		
		positionentity track.mesh,track.x*8-200,track.y,track.z*8-200
		ListAddLast trackList, track
	Next
              CloseStream ts_loadmap


thanks

Last edited 2011

Last edited 2011

Last edited 2011

Last edited 2011

Last edited 2011

Last edited 2011


ima747(Posted 2011) [#2]
Many options. Simplest would be to load a texture onto a surface, maybe just a cube again to keep things simple. Scale it up as needed. Other options would be model and texture a track in a modeling program like blender. If you already have map data I would go with something more code intensive and build a mesh from scratch. Make a new mesh, add a single surface, and then define faces on it and texture them from a master texture... Many many more ways as well, that's a few options to hopefully get you started. Good luck!


redmoth(Posted 2011) [#3]
Thanks for the ideas! I've decided to try modeling a race track, as it's something I'd like to learn, using blender or wings3d, as I've found tutorials for them


redmoth(Posted 2011) [#4]
Thanks for the ideas! I've decided to try modeling a race track, as it's something I'd like to learn, using blender or wings3d, as I've found tutorials for them