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 / Splitting up a map for collision

Author
Message
Murdock 743
20
Years of Service
User Offline
Joined: 16th Jun 2004
Location:
Posted: 1st Apr 2008 01:39
Here is my issue: basically I want to devide my map into 32 by 32 squares via an array. For my test I used a image 320x320 pixels. Which I uploaded, I also posted my code in the snipplet below. Basically the gray area is supposed to be a wall you cannot pass. Thank you for any help.

Cheers,
Christian

Attachments

Login to view attachments
Murdock 743
20
Years of Service
User Offline
Joined: 16th Jun 2004
Location:
Posted: 1st Apr 2008 22:34 Edited at: 3rd Apr 2008 14:49
Righty o' I have been messing with pizzaman's code and came up with something like this

It seems to not collide and when I "walk" off the map it crashes.

Cheers,
Christian
-edited code and error
Murdock 743
20
Years of Service
User Offline
Joined: 16th Jun 2004
Location:
Posted: 5th Apr 2008 00:16 Edited at: 5th Apr 2008 18:33
So, I have been doing more tweaking and I have created a code that looks like this


The issue that I am getting is that I get the error "image number illegal at line 189" those specific lines are

This is code made by pizzaman that I have adapted. Thanks for any help.

Cheers,
Christian

N.B. the tiles are 64 x 64 including the sprite

I fixed it nevermind

Login to post a reply

Server time is: 2024-11-25 06:37:20
Your offset time is: 2024-11-25 06:37:20