Seite 256 von 342 ErsteErste ... 156 206 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 306 ... LetzteLetzte
Zeige Ergebnis 7.651 bis 7.680 von 10238

Lua Programming Help Thread

This is a discussion on Lua Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; I am trying to get TP's tutorial in the GDI thread for 3D to work, but it's not. Here is ...

  
  1. #7651
    QJ Gamer Blue
    Points: 7.014, Level: 55
    Level completed: 32%, Points required for next Level: 136
    Overall activity: 0%

    Registriert seit
    Jan 2007
    Ort
    U.S.
    Beiträge
    405
    Points
    7.014
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    I am trying to get TP's tutorial in the GDI thread for 3D to work, but it's not. Here is the code:

    Code:
    red = Color.new(255,0,0)
    
    pad = Controls.read()
    
    
    while true do
    
    Gu.start3d()
    
    Gu.clearDepth(0);
    Gu.clear(Gu.COLOR_BUFFER_BIT+Gu.DEPTH_BUFFER_BIT)
    
    Gum.matrixMode(Gu.PROJECTION)
    Gum.loadIdentity()
    Gum.perspective(50, 16/9, 0.5, 1000)
    
    Gum.matrixMode(Gu.VIEW)
    Gum.loadIdentity()
    
    walls = {
    
    {red, 3, -2, 4},
    {red, 2, -2, 5},
    {red, 2, -2, 5},
    
    {red,-1,1,-1},
    {red,-1,0,-1},
    {red,-1,0,3},
    
    {red,-1,1,-1},
    {red,-1,0,3},
    {red,-1,1,3},
    
    {red,-1,1,3},
    {red,-1,0,3},
    {red,-1,0,6},
    
    {red,-1,1,3},
    {red,-1,0,6},
    {red,-1,1,6},
    
    {red,-1,1,6},
    {red,-1,0,6},
    {red,-1,0,10},
    
    {red,-1,1,6},
    {red,-1,0,10},
    {red,-1,1,10},
    
    {red,10,0,3},
    {red,10,0,-1},
    {red,10,1,-1},
    
    {red,10,1,3},
    {red,10,0,3},
    {red,10,1,-1},
    
    {red,10,0,6},
    {red,10,0,3},
    {red,10,1,3},
    
    {red,10,1,6},
    {red,10,0,6},
    {red,10,1,3},
    
    {red,10,0,10},
    {red,10,0,6},
    {red,10,1,6},
    
    {red,10,1,10},
    {red,10,0,10},
    {red,10,1,6},
    
    {red,10,0,-1},
    {red,6,0,-1},
    {red,10,1,-1},
    
    {red,10,1,-1},
    {red,6,0,-1},
    {red,6,1,-1},
    
    {red,6,0,-1},
    {red,3,0,-1},
    {red,6,1,-1},
    
    {red,6,1,-1},
    {red,3,0,-1},
    {red,3,1,-1},
    
    {red,3,0,-1},
    {red,-1,0,-1},
    {red,3,1,-1},
    
    {red,3,1,-1},
    {red,-1,0,-1},
    {red,-1,1,-1},
    
    {red,10,1,10},
    {red,6,0,10},
    {red,10,0,10},
    
    {red,6,1,10},
    {red,6,0,10},
    {red,10,1,10},
    
    {red,6,1,10},
    {red,3,0,10},
    {red,6,0,10},
    
    {red,3,1,10},
    {red,3,0,10},
    {red,6,1,10},
    
    {red,3,1,10},
    {red,-1,0,10},
    {red,3,0,10},
    
    {red,-1,1,10},
    {red,-1,0,10},
    {red,3,1,10},
    
    }
    
    Gum.matrixMode(Gu.MODEL)
    Gum.loadIdentity()
    Gum.translate(1,1,1);
    Gu.disable(Gu.TEXTURE_2D)
    Gum.drawArray(Gu.TRIANGLES, Gu.COLOR_8888+Gu.VERTEX_32BITF+Gu.TRANSFORM_3D, walls)
    
    Gu.end3d()
    
    screen.waitVblankStart()
    screen.flip()
    end
    What's wrong with that? I'm interested in learning some 3D but I can't if I'm stuck here! Thanks for any help.



  2. #7652
    QJ Gamer Bronze
    Points: 8.665, Level: 62
    Level completed: 72%, Points required for next Level: 85
    Overall activity: 0%

    Registriert seit
    Mar 2007
    Beiträge
    758
    Points
    8.665
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    have you tested it? what line does it give you an error at? what's the error
    it'll help if you tell us those things

  3. #7653
    Points: 3.368, Level: 36
    Level completed: 12%, Points required for next Level: 132
    Overall activity: 0%

    Registriert seit
    Jun 2007
    Ort
    Washington
    Beiträge
    28
    Points
    3.368
    Level
    36
    Downloads
    0
    Uploads
    0

    Standard

    I need help on reading files. I know how to read a starting from a certain point, string.sub(mystring,9,12) , but I want to know how I can start on a specific line, like 8, or 17 or w/e.

  4. #7654
    QJ Gamer Blue
    Points: 7.014, Level: 55
    Level completed: 32%, Points required for next Level: 136
    Overall activity: 0%

    Registriert seit
    Jan 2007
    Ort
    U.S.
    Beiträge
    405
    Points
    7.014
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    Right...it just shows a blank (grey) screen.

  5. #7655
    QJ Gamer Blue
    Points: 4.561, Level: 43
    Level completed: 6%, Points required for next Level: 189
    Overall activity: 0%

    Registriert seit
    May 2006
    Beiträge
    224
    Points
    4.561
    Level
    43
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von andyauff
    Right...it just shows a blank (grey) screen.
    you can't have screen.flip() and screen.waitVblankStart() in the gu.
    take those out and see if it works now :Punk:
    -= Double Post =-
    i tried it on windows luaplayer but it doesn't show anything both times, so i'm guessing it just doesn't support the gu on the computer... i think it should work now though...
    Geändert von emericaska8r (07-10-2007 um 08:34 PM Uhr) Grund: Automerged Doublepost

  6. #7656
    QJ Gamer Bronze
    Points: 8.665, Level: 62
    Level completed: 72%, Points required for next Level: 85
    Overall activity: 0%

    Registriert seit
    Mar 2007
    Beiträge
    758
    Points
    8.665
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard where now?

    i went through the tutorials at evilmana, look at some at the Tutorial Directory and done some experimenting with lua
    are there any other tutorials? where should i go now

  7. #7657
    QJ Gamer Green
    Points: 11.800, Level: 71
    Level completed: 38%, Points required for next Level: 250
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    Middle Europe
    Beiträge
    1.281
    Points
    11.800
    Level
    71
    Downloads
    0
    Uploads
    0

    Standard

    try experiment :)

  8. #7658
    Points: 24.247, Level: 94
    Level completed: 90%, Points required for next Level: 103
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    texas
    Beiträge
    2.803
    Points
    24.247
    Level
    94
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von michaelp
    i went through the tutorials at evilmana, look at some at the Tutorial Directory and done some experimenting with lua
    are there any other tutorials? where should i go now
    http://lua-users.org/wiki/TutorialDirectory

    Is all you should ever need.
    牧来栠摩琠敨映汩獥
    PSN: youresam
    From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
    --Mike Hollingsworth

  9. #7659
    QJ Gamer Blue
    Points: 7.014, Level: 55
    Level completed: 32%, Points required for next Level: 136
    Overall activity: 0%

    Registriert seit
    Jan 2007
    Ort
    U.S.
    Beiträge
    405
    Points
    7.014
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    Thanks for the help, emericaska8er, but that wasn't the problem. You do need those in there. I think it was just because I had the array inside the main loop...now it is outside of it.
    -= Double Post =-
    Okay, new question: Is there any program where I can "draw" objects and it'll tell me the numbers for it? Or is it just sort of "guess and check"?
    Geändert von andyauff (07-11-2007 um 11:44 AM Uhr) Grund: Automerged Doublepost

  10. #7660
    QJ Gamer Gold
    Points: 11.629, Level: 70
    Level completed: 95%, Points required for next Level: 21
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Beiträge
    1.633
    Points
    11.629
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Elaborate on what you want to do.

  11. #7661
    QJ Gamer Blue
    Points: 7.014, Level: 55
    Level completed: 32%, Points required for next Level: 136
    Overall activity: 0%

    Registriert seit
    Jan 2007
    Ort
    U.S.
    Beiträge
    405
    Points
    7.014
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    Draw 3D objects in lua...I understand your tutorial, but how did you get those numbers for the walls? Did you just sort of "guess and check" or is there a program where I can make the 3D objects and it'll spit out the coordinates?

  12. #7662
    QJ Gamer Gold
    Points: 11.629, Level: 70
    Level completed: 95%, Points required for next Level: 21
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Beiträge
    1.633
    Points
    11.629
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    http://pspupdates.qj.net/L3D-3D-Mode...g/49/aid/82009
    edit: for those walls I figured it out in my head.

    Oh and dl the one for 1.5

  13. #7663
    Points: 24.247, Level: 94
    Level completed: 90%, Points required for next Level: 103
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    texas
    Beiträge
    2.803
    Points
    24.247
    Level
    94
    Downloads
    0
    Uploads
    0

    Standard

    For all my 3D models I do it in notepad, no guess-and-check at all ;)
    牧来栠摩琠敨映汩獥
    PSN: youresam
    From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
    --Mike Hollingsworth

  14. #7664
    QJ Gamer Blue
    Points: 7.014, Level: 55
    Level completed: 32%, Points required for next Level: 136
    Overall activity: 0%

    Registriert seit
    Jan 2007
    Ort
    U.S.
    Beiträge
    405
    Points
    7.014
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    Yeah, TP I already had that on my memory stick...and I thought about trying it, too! Thanks for the great program...do you plan to update it any further?

  15. #7665
    QJ Gamer Gold
    Points: 11.629, Level: 70
    Level completed: 95%, Points required for next Level: 21
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Beiträge
    1.633
    Points
    11.629
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Not right now. I think Blah is working on a major redo of it though.

  16. #7666
    QJ Gamer Blue
    Points: 7.014, Level: 55
    Level completed: 32%, Points required for next Level: 136
    Overall activity: 0%

    Registriert seit
    Jan 2007
    Ort
    U.S.
    Beiträge
    405
    Points
    7.014
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    That's cool.

  17. #7667
    QJ Gamer Green
    Points: 7.599, Level: 58
    Level completed: 25%, Points required for next Level: 151
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Belgium
    Beiträge
    594
    Points
    7.599
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    Just startedlooking into LUA (total newb ) and trying to do some tutorials to learn the code
    but I got a small problem, I'm using LuaDevKit (but I get the same problem with LUA player for windows) and ofcourse I started out with the pure basics, hello world :)
    but when I testrun it, it just flashes the screen and closes again, how do I make it stay open so i can see the result?

    arfgh, forget what i just said -_- just found it

  18. #7668
    QJ Gamer Blue
    Points: 3.778, Level: 38
    Level completed: 86%, Points required for next Level: 22
    Overall activity: 99,0%

    Registriert seit
    Dec 2006
    Ort
    Michigan
    Beiträge
    116
    Points
    3.778
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    Hey there

    ok? This is what i need
    i need 15-25 small images (around 5 types) to scroll from the right to left
    and i want it to blit random images.

    What im trying to do is scroll buttons pics from right to left and when they hit the box in the middle you have to press the corresponding button.


    so far i got this
    Spoiler for Code:

    -- Variables
    red = Color.new(255,0,0)
    white = Color.new(255,255,255)
    green = Color.new(0,255,0)
    state = 1
    background = Image.load("images/background.png")





    triangle = Image.load("images/triangle.png")
    circle = Image.load("images/circle.png")
    cross = Image.load("images/cross.png")
    square = Image.load("images/square.png")
    right = Image.load("images/right.png")
    r = math.random(1,5)



    score = 0
    level = 0

    --table for image
    Buttons = {}
    Buttons[1] = { x = 300, y = 120 }
    Buttons[2] = { x = 260, y = 120 }


    -- Menu Function
    function menu()
    screenrint(150,0, "Press X to Start", red)
    screenrint(152,10, "Press O to Quit", red)
    end

    -- Game Function
    function game()
    while true do
    screen:clear()
    Image:blit(0,0,background )
    speed = 4
    screenrint(0,0, "Score :" .. score, green)
    screenrint(0,10, "Level :" .. level, green)

    Image:blit(Buttons[1].x,Buttons[1].y, triangle )
    Image:blit(Buttons[2].x,Buttons[2].y,circle)
    Buttons[1].x = Buttons[1].x - speed
    Buttons[2].x = Buttons[2].x - speed
    if Buttons[1].x == 0 then Buttons[1].x = 472
    end
    if Buttons[2].x == 0 then Buttons[2].x = 472
    end
    screen.waitVblankStart()
    screen.flip()
    end
    end



    while true do
    pad = Controls.read()
    screen:clear()


    if state == 1
    then menu()
    end
    if state == 2
    then game()
    end


    --Menu
    if state == 1 and pad:cross()
    then state = state + 1 elseif state == 1 and pad:circle()
    then break
    end


    screen.waitVblankStart()
    screen.flip()
    end




    Not much :/

    Who ever replies, please dont just tell me the code can you briefly explain? Thanks in advance

  19. #7669
    QJ Gamer Green
    Points: 9.165, Level: 64
    Level completed: 39%, Points required for next Level: 185
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Ort
    England ~¦¦¦|+|¦¦¦~
    Beiträge
    1.112
    Points
    9.165
    Level
    64
    My Mood
    Bored
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von vision1
    Hey there

    ok? This is what i need
    i need 15-25 small images (around 5 types) to scroll from the right to left
    and i want it to blit random images.

    What im trying to do is scroll buttons pics from right to left and when they hit the box in the middle you have to press the corresponding button.


    so far i got this
    Spoiler for Code:

    -- Variables
    red = Color.new(255,0,0)
    white = Color.new(255,255,255)
    green = Color.new(0,255,0)
    state = 1
    background = Image.load("images/background.png")





    triangle = Image.load("images/triangle.png")
    circle = Image.load("images/circle.png")
    cross = Image.load("images/cross.png")
    square = Image.load("images/square.png")
    right = Image.load("images/right.png")
    r = math.random(1,5)



    score = 0
    level = 0

    --table for image
    Buttons = {}
    Buttons[1] = { x = 300, y = 120 }
    Buttons[2] = { x = 260, y = 120 }


    -- Menu Function
    function menu()
    screenrint(150,0, "Press X to Start", red)
    screenrint(152,10, "Press O to Quit", red)
    end

    -- Game Function
    function game()
    while true do
    screen:clear()
    Image:blit(0,0,background )
    speed = 4
    screenrint(0,0, "Score :" .. score, green)
    screenrint(0,10, "Level :" .. level, green)

    Image:blit(Buttons[1].x,Buttons[1].y, triangle )
    Image:blit(Buttons[2].x,Buttons[2].y,circle)
    Buttons[1].x = Buttons[1].x - speed
    Buttons[2].x = Buttons[2].x - speed
    if Buttons[1].x == 0 then Buttons[1].x = 472
    end
    if Buttons[2].x == 0 then Buttons[2].x = 472
    end
    screen.waitVblankStart()
    screen.flip()
    end
    end



    while true do
    pad = Controls.read()
    screen:clear()


    if state == 1
    then menu()
    end
    if state == 2
    then game()
    end


    --Menu
    if state == 1 and pad:cross()
    then state = state + 1 elseif state == 1 and pad:circle()
    then break
    end


    screen.waitVblankStart()
    screen.flip()
    end




    Not much :/

    Who ever replies, please dont just tell me the code can you briefly explain? Thanks in advance
    What do you want people to briefly explain, you've told us the game you want to make, and showed us you code. What now? Are there any problems that need solving?.

    PS: You gon eat that random number? cos if u dont want it...
    ...Just Returned To The Scene...

  20. #7670
    QJ Gamer Bronze
    Points: 8.665, Level: 62
    Level completed: 72%, Points required for next Level: 85
    Overall activity: 0%

    Registriert seit
    Mar 2007
    Beiträge
    758
    Points
    8.665
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    shouldn't you have this at the top of your code:

    Code:
    math.randomseed(os.time())
    so it's the not the same random number each time?

  21. #7671
    QJ Gamer Blue
    Points: 3.778, Level: 38
    Level completed: 86%, Points required for next Level: 22
    Overall activity: 99,0%

    Registriert seit
    Dec 2006
    Ort
    Michigan
    Beiträge
    116
    Points
    3.778
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    Sorry, what i need to know is what would i do to print around 25 random images without having to type

    screenrint(...
    screenrint(...
    screenrint(...
    screenrint(...
    screenrint(...
    screenrint(...
    screenrint(...
    screenrint(...
    screenrint(...

  22. #7672
    QJ Gamer Silver
    Points: 10.263, Level: 67
    Level completed: 54%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    UK
    Beiträge
    2.326
    Points
    10.263
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Store all the images in a table, then use a loop to print all the images.

  23. #7673
    QJ Gamer Bronze
    Points: 5.496, Level: 47
    Level completed: 73%, Points required for next Level: 54
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Western Pennsylvania
    Beiträge
    295
    Points
    5.496
    Level
    47
    Downloads
    0
    Uploads
    0

    Standard

    I use copy paste, but tables and all that stuff are way more organized. I just take the lazy way out, but pay for it in the end when I can't find anything...
    That's me as a ninja in my avatar...SWEET!!!

    Wii code: 6485-5589-0683-3700
    SmashBros Code: 3566-1198-2621
    mariokartWII: 3738-0052-4756
    Check out my website

  24. #7674
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    Copy and paste? What happens when you need to display an undetermined amount of images? Say you read in all the images from the PHOTO folder.

    As yaustar said
    Code:
    images = {}
    for i = 1, 25 do
        images[i] = Image.load("image" .. i .. ".png")
    end
    
    exit = false
    
    while ~exit do
        for i = 1, 25 do
            screen:blit(some X value, some y value, images[i])
        end
    
        screen.waitVblankStart()
        screen.flip()
    end
    When you say 'random image', im confused. Also I'm unsure what your image sizes are and whether they should replace one another after displaying.

    ...at what speed must I live.. to be able to see you again?...

    Projects

    You can support my Open World 3D RPG for PSP by voting for it here


  25. #7675
    QJ Gamer Gold
    Points: 17.453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    everywhere
    Beiträge
    3.526
    Points
    17.453
    Level
    84
    Downloads
    1
    Uploads
    0

    Standard

    i think he means display a random image in which case a small change to sg;s code:

    Code:
    images = {}
    for i = 1, 25 do
        images[i] = Image.load("image" .. i .. ".png")
    end
    
    exit = false
    
    while ~exit do
        screen:blit(0, 0, images[random(25)])
        screen.waitVblankStart()
        screen.flip()
    end
    i believe random is the name for the random function in lua although since it's been a long time since i coded in lua
    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  26. #7676
    QJ Gamer Blue
    Points: 3.778, Level: 38
    Level completed: 86%, Points required for next Level: 22
    Overall activity: 99,0%

    Registriert seit
    Dec 2006
    Ort
    Michigan
    Beiträge
    116
    Points
    3.778
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    Thanks guys

    By random i mean like

    pictures of buttons

    X O X LEFT RIGHT R1 L1 UP DOWN X X O <<not in specific order which scroll from right to left

  27. #7677
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    That is much more then a snippet.

    I might do it in the morning (im about to go to sleep, it's 1:20 AM here...) but I think you'd get a great learning experience should you create it yourself....

    ...at what speed must I live.. to be able to see you again?...

    Projects

    You can support my Open World 3D RPG for PSP by voting for it here


  28. #7678
    Developer and Tutor.
    Points: 8.736, Level: 62
    Level completed: 96%, Points required for next Level: 14
    Overall activity: 0%

    Registriert seit
    Jul 2007
    Ort
    Widnes, England
    Beiträge
    1.649
    Points
    8.736
    Level
    62
    My Mood
    Happy
    Downloads
    0
    Uploads
    0

    Standard

    he is asking you yo create his first lua program for him like the one everyone tells you to do when your trying to learn lua?????

    do it yourself or go find one that someone has made how do you expect to learn
    ------ FaT3oYCG -----
    AKA Craig, call me what you want to It's your preference.
    My Website: http://www.modern-gamer.co.uk/

    Currently working on:
    (0) MediaGrab
    (0) PGE Gears Of War - On hold (Very large project).
    (0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).

  29. #7679
    QJ Gamer Green
    Points: 7.599, Level: 58
    Level completed: 25%, Points required for next Level: 151
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Belgium
    Beiträge
    594
    Points
    7.599
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    Could someone take a look at this code, for some reason I get in my Debug (working with LuaDevKit)
    Exit Value: 1
    usage: luaplayer script.lua

    If I open another script it opens just fine, so I guess I must be not seeing something that is probably so obvious

    Spoiler for Lua code:
    -- colors --
    red= Color.new(255,0,0)
    green= Color.new(0,255,0)
    white= Color.new(255,255,255)
    yellow= Color.new(255,226,40)

    -- Timer --
    counter = Timer.new()
    counter:start()

    -- images --
    bighit= Image.load("bighit.png")

    -- music table --
    notes={}
    notes[1]={time=5000,note=1}
    notes[2]={time=7000,note=1}
    notes[3]={time=10000,note=1}
    notes[4]={time=12000,note=1}

    -- vars --
    oldpad = Controls.read()

    -- Main loop --
    while true do
    pad = Controls.read()
    screen:clear()
    currentTime = counter:time()

    screen:blit(50,50,bighit)


    screen.waitVblankStart()
    oldpad=pad
    screen.flip()
    end

    -= Double Post =-
    I eventualy found what was wrong, for some reason my filename was to big kinda silly

    I've got another problem tho
    is there any decent soundsupport for LUA? or is there a way to preload my musicfiles, or is there a way to reset my timer as soon as the music starts playing.
    Right now I had to use wav for my music (.xm file was the worst thing ever) and that plays, only problem is there is a delay and I need my music to be in perfect sync with my timer.
    Geändert von Mistabeen (07-17-2007 um 07:45 AM Uhr) Grund: Automerged Doublepost

  30. #7680
    QJ Gamer Blue
    Points: 3.778, Level: 38
    Level completed: 86%, Points required for next Level: 22
    Overall activity: 99,0%

    Registriert seit
    Dec 2006
    Ort
    Michigan
    Beiträge
    116
    Points
    3.778
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    Guys chill out.
    I didnt mean for you to write the whole code. I just asked how would i go about doing so and so that's why i asked that you dont just give me the code but also explain. Im not into copying and pasteing and i really do want to learn.


 

Tags for this Thread

Forumregeln

  • Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
  • Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
  • Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
  • Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.
  •  





Alle Zeitangaben in WEZ -8. Es ist jetzt 09:00 PM Uhr.

Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © , Caputo Media, LLC. All Rights Reserved. Cluster .