DSLua Community
Welcome, Guest. Please login or register.
May 21, 2012, 08:45:44 PM
1371 Posts in 262 Topics by 33109 Members
Latest Member: Limewire Download
DSLua Community  |  DSLua - Best scripting language for Nintendo DS  |  Need Help?  |  Scrolling Backgrounds? « previous next »
Pages: [1]
Author Topic: Scrolling Backgrounds?  (Read 1292 times)
zaczac
New Moon
*
Posts: 1


« on: July 21, 2007, 11:55:50 AM »

I'm a little new here, but i don't seem to find much docs on anything like this. I want a background to scroll on its own, at a certain speed, horizontally.
Can this be done? And is DSLUA good enough to make games in yet, and will it be in the near future? If i want to make a game, where would it be best to create it? I think dslua looks good, but i cant find any examples of how to move sprites / backgrounds.
So we could create a sprite or background that moves when you press D-PAD LEFT or something like that.
Thanks for the help!
Logged
molster
Waxing Crescent
**
Posts: 19


« Reply #1 on: July 21, 2007, 09:53:32 PM »

Check this out

http://www.bio-gaming.com/jeremy/dslua/index.php?act=tutorials

You want tutorial number 5: Sprites and Backgrounds
Logged
TOAST
Waxing Crescent
**
Posts: 67



« Reply #2 on: July 22, 2007, 07:12:29 PM »

Here are all the functions listed and explained. Wink

http://www.bio-gaming.com/jeremy/dslua/documentation/xhtml/index.html

The actual programming skills are up to you (yes it actually requires some logic to use anything else than gamemaker).
Logged
manu62300
Waxing Crescent
**
Posts: 89



« Reply #3 on: July 23, 2007, 05:21:58 AM »

Code:
BGBotMap = Screen.LoadTileBG()
BGBotMap:LoadPalette( "bckgd.pal" )
BGBotMap:LoadTiles( "bckgd.raw", 256 )
BGBotMap:LoadMap( "bckgd.map", ( 560/8 ), ( 496/8 ))
Screen.Initialize( 0, BGBotMap )
x = 0
y = 496
BGBotMap:ScrollXY( x, y )
while Pads.Start() == false do
       If Pads.Right then
       x= x - 1
       x = math.min( x+1, 560-256 )
       BGBotMap:ScrollXY( x, y )
       for delay=1,3000 do
       end
end
a exemple for help U
Logged

XtreamLua.com
La Référence en programmation sur PSP & DS
xtreamlua.miniville.fr
Bon dev...;
Pages: [1]
« previous next »
    Jump to: