• Advertisement

Archived

This topic is now archived and is closed to further replies.

pixel by pixel vs pixel by tile scrolling?

This topic is 5756 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i''m doing a little super mario bros clone right now and i''m guessing it uses pixel by pixel scrolling instead of pixel by tile. does anyone know for sure? is it just a tile-engine with pixel by pixel scrolling? my engine is a tile-based engine... what would be the best way to include pixel-by-pixel scrolling in a tile-based engine? thanks for any help, gary

Share this post


Link to post
Share on other sites
Advertisement
quote:
Original post by llamaboy
what would be the best way to include pixel-by-pixel scrolling in a tile-based engine?


Read the generic article here and the DirectX article here to get an idea on how to do pixel-by-pixel scrolling with tiles.

Share this post


Link to post
Share on other sites
Awesome. Thanks!

Is implementing collision detection in a pixel-by-pixel engine harder than it would be in a pixel-by-tile engine?

Thanks again,

Gary

Share this post


Link to post
Share on other sites
No, it''s easy enough.

In tile-by-tile, you''d just check the map array to see if there''s a wall to, for example, the left of the player:

is_wall = map[player_x - 1][player_y]

In pixel-by-pixel, you do the same thing, only you test whenever the player is at the exact tile-position, by using modulo


if ((player_x % tile_width) == 0)
is_wall = map[(player_x / tile_width) - 1)][player_y]


This should work.

A 2D Developer''s Board

Share this post


Link to post
Share on other sites

  • Advertisement