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.

Newcomers DBPro Corner / I'm a Novice that wants to create a drive around cityscape

Author
Message
efandango
17
Years of Service
User Offline
Joined: 13th Mar 2007
Location:
Posted: 14th Mar 2007 01:14
Hello all,

I want to create a cityscape that i can drive around. It's not a game as such, more just a way to drive from one waypoint to another. something simple with just roads and exterior buildings, with the ability to detect when a user has reached a waypoint.
Ideally, I would like to be able to submit a basic outline bitmap of a street map which the software can 'trace' the outlines and create roads and sidestreets from. I realise this is probably asking for too much, but it would be a great way for novices like me to get started.

Ubtil then though, can you people recomend the best software to use for just building a basic street level cityscape that can be drveable?
Sonic 91 Software
19
Years of Service
User Offline
Joined: 19th Mar 2005
Location: In a Cryptic Crossworld!
Posted: 14th Mar 2007 11:47 Edited at: 14th Mar 2007 11:48
there are a lot of modelling programs you can use, some of which are free. personally, i use:

deled lite
anim8or
caligari truespace 3.2

all of the above are free. for building a city, i would recommend deled lite. it is easy to use. which programming language are you using?

"Fight the good fight of faith,
Lay hold on eternal life"
-1 Timothy 6:12
efandango
17
Years of Service
User Offline
Joined: 13th Mar 2007
Location:
Posted: 15th Mar 2007 18:32
Thanks for the feedback. Is the learing curve steep on those.
regards a programming language; i was hoping that i could find something that did not require much (if any) programming, is this possible. I would like to empathise that I am not looking for state-of-the-art lightshading, etc. Just somehting that will allow me to 'paint' navigable roads and put place facades of buildings on the streets.
Sonic 91 Software
19
Years of Service
User Offline
Joined: 19th Mar 2005
Location: In a Cryptic Crossworld!
Posted: 15th Mar 2007 23:27 Edited at: 15th Mar 2007 23:30
unfortunately you won't get far creating games without programming, you can use "the 3d gamemaker" or "fps creator", neither of which use programming, however neither of which are capable of making the kind of game you are describing. if you wish to start programming, and i highly recommend it, buy dark basic professional. the learning curve is not that steep, it is fairly simple to use and you can create just about anything with it. of course, you will always have the back-up of the many members of the forums to help you out if you need. to create the sort of buildings you are describing, use deled lite. it is free, and you can download it at the official website: http://www.delgine.com

i hope this helps. good luck, and welcome to The Game Creators.

(by the way, I started out with The 3D Gamemaker as I didn't quite fancy programming either. But once I bought Dark Basic, I was so glad to start programming, it is a lot of fun. I am now on Dark Basic Professional.)

"Fight the good fight of faith,
Lay hold on eternal life"
-1 Timothy 6:12
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 16th Mar 2007 05:01
Mini-Lesson Time

Ok, lets break this up into parts. We basically want to create a game whereby you drive a car from 1 waypoint to the next, and when you reach each waypoint, a new one is given to you.

A good starting point for making any program is to cut it into sections:

1. Create a box to represent a car model, give us the ability to move the box around in a 3D world, program our camera to stay behind the box, and create a matrix so we have some sort of an environment to move around in.

2. Program a routine to place boxes randomly around in our world, to represent buildings.

3. Detect collision with buildings and handle appropriately.

4. Program a waypoint system (we'll break this part up more when we get to it)


Keep in mind this isnt a tutorial, I wont be going in-depth into anything, just providing basic explanations. Ill stick to my usual style and give code first, explanation after.

Vehicle Handling Code:


The first line sets up our application. Then we make our vehicle object and a matrix. Pretty simple so far.

camHeight# is the height of the camera, and camDist# is the distance behind the vehicle of the camera.

Kind of in a rush now so I wont be explaining much at all now...

Ok add random buildings (add this above the variable declaration for the camera)...



Which basically makes 49 buildings of random size and location.

Now we'll program the collision. Again this is basic hit-stop collision, for better collision detection methods and handling do some forum searches. Basically, we use the AUTOMATIC OBJECT COLLISION command. Very primitive compared to other collision routines, and I highly recommend looking up collision tutorials on these forums.

Add this code after the vehicle positioning line;


And thats that, collision is now handled. Nifteh.

Finally, the waypoint system. Here's the entire game's code, waypoints and all;



The waypoint object is object 51. After setting some basic effects like fading it a bit, colouring it green, and constantly positioning a green light at it's position, we generate a random position for it. wx# is it's x position, and wz# is it's z position. The object collision command is used to detect when our player object 1 collides with the waypoint object 51, when that occurs, we generate a new x and z coordinate for the waypoint.

Tips:

- Replace the building creation code with a custome-designed map of a city, so you can ensure buildings wont overlap and can avoid programming a smarter map generator to do so for you.

- Change the collision routine to sliding collision

- Allow the car to speed up/slow down, and turn sharper/less sharp depending on it's speed.

- Store everything in variables for better reference, such as waypoint = 51, city = 2, vehicle = 1.

- Add some cool effects like clouds, a skysphere, better fog, some shaders, a pulsing/glowing waypoint, and sound effects.

- Finally, add a game over screen and a goal to the game. Whereby the user must get as many waypoints as they can before time finishes.

- Also, you'll want to do the waypoint positioning system differently. Store all possible positions for the waypoint in an array before the game runs, this way you can chose where you want the waypoint to go, then pick randomly from this array a position for the waypoint. When a position is used, use a type structure to let your program know it's been used, so you can later make your program use unused waypoints everytime.

- Add a start screen, a pause menu, and you're done. You've got yourself a game.

Keep in mind all of the tips I've mentioned have been covered numerous times on the forums, so do some searches before posting asking for help on them.

Goodluck, sorry I couldnt be more descriptive, I havent tested the code but it should all work unless I made a typo, double checked it and it seems in order,
- RUC'

Zombie 20
17
Years of Service
User Offline
Joined: 26th Nov 2006
Location: Etters, PA
Posted: 17th Mar 2007 08:39
Thanks ruccus, that was a great explination, but, i don't think this is going to work for dbc.

Error:Syntax
Code:

AUTOMATIC OBJECT COLLISION 1,20,1

"You can't expect to weild supreme executive power just because some watery t**t throws a bl***y sword at you..."
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 17th Mar 2007 13:55
Remove the line, does it compile? If thats the case its just a matter of writing a few lines to replace the collision routine.

Login to post a reply

Server time is: 2024-09-25 19:22:57
Your offset time is: 2024-09-25 19:22:57