Page 1 of 5 12345 LastLast
Results 1 to 10 of 42

Thread: DS Lua Tutorials

                  
   
  1. #1
    DS LUA Coder Junixx's Avatar
    Join Date
    Mar 2006
    Location
    Missouri, USA
    Posts
    1,386
    Rep Power
    75

    Thumbs up DS Lua Tutorials

    Hey, Jeremysr over on the DS Lua forums has started a tutorial page from what he knows about DS Lua, I've read it and its helped me so if anyone is interested take a look:

    http://www.bio-gaming.com/jeremy/dsl...?act=tutorials

    Take note that it's not finished yet, he said (As of now) that hes working on the Background & Sprite section of it, he said it would also be a long tutorial. (but it would help me alot )

  2. #2

    Default

    Thanks. I might try and get into this Ds Lua stuff. Is it hard to do?

  3. #3
    DS LUA Coder Junixx's Avatar
    Join Date
    Mar 2006
    Location
    Missouri, USA
    Posts
    1,386
    Rep Power
    75

    Default

    It's not too hard to get into once you get the hang of it . I'm waiting for the BAckgrounds & Sprites section to get finished and maybe i can actuaully get something...i have an idea for a game but i dont know if it will work or not

  4. #4

    Default

    Wow, never have had so many errors in such little lines of code. And then I have to put my sd card back into the usb reader and do that process again just to test it. Totally worth it though, made my first hello world program! The stylus imput is way easier than I thought it would be. Here is my source code for my tiny little program that puts a message if the user presses the stylus or presses A,B,X,or Y buttons. It ends with the press of the start button. Thought it might help some confused people, maybe.

    PHP Code:
    SCREEN_TOP 1
    SCREEN_BOT 
    0
    BGTopText 
    Screen.LoadTextBG()
    BGBotText Screen.LoadTextBG()
    Screen.InitializeSCREEN_TOPBGTopText )
    Screen.InitializeSCREEN_BOTBGBotText )
    while 
    Pads.Start() == false do
    if 
    Stylus.Down() then
          BGBotText
    :SetColor)
          
    BGBotText:PrintXY1012"You used your stylus!" )
    end 
    if Pads.A() then
         BGTopText
    :SetColor)
         
    BGTopText:PrintXY 1012"A" )
    end
    if Pads.B() then
         BGTopText
    :SetColor)
         
    BGTopText:PrintXY 1012"B" )
    end
    if Pads.X() then
         BGTopText
    :SetColor)
         
    BGTopText:PrintXY 1012"X" )
    end
    if Pads.Y() then
         BGTopText
    :SetColor)
         
    BGTopText:PrintXY 1012"Y" )
    end
    end 

  5. #5

    Default

    The code looks pretty simple. I dont know if I will be able to do anything good for ages. Im just learning Java at university at the moment, going into second year now.

  6. #6

    Default

    Thanks for posting this CPU_Smarts! Now I know why my hidden page counters on each page were going up so fast...I'm glad I could help so many people to start using DSLua, that was my goal.

  7. #7
    DS LUA Coder Junixx's Avatar
    Join Date
    Mar 2006
    Location
    Missouri, USA
    Posts
    1,386
    Rep Power
    75

    Default

    I acctaully think the counter started going up before i posted it here, um, but i could use alittle help,

    When I try to make a button using this

    if stylusInBox( 80, 64, 142, 85 ) then
    BGBotText:PrintXY( 10, 12, "You pressed the button!" )
    end

    But what happens is I'll load it up, press the button and it doesnt do anything, then I'll exit it and re-load the script it says "You Pressed the button!" without even pressing the button...

    I'm quite confused about this...

  8. #8
    DCEmu Newbie
    Join Date
    Jun 2006
    Posts
    44
    Rep Power
    0

    Default

    Heh, back when I was interested in learning Lua, there was next to no documentation; but now that I've moved on, this appears.

    *sigh*

    Maybe I'll whip a little something up, and post it on the DSlua forums.

  9. #9
    DS LUA Coder Junixx's Avatar
    Join Date
    Mar 2006
    Location
    Missouri, USA
    Posts
    1,386
    Rep Power
    75

    Default

    Quote Originally Posted by brennxn
    Heh, back when I was interested in learning Lua, there was next to no documentation; but now that I've moved on, this appears.

    *sigh*

    Maybe I'll whip a little something up, and post it on the DSlua forums.
    Hah, same here but i got interested again when i saw some docs on it, but i just have to learn enough to pull of what i would like to do...

  10. #10

    Default

    I added a Sprites and Background Maps tutorial, the one I'm sure you've all being waiting for.

Page 1 of 5 12345 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •