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 / 2d, I need help please

Author
Message
RebirthAnime
22
Years of Service
User Offline
Joined: 11th Oct 2002
Location:
Posted: 27th Sep 2003 02:45
I'm having problems with making my collision map. I'm trying to use the same idea I used to make the tile and sprite map when making my collision map. Each tile is 64x64, and there are 20 across and 20 down, but I'm trying to make a 32x32 cube cutout from a solid black tile as my collision box (that of which the character cannot walk onto) and everything works fine up until the point of execution. Once you get into the game the character can't walk any farther left or up from where he starts (280x240 is his starting point) and then he can walk down a little ways (610 pixels I believe) and he stops at the point..as if my collision map is only making it a 610x610 area where he can walk, then the collision wall. On my large map the 9s are the transparent tile that can be walked on..they are 64x64, and the 10s are the collision tile (32x32). Can anyone else help me figure out what I'm doing wrong? I've been working on this for a while now and havent' been able to fix it. The hyperlinks go to my bitmap files if anyone wants to use the code and pictures to see for themselves the problem.

http://home.gcn.cx/ryuujin/blocks.bmp
http://home.gcn.cx/ryuujin/charwalkup.bmp
http://home.gcn.cx/ryuujin/charwalkdown.bmp
http://home.gcn.cx/ryuujin/charwalkleft.bmp
http://home.gcn.cx/ryuujin/charwalkright.bmp
RebirthAnime
22
Years of Service
User Offline
Joined: 11th Oct 2002
Location:
Posted: 27th Sep 2003 02:48
Quote: "cube"


^ sorry about that...box I mean..this is all 2d

Quote: "On my large map "


^ on my large data collision map
HardBoot
21
Years of Service
User Offline
Joined: 10th Sep 2003
Location: Earth
Posted: 27th Sep 2003 16:03
is that your exact code? if it is, how do your maps even load? dont they need tags? ie..

map01:
data 99999
data 99999

and the collision map has extra entrys(i think) which could be cuasing the collision problem.
RebirthAnime
22
Years of Service
User Offline
Joined: 11th Oct 2002
Location:
Posted: 28th Sep 2003 07:41
that's my exact code and loading the map works fine....you can check it out yourself if you'd like..well show me what you think is causing the problem because I have no clue..lol
HardBoot
21
Years of Service
User Offline
Joined: 10th Sep 2003
Location: Earth
Posted: 29th Sep 2003 01:34
recounted and the entries are fine. hehe
Put the code in and i can move from 0,0 to -610,-610 ! Well, i dont know if thats good or bad for you :p

btw, using yellow and black stripes for a background is a BAD idea, i just about had a siezure!
RebirthAnime
22
Years of Service
User Offline
Joined: 11th Oct 2002
Location:
Posted: 29th Sep 2003 03:51
hahaha...that sucks.....well my intention is to be able to move my character across the whole map, but any area that's marked with the 10 he should not be able to walk over, but I still haven't figure it out
HardBoot
21
Years of Service
User Offline
Joined: 10th Sep 2003
Location: Earth
Posted: 29th Sep 2003 10:26
i think im misunderstanding your problem.
RebirthAnime
22
Years of Service
User Offline
Joined: 11th Oct 2002
Location:
Posted: 29th Sep 2003 17:24
well I think you're misunderstanding my REAL problem..that's the collision problem I was having..read the top post for any details about it..the other problem I had was with the transparency on my 3rd layer (collision) but that's not a big deal really..I'm just worried about the collision
HardBoot
21
Years of Service
User Offline
Joined: 10th Sep 2003
Location: Earth
Posted: 2nd Oct 2003 02:09
ok, i think i get it.
You want your char to go from 610,610 to -610,-610, right? I will mess with your code, see what i can come up with.
At the least i will help to keep this thread up top so someone else can help ya :p
Mattman
21
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 2nd Oct 2003 02:19
there is a command to make negatives of a number (I forgot it )

Got a knack for finding secrets??? Jingot Racing --- A new brand of Racing --- Only from Nightwatch Studios
"hey, it's tomorrow" --- Hamish
Owl
21
Years of Service
User Offline
Joined: 28th Sep 2003
Location: Imatra, Finland
Posted: 2nd Oct 2003 02:37
Umm. Make negatives of a number? Doesn't - suffice?

numbernegative = -number
koshi
21
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Cyberspace
Posted: 4th Oct 2003 03:51
unless its already a negative number, then itll become a positive and just placing a negative in front of a variable doesnt work in db.

negativenumber=abs(number)*-1

that should work.

"Hello this is the suicide hotline, please hold..."
http://www.rovokaa.tk/ -
RebirthAnime
22
Years of Service
User Offline
Joined: 11th Oct 2002
Location:
Posted: 5th Oct 2003 19:16
question is..will that fix my problem that I'm having with the collision box being too small, to where it's only allowing me to move 610 pixels to the right and down instead of it reading the 10s as the area to not be able to walk over, and the other numbers able to be walked over

Login to post a reply

Server time is: 2024-11-25 10:21:06
Your offset time is: 2024-11-25 10:21:06