• Advertisement

Archived

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

Drawing objects wider than 1 tile

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

Hi How to draw object''s wider than 1 tile? That about colision detection? Do I have to cut the image into tiles? KriS

Share this post


Link to post
Share on other sites
Advertisement
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

  • Advertisement