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 / Moving realistically over terrain

Author
Message
Stevie
User Banned
Posted: 7th Jul 2004 10:56
Okay, so i have made my landscape in geoscape - ecported it as an .x file and loaded it into darkbasic. Instead of moving through it - how do i program the code so i seem to move up and down the terrain>???? and also to collision detection it so my character doesnt walk through the scenery - and not over it???

Also why is the lanscape i have made - which was based on the default landscape when geoscape is loaded - seem small - how do i alter the scale?
gothboy 101
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Watonga, ok, usa
Posted: 7th Jul 2004 13:10
do you have a collision code?

jacob warren
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 7th Jul 2004 19:32
Are you using DBC or DBPro?

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
Stevie
User Banned
Posted: 7th Jul 2004 19:40
When i use a little program to use the cursor keys to move an object up and down and side to side - why does the cobject seem to curve around as though its following the path of a sphere???? when i press up or down??? If this is cos its a 3d object - then why does it not in and out - and not around??

Steve
Stevie
User Banned
Posted: 7th Jul 2004 19:41
What is the difference between a sprite and a 3d object??? Is a sprite 2d??? and an object is 3d???
and when would u use sprites??/
Stevie
User Banned
Posted: 7th Jul 2004 19:42
How do u use doors within the framework of the 3d object???? In cartographer shop would u make the construction so that there is a hollow for the door?? and use an object to simulate the door? If this is the case - then how would u get the door to fit exactly into the doorframe, and open realistically???
Stevie
User Banned
Posted: 7th Jul 2004 19:45
When i design a map in Geoscape's Terrain editor - how do i set it up - so that the moutain range or landscape looks really big?? Is there a setting that extends the display - and how do u do the setting for the height, so the peaks look really big???/

Also i could not understand how when u save it as a DB matrix file - to get it working in dark basic. I saved it as an .x file which seems the easiest way to do things. Is it???
Stevie
User Banned
Posted: 7th Jul 2004 19:46
A question on animation. When in games u see the characters animated or the player - picking up ammo, opening doors etc - is this actually the wireframe model being manipulated from DB or is it using PLAY LOOP or whatever to play out the animation sequence for that particular section of the game?
Stevie
User Banned
Posted: 7th Jul 2004 19:47
how do you write a routin that moves the enemies in the game realistically. Rather than writing a lot of move object..... left.... right or whatever - is there a global routine that will do this realistically - and then how would u get them to follow you ??
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 8th Jul 2004 22:38
Stevie you hsould really answer the questions of people who ask them before asking more, a sprite is a 2D object like an image and a object is 3D and ranges from primivtives like speheres and stuff to animated models of cahracters and cars...

Got anime?
I do.
Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 9th Jul 2004 00:18
Hey Stevie, there is an edit button .

Athelon XP 1600+/Radeon 9600 Pro/256 RAM
Ocean Runner
21
Years of Service
User Offline
Joined: 18th May 2003
Location: United States
Posted: 9th Jul 2004 09:19 Edited at: 10th Jul 2004 05:51
Post 1)If the landscape were a matrix, then you could use get ground height, but you said it was an x file. one way to do it would be to take you player, and gradually move him down until he was colliding with the terrain object. Then you could stop moving him down.
For scenery, you would have to see if he had any collision with scenery. Then, If he did, you would revert him to the position he was in before he knocked into the scenery.
To make it bigger (or smaller) use the scale object command.

2) I'd have to see your movement code.

3)Yes, sprite is 2D and an object is 3D. You would want to use a sprite if you were making a 2D game.

4)I am not sure if I understand what you are saying. If you mean, how would you position a door object inside a frame correctly and make it move, then you would get the empty spaces height, width, and position, and make a door to fit the specifications and position it correctly.

5)I have never used Geo Scape 3D.

6)It is an animation being played.

7)To get computer controlled to move realistically, what you have to do is this. Make very simple AI code, and watch what they do. If they are doing something unrealistically, change the code. Repeat.
To make the opponent follow you, one way (not taking into account terrain and stuff, as that would be VERY complicated to code) is to simply get the enemys coordinates and make them more like the player's coordinates.

What that does is checks and sees if the opponent has a greater x coordinate than the player. If it does than it will decrease the x coordinate, which can be used to reposition the enemy closer to the player. It then does the same thing for the z coordinate.

"Computers in the future may weigh no more then
1.5 tons. - Popular Mechanics, 1949

Login to post a reply

Server time is: 2024-11-27 00:24:32
Your offset time is: 2024-11-27 00:24:32