DSLua Community
Welcome, Guest. Please login or register.
May 21, 2012, 09:36:05 PM
1371 Posts in 262 Topics by 33109 Members
Latest Member: Limewire Download
DSLua Community  |  General DS Programming Chats  |  Code Hashing  |  Sprite overlay « previous next »
Pages: [1]
Author Topic: Sprite overlay  (Read 2437 times)
angor
Waxing Crescent
**
Posts: 45


WWW
« on: April 18, 2006, 09:14:40 PM »

I have been playing with the LUA example "05 - Sprite.lua" and realized that the sprite overlay is controled by the order you draw them on screen. Then, if you want to allow sprites to move in front and behind (i.e. "player" can move and be in front of behind a "tree") you require some extra variables to know how deep they are placed Sad

Is there no other way to control which sprite is on top of which? Something like adding to the sprite a layer parameter value and then just drawing them without paying attention to the order.

Angor
Logged
waruwaru
Administrator
Waxing Crescent
*****
Posts: 78


« Reply #1 on: April 19, 2006, 04:28:31 AM »

Sorry, this is not available in 0.4.  I will add a priority function to sprite object in 0.5.

Waruwaru
Logged
angor
Waxing Crescent
**
Posts: 45


WWW
« Reply #2 on: April 19, 2006, 09:31:16 PM »

Oh! Good to know. Thanks for the feedback.
Logged
franck569
Waxing Crescent
**
Posts: 10


« Reply #3 on: May 31, 2006, 03:04:06 PM »

Please, can you explain how to use this priority functionnality ?

Thanks, Franck569.
Logged
waruwaru
Administrator
Waxing Crescent
*****
Posts: 78


« Reply #4 on: May 31, 2006, 03:28:19 PM »

Sorry, it turns out that the fix did not go into 0.5.  The current behavior is still what angor described.  The top/bottom order of sprites are still determined by the order the sprites are created (until you've created/deleted more than 128 sprites).  I will fix it in a future release.

Waruwaru
Logged
Pages: [1]
« previous next »
    Jump to: