RMXP Map co-ordinate system

Started by Ryex, February 15, 2010, 08:04:49 pm

Previous topic - Next topic

Ryex

It seems to work REAL weird
In my dynamic sounds system I have been doing some work to make it work off event comments. that went fine.
I used event.x * 32 and event.y * 32 to place the sources
and the same with the player taking the x and y value sand multiplying them by 32 to the the pixel value of the players position. but for some reason everything seems just a bit off and gets further off the farther you get from the top left corner of the map.

multiplying by 32 should give the right co-ordinates correct? what is going on?
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Blizzard

1. Pixel movement scripts can mess it up. That includes Blizz-ABS.
2. You might want to include $game_map.display_x and $game_map.display_y in the position calculation as well. They are x and y times 128, so there are 4x4 x,y coordinates in one pixel.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Ryex

ya i Know pixel movement would mess it up, that's why I included the pixel_offset constants in the DEE module by default they are set to 32 and can be changes for a pixel movement system.

in any case I was being a idiot. I had wrote the system so everything was treated as if it was in the top left of the squares but was expecting it to react as it the client was in the middle of the square. once I correct that it will work fine.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />