Jump to content
• Advertisement

#### Archived

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

# pixel by pixel vs pixel by tile scrolling?

This topic is 5933 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

##### 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

##### 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

^ bump ^

#### Share this 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

##### Share on other sites

• Advertisement
• Advertisement

• ### Popular Contributors

1. 1
2. 2
3. 3
4. 4
5. 5
Rutin
15
• Advertisement

• 14
• 9
• 9
• 9
• 10
• ### Forum Statistics

• Total Topics
632912
• Total Posts
3009199
• ### Who's Online (See full list)

There are no registered users currently online

×

## Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!