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.

2D All the way! / tile collsion problem

Author
Message
kRx
21
Years of Service
User Offline
Joined: 2nd Apr 2005
Location: Canterbury, Kent, UK
Posted: 19th Jun 2005 23:10
hi
im using a top down tile map similar to old school final fantasy, this map moves by moving the camera keeping the sprite in the middle of the screen. which is great, then relised to make shops etc im going to have to put them as tiles and i know to get any collision done ill have to use 3-dim arrays. problem is i cant it to work i have posted the code and media so of u could kindly advise me on what im doing wrong.

i appreciate any help

kR

kR
pizzaman
22
Years of Service
User Offline
Joined: 18th Feb 2004
Location: Gateshead, UK
Posted: 19th Jun 2005 23:31 Edited at: 19th Jun 2005 23:33
The problem is the camera commands are only for 3D objects, and not 2D sprites.

You have 2 main options to solve this problem; use 3D textured planes locked to the screen, or use a 2D tilebased system.

I'm not sure how to do the 3D version as I haven't used 3D very much, but for the 2D version I wrote some example code in the code base.

EDIT A link to what I wrote is http://www.thegamecreators.com/?m=codebase_view&i=0ee878a92195ee8c39c59bc3196e47d1

kRx
21
Years of Service
User Offline
Joined: 2nd Apr 2005
Location: Canterbury, Kent, UK
Posted: 20th Jun 2005 01:25
hi sorry but ur code was in DBP i forgot to mention the source is DBC

kR
pizzaman
22
Years of Service
User Offline
Joined: 18th Feb 2004
Location: Gateshead, UK
Posted: 23rd Jun 2005 00:41 Edited at: 23rd Jun 2005 01:03
I'll have a go at converting to DBC, but I'm not sure when it'll be ready. However the basic principles are in the code, so you could try and disect the code and have a go yourself.

EDIT
I've converted the code to work with DBC, I took quicker than I thought.



Login to post a reply

Server time is: 2026-06-12 09:26:03
Your offset time is: 2026-06-12 09:26:03