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 / 3D platformer help

Author
Message
Red general
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: United Kingdom
Posted: 14th Apr 2003 22:44
I am working on two platformers. Both will end up being semi-Mario. The first one is a 3D take on "D (side scrolling). At the moment I have this coding:


When I run into the wall, the character stops. Unfortunately, he cannot get away - he can jump, but he is still stuck to it like a fly on flypaper. I don't know how to solve this (it is strange)

The other problem is my other 3D platformer (uses same basis but more like mario64).



It probably has a simple answer,but I can't find it. I don't know how to make the camera behind him and follow him round

O
x
|
|
|
The camera (O) should be roughly behind and above the character (marked by x and dashes). Unfortunately it can't following him. So I need help


Thanks
RED GENERAL
My computer melts regulary - perhaps it likes being fondue
Red general
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: United Kingdom
Posted: 14th Apr 2003 22:47
Sorry about that, The illustration has lost all its spaces
Wierd, try this
O

x
|
|
|


RED GENERAL

My computer melts regulary - perhaps it likes being fondue
Red general
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: United Kingdom
Posted: 14th Apr 2003 22:48
That didn't work either, so use your imagination (camera should be closer to object).

RED GENERAL

My computer melts regulary - perhaps it likes being fondue
Hell IVIonkey
23
Years of Service
User Offline
Joined: 1st Apr 2003
Location: Outer Limits
Posted: 15th Apr 2003 03:32 Edited at: 15th Apr 2003 03:43
Ok, I just finished a collision demo. I think it's pretty revolutionary, since it is EXACT collision instead of just stopping the player from moving if he's within a certain range from an obstacle.

If you can understand it, you may use this as a reference, but be sure to cite me appropriately if so. http://thehobbit.mine.nu/ColTest.zip

Controls:
U,D,L,R = directions.
SPACE = jump.
q = quit (frees up memory too).
freak
23
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 15th Apr 2003 03:33
your asci illustration looses all those spaces because its rendered as html (in which multiple spaces are alwayc reduced to one space).
You have to set your illustration between the
tags to keep those spaces.
Hell IVIonkey
23
Years of Service
User Offline
Joined: 1st Apr 2003
Location: Outer Limits
Posted: 15th Apr 2003 03:41 Edited at: 15th Apr 2003 03:41
As for the 2nd question, just check the tank or scorpion/water demo that came with DBC. (or several others)
Danmatsuma
23
Years of Service
User Offline
Joined: 2nd Mar 2003
Location: Australia
Posted: 15th Apr 2003 07:52
set camera to follow works fine for me

ZX Spectrum 48k Issue 3, Radio shack Tape drive, Rank arena 12" T.V. set.
Red general
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: United Kingdom
Posted: 15th Apr 2003 18:48
Hell IVIonkey, your demo does not work, the map is missing, so I cannot see the effects. Could you put up the map

Thanks
RED GENERAL

Also how do set the amera to follow Danmatsuma?

My computer melts regulary - perhaps it likes being fondue
Hell IVIonkey
23
Years of Service
User Offline
Joined: 1st Apr 2003
Location: Outer Limits
Posted: 15th Apr 2003 21:21
The program isn't meant to run on its own. I just included the DBA file so that you could see what it looks like. Just run the executable. If you really want the map, I have it up at http://thehobbit.mine.nu/coltest.lvl , but you will still be missing media, such as the player model and texture, and the objects. Try just playing with the code and making it fit your own situation instead
ReD_eYe
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 15th Apr 2003 21:54 Edited at: 15th Apr 2003 22:11
i just use the point camera command to point the camera at the player object and then the position camera command to place the camera up and behind the player

here is some code using these commands and it also has basic collision.

btw there's no text box for code when you edit a message

'You were born crying while people around you smiled'
Danmatsuma
23
Years of Service
User Offline
Joined: 2nd Mar 2003
Location: Australia
Posted: 16th Apr 2003 07:01 Edited at: 16th Apr 2003 07:08
basically:


The one at the end is a flag, set it to one if you want the camera to avoid static collision boxes automatically.
It's a powerful command and takes a lot of work away from simple camera tracking. If you get creative with what you do with the height, distance, fade and angle variables you can make some pretty smart camera routines
[edit]
Oh yeah and if you set the camheight# significantly high, you might wanna add an

or


ZX Spectrum 48k Issue 3, Radio shack Tape drive, Rank arena 12" T.V. set.

Login to post a reply

Server time is: 2026-06-11 21:23:24
Your offset time is: 2026-06-11 21:23:24