Archived

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

KriS-XK

Drawing objects wider than 1 tile

Recommended Posts

Depends on how you define a tile to be passable or not. If that information is in the map you don''t need to cut the image up. If it''s in a seperate tile struct, you''d probably be better off cutting it into tiles.

Ben

Share this post


Link to post
Share on other sites


If i use TANSTAAFL render method...to bltfast object (for example ''House'' )on tiles, It cannot display object when scroll.



Layer 1:
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0

0 is grass tile on layer1, 1 is house tile on layer1

(If the (4,4) flag is not visible on screen, then the house disappear.)

Did need break the house tile(320x320) to small pieces(64x32) ?

Share this post


Link to post
Share on other sites
Cutting it up would be the choice i would take ! How i solved a similar problem, is that i made 2 layers: Terrain and Objects ! They both used the same tileheight and tilewidth, and when i scrolled, i scrolled both layers with the same speed. It''s kind''a slow, but it''s lot easyer to code ! If the object was smaller then the terrain tile size, then i just blitted it, creating a new array of "object tiles" !

"Find the path, follow the Master... Follow the master, understand the master... Be the master !

Share this post


Link to post
Share on other sites