View Single Post
Old 04 September 2016, 16:03   #15
Master484
Registered User
 
Master484's Avatar
 
Join Date: Nov 2015
Location: Vaasa, Finland
Posts: 525
Quote:
WRT Bobs - one good thing about games of this type is that the bitmap Y-position for the bob also equates to the Z-position (into the screen), so a quick bubble-sort for viewable bobs will result in the paste order, ensuring that the bobs towards the 'front' of the play area are drawn last.
Yes, although a small offset correction to the drawing Y position is still needed for each character, because they can have different heights. So instead of the Blitting position Y we have to check the "feet Y" coordinate, that is the Y point where the bottom pixel row of the characters feet is located.

But other than that, it should be quite simple and semi-automatic; each frame a "drawing list" is constructed according to the feet Y, and the characters whose feet are higher on the screen are drawn first.
Master484 is offline  
 
Page generated in 0.07025 seconds with 11 queries