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 / Re: Cubed Doors and objects for the newbie

Author
Message
Scheme
14
Years of Service
User Offline
Joined: 13th May 2010
Location:
Posted: 14th May 2010 04:58
Hi all

I am a relative newcomer to the world of DPPro and am struggling with some 3D apsects...

I do have some familiarity with BASIC as a language though

I've built a 'world' using an array and cubes to form a Wolfenstein3D-esque level. my issue lies with doors..

I built the array using a 64x64 grid with 0=nothing 1=wall 2=door
e.g


and the code looks like this...






level1
data 111211
data 100001
data 100001
data 111111
===================================================
I can differentiate between 'walls' and 'doors' but i dont know how to collide correctly with objects.
(Just using "control camera with arrowkeys" and 'automatic camera collision')
Am i able to 'read' which object the camera collides with or do i need to setup my own collision detection code for objects?
Also are there any good tutorials about object collision and detection. Ive done a search but it seems to bring up stuff about FPSC which i dont think is relevent to this project.
Im doing quite well i'd say for 20days lol and dont really want to be hindered by doors lol.. Stuck in a room is no fun for the player!
Thanks in advance
Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 15th May 2010 03:47
Well I wish you the best of luck! It looks like you've got a pretty solid beginning. One quick thing, I strongly suggest staying away from goto. You should be able to control the program's flow without it. In this case, you can simply remove
and the program will work just fine without it.

As for collision, I swear by Sparky's Collision DLL. A lot of people seem to have difficulty figuring it out at first, but once you do, you're set for your collision needs.

I'm not sure if that's what you're looking for, or if you were looking to write your own collision detection system, but the latter sounds rather advanced for someone who's just started out.

TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 17th May 2010 02:59
Quote: "Also are there any good tutorials about object collision and detection"


http://forum.thegamecreators.com/?m=forum_view&t=99497&b=10

Number 10 covers collision and number 18 might also be useful if you want to know more about avoiding Goto (I agree with Kira Vakaan that using Goto is a bad idea).

TDK

Login to post a reply

Server time is: 2024-11-24 16:08:04
Your offset time is: 2024-11-24 16:08:04