VBGamer |
|||||||||||||||||||||||||||||||||||||||||||||||||||||
RE: Layers and Sprites? Mattman (2 replies, 0 views) (2000-May-24) Note: This is pseudo-code, not actual coding ;P
<PRE>
Dim a As Integer, b As Integer
Clear Backbuffer
For a = 1 To MapWidth
For b = 1 To MapHeight
Draw Ground tile to BackBuffer at (a * TileWidth, b * TileHeight)
Draw BG tile to BackBuffer at (a * TileWidth, b * TileHeight) with mask
Next b
Next a
For a = 0 To MaxUsers - 1
Draw Sprite a to BackBuffer at (User(a).xPos * TileWidth, User(a).yPos * TileHeight) with mask
Next a
For a = 1 To MapWidth
For b = 1 To MapHeight
Draw FG tile to BackBuffer at (a * TileWidth, b * TileHeight) with mask
Next b
Next a
Flip BackBuffer to Screen
</PRE>
|