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 / pls need help

Author
Message
steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 21st Jul 2004 21:07
right ive made a level in c shop and i want to load it onto dbc ive done that by saving it as a .x format but i already have a matrix so i load it on position it on the matrix and i position the camera on the level and i cant move so can somone tell me how to walk on the level i dont mind if it means getting rid of the matrix i just want to walk on the level and make the enemys walk on the level pls help
if u dont get what i mean tell me and i will right it again pls help

i used to be indecisive but now ime not so sure
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 21st Jul 2004 21:39
If you mean that the camera is just passing through the level, and not staying above it, or following the flow of the landscape, then what you need to do is put in collision for the camera with the level.

I suggest that you go over the the NG site, and grab their free DLL and try to impliment that into your code.

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 22nd Jul 2004 02:33
no what i meant is i get rid of the matrix and position the camera above the level well you know just a little bit above it so it looks like your walking and the camera doesent move when you press up or whatever

i used to be indecisive but now ime not so sure
Kohaku
21
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 22nd Jul 2004 10:55 Edited at: 23rd Jul 2004 04:32
Do you use DBC or DBP Irish dude?

Infra-Dark
#coding, like coding, but with a #
http://www.knova.dbspot.com/
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 23rd Jul 2004 16:00
Did you write the routine for camera movement and collision?

"eureka" - Archimedes
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 23rd Jul 2004 17:20
To add to the pile - Can we see some code please?

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 24th Jul 2004 05:15
1.i use dbc

2.no i took it from a tutorial code for walking on the matrix but i might of changed it a bit

3.code


thats oviously just the movement and loading code

well the reason i think its not working is because i took it from the tutorial code for walking on the matrix but ive tried just putting move camera 10 and whatever and that still dont work

thanks

i used to be indecisive but now ime not so sure
Balid
21
Years of Service
User Offline
Joined: 21st Nov 2003
Location: MI, USA
Posted: 24th Jul 2004 07:40
irishfool,

Somewhere in your main loop (I assume you have a main loop) you will need to (re)position your camera.

Kohaku
21
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 24th Jul 2004 12:12
Quote: "i just want to walk on the level"


You may want to try out this code then. Its made so that you can easily walk around an X, or 3DS format level.

Just Stick your level in the bit that clearly tells you to do so. Then you can learn from that code, and implement it into your own.

Its still being made by the way so don't expect too much.

http://forum.thegamecreators.com/?m=forum_view&t=35342&b=6

Infra-Dark
#coding, like coding, but with a #
http://www.knova.dbspot.com/
steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 24th Jul 2004 22:34
thanks but i just sink through the floor it is good code though but isnt there a way to just make the camera move then i can do all the collision and stuff to make it look like your walking on the level
thanks again sorry to be a bother

i used to be indecisive but now ime not so sure
Kohaku
21
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 25th Jul 2004 05:20 Edited at: 25th Jul 2004 10:08
I found myself sinking through the floor with some X models, and walking around them fine in some others aswell. I'll look at the code again. Its more than likely the plain that I'm using for ground collision, lets try a cube...

[Edit]How did I put 'groung'?[/Edit]

Infra-Dark
#coding, like coding, but with a #
http://www.knova.dbspot.com/
steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 25th Jul 2004 06:41
thanks should i just put that code in where the moving code is on mine and the other bits where appropiate you know just trie out places or whatever and change bits to what i need

i used to be indecisive but now ime not so sure
Kohaku
21
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 25th Jul 2004 10:11
Yeah sure. Just make sure you learn from the code.

Infra-Dark
#coding, like coding, but with a #
http://www.knova.dbspot.com/
steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 26th Jul 2004 04:18
umm no offence but ime finding it too hard to use your code but ive made the camera move by putting just move camera 10 but wherever you aim the mouse it moves to like up into the sky or whatever is there anyway to stop it so if you look up and press the upkey it will only move forward and not wherever aim the mouse pls

i used to be indecisive but now ime not so sure
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 26th Jul 2004 06:24
move the camera forwards and then set it back to the ground height, just get the ground height at your position

floor#=get ground height (1,camera position x(),camera position z())

then just place it at the floor height plus a bit (cos you don`t want to actualy be at floor height since you would be embedded)

position camera camera position x(),ground#+0.5,camera position z()

so what happens is the camera does fly into the sky, but you then place it at the floor, so it acts as though it is magneticaly attached to the floor, so that you don`t see the in-between movements, you need to turn on the manual sync, that way the computer will only draw screens when you tell it to, so at the very start of the program, tell it you are going to handle the sync with

sync on:sync rate 0

then in the main loop at the very end do

sync

that tells the computer "ok..I made all the changes I want, show me what the scene looks like now", that should be some help (this is meant to work alongside the matrix BTW)

Mentor.

PC1: P4 hyperthreading 3ghz, 1gig mem, 2x160gig hd`s, Nvidia FX5900 gfx, 6 way surround sound, PC2: AMD 1.2ghz, 512mb ram, FX5200 ultra gfx, stereo 16 bit soundblaster.

Login to post a reply

Server time is: 2025-05-24 22:49:19
Your offset time is: 2025-05-24 22:49:19