Wednesday, 07 January 2009
 
  Home arrow Forum  
Main Menu
Home
News
Forum
Documentation
Download
Links
Administrator
Login Form
Welcome, Guest. Please login or register.
January 07, 2009, 03:09:07 PM
Username: Password:
Login with username, password and session length

Forgot your password?
Sprite overlay
DSLua Community
Welcome, Guest. Please login or register.
January 07, 2009, 03:09:07 PM
1724 Posts in 316 Topics by 10114 Members
Latest Member: Illedechulley
DSLua Community  |  General DS Programming Chats  |  Code Hashing  |  Sprite overlay « previous next »
Pages: [1]
Author Topic: Sprite overlay  (Read 1340 times)
angor
Waxing Crescent
**
Posts: 55


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: 94


« 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: 55


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

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


« 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: 94


« 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:  



    (C) 2009 DSLua

    DSLua - Best scripting language for Nintendo DS home-brew!