Seite 308 von 342 ErsteErste ... 208 258 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 ... LetzteLetzte
Zeige Ergebnis 9.211 bis 9.240 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; Simply, put it out of the function?...

  
  1. #9211
    Lua guy
    Points: 11.690, Level: 71
    Level completed: 10%, Points required for next Level: 360
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Ort
    Wales, cardiff
    Beiträge
    1.442
    Points
    11.690
    Level
    71
    My Mood
    Blah
    Downloads
    0
    Uploads
    0

    Standard

    Simply, put it out of the function?



  2. #9212
    QJ Gamer Blue
    Points: 4.268, Level: 41
    Level completed: 59%, Points required for next Level: 82
    Overall activity: 0%

    Registriert seit
    Apr 2008
    Beiträge
    497
    Points
    4.268
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    just a quick question what is the largest image you can load in lua??

  3. #9213
    lol
    Points: 20.859, Level: 91
    Level completed: 2%, Points required for next Level: 491
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Whittier, CA
    Beiträge
    5.791
    Points
    20.859
    Level
    91
    Downloads
    0
    Uploads
    0

    Standard

    512x512 AFAIK

  4. #9214
    QJ Gamer Blue
    Points: 4.268, Level: 41
    Level completed: 59%, Points required for next Level: 82
    Overall activity: 0%

    Registriert seit
    Apr 2008
    Beiträge
    497
    Points
    4.268
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    just checking

    AFAIK = As Far As I Know?????

    and thanks I do appreciate it. . . .

  5. #9215
    lol
    Points: 20.859, Level: 91
    Level completed: 2%, Points required for next Level: 491
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Whittier, CA
    Beiträge
    5.791
    Points
    20.859
    Level
    91
    Downloads
    0
    Uploads
    0

    Standard

    Yea.
    As far as i know

  6. #9216
    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

    it actually depends on which lua player you use but the max for the origional lua player is 512 x 512, but you shouldnt load large images if you can help it.
    ------ 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).

  7. #9217
    QJ Gamer Bronze
    Points: 5.381, Level: 47
    Level completed: 16%, Points required for next Level: 169
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    550
    Points
    5.381
    Level
    47
    Downloads
    1
    Uploads
    0

    Standard

    No LuaPlayer can load images larger than 512x512.

    It's a hardware limitation.

  8. #9218
    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

    LuaPlayerHM CAN load images larger than 512 x 512, it just cant blit them to the screen!
    ------ 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).

  9. #9219
    QJ Gamer Blue
    Points: 4.268, Level: 41
    Level completed: 59%, Points required for next Level: 82
    Overall activity: 0%

    Registriert seit
    Apr 2008
    Beiträge
    497
    Points
    4.268
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    ok, so if 512 by 512 is the larges image you can load, what is the largest image you can create in lua???

  10. #9220
    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

    the same 512 x 512
    ------ 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).

  11. #9221
    QJ Gamer Blue
    Points: 4.268, Level: 41
    Level completed: 59%, Points required for next Level: 82
    Overall activity: 0%

    Registriert seit
    Apr 2008
    Beiträge
    497
    Points
    4.268
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    ok, cool, I fixed it, didn't need images that big anyway, lo lI was just doing it wrong. . . . but thanx for the help.
    Geändert von PSProgramer (08-13-2008 um 09:37 AM Uhr) Grund: Automerged Doublepost

  12. #9222
    QJ Gamer Blue
    Points: 4.008, Level: 40
    Level completed: 29%, Points required for next Level: 142
    Overall activity: 0%

    Registriert seit
    Dec 2007
    Ort
    dfgd
    Beiträge
    66
    Points
    4.008
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    hi all, im wondering if anybody knows how to list a directory and print it to the screen so then i can have a selector on it aswell.
    for like loading a game save, i know this might be really simple bu i cannot think 100% right now so i was wondering if ant of you lot wwould know?


    luke

  13. #9223
    QJ Gamer Blue
    Points: 4.268, Level: 41
    Level completed: 59%, Points required for next Level: 82
    Overall activity: 0%

    Registriert seit
    Apr 2008
    Beiträge
    497
    Points
    4.268
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    EDIT:Nvrmind. . .
    oo and luke what exactly are you asking?? how you would save and load a game??

  14. #9224
    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

    Zitat Zitat von PSProgramer Beitrag anzeigen
    EDIT:Nvrmind. . .
    oo and luke what exactly are you asking?? how you would save and load a game??
    i told you not to use large images but to combat that do this
    Code:
    Tile_Map_Backgound = Image.createEmpty(480, 272)
    Tile_Map_Backgound:blit(0,0,tile_1)
    Tile_Map_Backgound:blit(0,0,tile_2)
    
    while true do
    
    screen:blit(0,0, Tile_Map_Backgound)
    
    end
    ------ 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).

  15. #9225
    QJ Gamer Blue
    Points: 4.268, Level: 41
    Level completed: 59%, Points required for next Level: 82
    Overall activity: 0%

    Registriert seit
    Apr 2008
    Beiträge
    497
    Points
    4.268
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    well i have a problem cause I need to move the secound layer, buit I'll work with it and see what I can come up with. . . . .

  16. #9226
    QJ Gamer Blue
    Points: 4.008, Level: 40
    Level completed: 29%, Points required for next Level: 142
    Overall activity: 0%

    Registriert seit
    Dec 2007
    Ort
    dfgd
    Beiträge
    66
    Points
    4.008
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von PSProgramer Beitrag anzeigen
    EDIT:Nvrmind. . .
    oo and luke what exactly are you asking?? how you would save and load a game??
    Nonono lol not all that lol Oh god no,i have full saving and loading code which i created myself

    what i was asking you was how to list scripts from a folder and print there names to the screen like in lowser it lists all the scripts and then if you press X its loads that script well i need something where it loads all the saved game into like a big menu like lowser and then you select your game via moving to it and press X then it will load it.

    do you get me now? maybe? :S
    Luke:Argh:

  17. #9227
    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

    go to my site and look at the menu examples in the code section

    http://psp-networks.ath.cx/

    the main commands you need are

    System.currentDirectory()
    System.listDirectory()
    and
    table.getn()
    ------ 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).

  18. #9228
    Lua guy
    Points: 11.690, Level: 71
    Level completed: 10%, Points required for next Level: 360
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Ort
    Wales, cardiff
    Beiträge
    1.442
    Points
    11.690
    Level
    71
    My Mood
    Blah
    Downloads
    0
    Uploads
    0

    Standard

    to list everything in a directory
    Code:
    list = System.listDirectory("mso:/")
    
    screen:print(0.10.list, red)
    That's who i think u do it.

  19. #9229
    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

    Code:
    white = Color.new(255, 255, 255)
    
    list = System.listDirectory()
    saves = table.getn(list)
    
    while true do
    
    screen:clear(white)
    
    for i = 3, saves do
         screen:print(10, 30 + ((i - 3) * 10), list[i].name)
    end
    
    screen.flip()
    screen.waitVblankStart()
    
    end
    Geändert von FaT3oYCG (08-13-2008 um 01:53 PM Uhr)
    ------ 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).

  20. #9230
    QJ Gamer Green
    Points: 3.721, Level: 38
    Level completed: 48%, Points required for next Level: 79
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Beiträge
    612
    Points
    3.721
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    dan, stop saying thats how i think you do it when you really have no clue.

    fatboy has it right although I would do table.remove(list,1) 2x to drop the . and .. options if its just for picking a savefile in the directory

  21. #9231
    QJ Gamer Platinum
    Points: 66.627, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Ort
    National Front Disco
    Beiträge
    13.057
    Points
    66.627
    Level
    100
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von TurtlesPwn Beitrag anzeigen
    dan, stop saying thats how i think you do it when you really have no clue.
    Unless you are going to correct him then you may as well not post.

  22. #9232
    lol
    Points: 20.859, Level: 91
    Level completed: 2%, Points required for next Level: 491
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Whittier, CA
    Beiträge
    5.791
    Points
    20.859
    Level
    91
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Moose Beitrag anzeigen
    Unless you are going to correct him then you may as well not post.
    No need to correct when fatboy did a correction already sorta.

    If you look at the latest post of dan you would see he has no idea what he is doing.

  23. #9233
    QJ Gamer Platinum
    Points: 66.627, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Ort
    National Front Disco
    Beiträge
    13.057
    Points
    66.627
    Level
    100
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Anti-QuickJay Beitrag anzeigen
    No need to correct when fatboy did a correction already sorta.

    If you look at the latest post of dan you would see he has no idea what he is doing.
    Sure, he's wrong, but if all you are going to do is sit back and tell him he is doing it wrong without any sort of input or correction, then you may as well say nothing. You get me?

    EDIT: If fatboy had already posted the correct way to go about whatever they were trying to do, that's even more of a reason not to post.

  24. #9234
    lol
    Points: 20.859, Level: 91
    Level completed: 2%, Points required for next Level: 491
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Whittier, CA
    Beiträge
    5.791
    Points
    20.859
    Level
    91
    Downloads
    0
    Uploads
    0

    Standard

    Turtles post also gives a tip to fatboy's method.

    Plus dan needs to know he should stop posting help when he doesnt know what hes doing.
    Noobs helping noobs isn't good.

    EDIT:
    look at this example
    [WIP] Arkanoid Deluxe
    then
    [WIP] Arkanoid Deluxe

    He doesn't know what he is doing.

  25. #9235
    QJ Gamer Platinum
    Points: 66.627, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Ort
    National Front Disco
    Beiträge
    13.057
    Points
    66.627
    Level
    100
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Anti-QuickJay Beitrag anzeigen
    Turtles post also gives a tip to fatboy's method.

    Plus dan needs to know he should stop posting help when he doesnt know what hes doing.
    Noobs helping noobs isn't good.
    Well as you can see, he had edited his post just after I posted.

    No furthur discussion is needed. If Dan doesn't know what he is doing, then correct him (and in doing so you will be helping him), otherwise don't post.

  26. #9236
    QJ Gamer Green
    Points: 3.721, Level: 38
    Level completed: 48%, Points required for next Level: 79
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Beiträge
    612
    Points
    3.721
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    Sorry, I forgot it was a web form not a normal text editor and hit tab-enter to go to a new line with the previous indented to write the little code example and it submitted. I edited it right after I posted it, probably while you were posting.

  27. #9237
    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

    i was going to let luke work it out for him self but then dan posted some crap so i thought i would correct it. im sure luke wont find it too hard to elaborate on what i have shown him now.
    ------ 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).

  28. #9238
    Lua guy
    Points: 11.690, Level: 71
    Level completed: 10%, Points required for next Level: 360
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Ort
    Wales, cardiff
    Beiträge
    1.442
    Points
    11.690
    Level
    71
    My Mood
    Blah
    Downloads
    0
    Uploads
    0

    Unhappy

    You guys Need to Chill out, 1 post!! Seriously.
    I knew it was most promblem wrong.
    And those posts were kinda stupid. I admit that. Though How Many Times Do i Rotate text, ummmh 0.I didn't get it at first but know i kinda do.
    Code:
     
    System.currentDirectory("mso:/")
    list = System.listDirectory()
    files = table.getn(list)
    Would that be right.
    P.s just to get the list of mso:/? Not print!! Also just to explain (because people think i don't know what i'm doing!)
    table.getn(list) --- gets the size of the array (list)
    System.currentDirectory ("mso:/") --sets the current working directory
    System.listDirectory() --list the current directory

  29. #9239
    QJ Gamer Green
    Points: 3.721, Level: 38
    Level completed: 48%, Points required for next Level: 79
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Beiträge
    612
    Points
    3.721
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    "I knew it was most promblem wrong"

    Then why did you post it trying to help someone who didn't know either?

    Anyways
    You don't have to set your current working directory to get the list of that folder, you can just do
    theFiles = System.listDirectory("ms0 :/")
    and then
    numberOfFilesInTheRootMSF older = table.getn(theFiles)
    if you have PSP, ISO, MUSIC, and VIDEO folders in the root of your ms, the table would look like this:
    theFiles = {
    {name="PSP",size=?,direct ory=true},
    {name="ISO",size=?,direct ory=true},
    {name="MUSIC",size=?,dire ctory=true},
    {name="VIDEO",size=?,dire ctory=true}}
    ? because I don't remember what it fills in for the size of a folder, but I believe it is 0

  30. #9240
    Lua guy
    Points: 11.690, Level: 71
    Level completed: 10%, Points required for next Level: 360
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Ort
    Wales, cardiff
    Beiträge
    1.442
    Points
    11.690
    Level
    71
    My Mood
    Blah
    Downloads
    0
    Uploads
    0

    Standard

    Ok thanks, would it just get folders?Or other files? e.g a txt file or .zip?
    Well i posted because my first thought was what i typed, thinking about it a second time i knew that it wouldn't have worked.I should of EDITED it.


 

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:02 PM Uhr.

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