Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
11 years, 1 month ago
Ok so I'm trying to make a nice little RPG game in Java & Slick2D engine, the tiles are 16x16, so the collision array is also 16x16, how ever my character sprite is 16x20
What would be the best method of moving the character in relation to a 16x16 grid, also checking for collision?
Apr 27, 2012 at 23:39
43 3 3 bronze badges
What you should do is keep characters separate from tiles, but in terms of placement, just have a position at like feet/bottom of the sprite and align that with the bottom edge of the tile. And for collision checking, you could use a rectangle intersection check based on maybe the bottom quarter of the player or the size of the tile even. Experiment
Apr 28, 2012 at 1:15
2,228 12 12 silver badges 17 17 bronze badges
log in to answer this question.
Not the answer you're looking for? Browse other questions tagged
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only