Easy way to do this?

Blitz3D Forums/Blitz3D Beginners Area/Easy way to do this?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

easy you have to draw your player sprites beetween the ground layers and the upper layers.

for exemple when blitz draw the scene it may draw the whole thing like this

[layer 0]ground tiles
[layer 1]low objects tiles (such flowers, etc all the stuff the player is above or that can block the player)

HERE YOU DRAW THE PLAYER AND ALL MOVING SPRITES

[layer 2]upper objects layer 1 the objects the player alway pass under
[layer 3]upper objects layer 2 upper than [layer 2]
etc...


here's a trick

use 2 images buffers draw the layer0 and the layer1 on a buffer and the other layers on a second buffer, remember to use the transparent color as background color for the second buffer. then each frames you can

- drawblock the ground buffer this erase all graphics on screen
- draw the players monster etc

- drawimage the upper buffer

so you just have to draw all the layers one time then just update the animed sprites positions