Seite 320 von 342 ErsteErste ... 220 270 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 ... LetzteLetzte
Zeige Ergebnis 9.571 bis 9.600 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; lol another rpg that wont make it...

  
  1. #9571
    QJ Gamer Bronze
    Points: 5.583, Level: 48
    Level completed: 17%, Points required for next Level: 167
    Overall activity: 0%

    Registriert seit
    May 2007
    Beiträge
    127
    Points
    5.583
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    lol another rpg that wont make it


    -- Code Monkey : Sarien, Fishguts, Cracks and Crevices --

    "Did IQ's just drop sharply while I was away?" (Ripley)

  2. #9572
    QJ Gamer Green
    Points: 3.567, Level: 37
    Level completed: 45%, Points required for next Level: 83
    Overall activity: 0%

    Registriert seit
    May 2008
    Ort
    The Netherlands
    Beiträge
    330
    Points
    3.567
    Level
    37
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von _df_ Beitrag anzeigen
    lol another rpg that wont make it
    I will make a nice Dragonball Z RPG even with a story mode with various missions, so don't say it doesn't go to make it;) And I won't release it soon because I'm going to put a lot of work in it and a lot of time;)

    P.S. I will release only one version containing al the features, not any beta's or full-of-bugs demo's
    Geändert von malliet (12-13-2008 um 03:06 PM Uhr)

  3. #9573
    QJ Gamer Bronze
    Points: 5.826, Level: 49
    Level completed: 38%, Points required for next Level: 124
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Ort
    Everywhere
    Beiträge
    206
    Points
    5.826
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von MoAShaun Beitrag anzeigen
    Use alpha blending in PGE.
    PGE? Is that lua player?
    Pokemon Islands in Development : Qj Forum | Google Forum | Probords Forum

  4. #9574
    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

    http://lmgtfy.com/?q=is+pge+luaplayer

    read on and find out yourself.

    simple answer: no.
    [size=3][url=http://luaplayer.org/forums/index.php?topic=507]Complete Lua development cycle outline[/url][/size]

  5. #9575
    QJ Gamer Bronze
    Points: 5.826, Level: 49
    Level completed: 38%, Points required for next Level: 124
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Ort
    Everywhere
    Beiträge
    206
    Points
    5.826
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    Hmm.. never heard of that. So it's almost like a new language, but just a new way to interpret lua.. right?
    Like, a luaplayer competitor?
    Pokemon Islands in Development : Qj Forum | Google Forum | Probords Forum

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

    It's not a competitor, it's a straightup murderer. PGE Lua destroys Luaplayer. They both use the core lua language but each has different graphical, sound, controls, etc API functions.
    [size=3][url=http://luaplayer.org/forums/index.php?topic=507]Complete Lua development cycle outline[/url][/size]

  7. #9577
    QJ Gamer Bronze
    Points: 5.826, Level: 49
    Level completed: 38%, Points required for next Level: 124
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Ort
    Everywhere
    Beiträge
    206
    Points
    5.826
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    Oh. So how much better is it?
    What can a game written for Luaplayer not do, that it can if written for PGE?

    Like, what would you say if you were trying to convince someone to switch and relearn the syntax?
    Pokemon Islands in Development : Qj Forum | Google Forum | Probords Forum

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

    Zitat Zitat von chrisp6825 Beitrag anzeigen
    PGE? Is that lua player?
    OMG . PGE is 100x better than Luaplayer. You can write anything with Luaplayer, but there comes a time where you could write really efficiently but Luaplayer wouldn't by up for the job. You could get write & making your game but that FPS will drop. Thats were PGE comes in, its alot faster & has been coded up from scratch.
    That boundary which you can get in Luaplayer, is near enough extinct. In Luaplayer if your getting a constant 60 FPS thats ok, but in PGE that would be very poor.
    Zitat Zitat von chrisp6825
    what would you say if you were trying to convince someone to switch and relearn the syntax
    You wouldn't relearn anything, the API is 100% new, you'd have to just learn it, it's not hard at all.
    You should read this

  9. #9579
    QJ Gamer Bronze
    Points: 5.826, Level: 49
    Level completed: 38%, Points required for next Level: 124
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Ort
    Everywhere
    Beiträge
    206
    Points
    5.826
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von dan369 Beitrag anzeigen
    You wouldn't relearn anything, the API is 100% new, you'd have to just learn it, it's not hard at all.
    Ya, I meant learn new syntax. But I get what your saying. I guess I should switch then.

    But I havnt found anything about a PGE player for windows, is there one?
    Pokemon Islands in Development : Qj Forum | Google Forum | Probords Forum

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

    It was being worked on, but it will be completed once the API is stable.

    (O/T- Finally, the internet's been down for me for 4 days. Damn budget ISP...)

  11. #9581
    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

    nielkie i have verizon for like 20 bucks a month and its never gone out

    also, chris, you're programming for something made for the psp, you should test on a psp. and its not a new syntax, it is a new API. syntax is how you gotta type ifs and thens and loops and function arguments and all that crap. API is the functions to draw stuff you use. just look at the documentation and get an idea for luaplayer equivs in PGE.
    [size=3][url=http://luaplayer.org/forums/index.php?topic=507]Complete Lua development cycle outline[/url][/size]

  12. #9582
    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

    @TurtlesPwn
    The problem is that I live in Australia. $70 a month gets me 1.5MBit DSL with an 80GB download cap.

  13. #9583
    QJ Gamer Green
    Points: 9.319, Level: 64
    Level completed: 90%, Points required for next Level: 31
    Overall activity: 99,0%

    Registriert seit
    May 2008
    Ort
    GA, USA
    Beiträge
    243
    Points
    9.319
    Level
    64
    Downloads
    0
    Uploads
    0

    Standard

    How would the be the best way to see if a line of text exist??? I need to be able to search and be able to now if it does or doesn't exist.

    Example text file
    Code:
    line1
    line2
    line3
    line4
    Say I need to see if "line2" exist.

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

    Read the whole file, use string.find() to find what your looking for, if its there it'll return the start character to the end character e.g 5-9. If not nil.

  15. #9585
    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

    @dan Better to use Lua's line operations
    Code:
    function findLine(fileHandler, searchLine)
    	for line in fileHandler:lines() do
    		if line == searchLine then
    			return true
    		end
    	end
    	return false
    end

  16. #9586
    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

    Yeah, i see what you mean.

  17. #9587
    QJ Gamer Green
    Points: 9.319, Level: 64
    Level completed: 90%, Points required for next Level: 31
    Overall activity: 99,0%

    Registriert seit
    May 2008
    Ort
    GA, USA
    Beiträge
    243
    Points
    9.319
    Level
    64
    Downloads
    0
    Uploads
    0

    Standard

    Thanks, I will try using Nielkie's function. I may need more help later though, but I will address that problem when I get there.

    EDIT
    Quick question what luaplayer do I need for the command???
    Geändert von corytheidiot1 (12-15-2008 um 04:06 PM Uhr)

  18. #9588
    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

    by coding it, did you really just ask that?

    using
    Code:
    function findLine(fileHandle, searchLine)
        for line in fileHandle:lines() do
            if line == searchLine then
                return true
            end
        end
        return false
    end
    Code:
    white = Color.new(255, 255, 255)
    
    function findLine(fileHandle, searchLine)
        for line in fileHandle:lines() do
            if line == searchLine then
                return true
            end
        end
        return false
    end
    
    while true do
    
    screen:clear(white)
    
    pad = Controls.read()
    
    if pad:cross() and not oldpad:cross() then
        file = io.open("file.txt")
        if findLine(file, "this line") == true then
            found = true
        else
            found = false
        end
        file:close()
    end
    
    if found == true then
        screen:print(1, 1, "line found")
    else
        screen:print(1, 1, "line not found")
    end
    
    screen.waitVblankStart()
    screen.flip()
    
    oldpad = pad
    
    end
    should work
    ------ 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).

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

    You don't need the '== true' though, either way will work.

  20. #9590
    QJ Gamer Green
    Points: 9.319, Level: 64
    Level completed: 90%, Points required for next Level: 31
    Overall activity: 99,0%

    Registriert seit
    May 2008
    Ort
    GA, USA
    Beiträge
    243
    Points
    9.319
    Level
    64
    Downloads
    0
    Uploads
    0

    Standard

    The whole question about the version is because I get an error on luaplayer .20 for windows. I am goin to use HM in the PSP but I am on a spare pc and no spare USB ports so transfer is to much hassle to constantly test.

    Also, I am a little out of it at the moment.

  21. #9591
    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

    seriously, dont use WLP. and if it errors on WLP and on LPHM but not on normal lp how would you ever know? be persistent and eliminate one error at a time.
    [size=3][url=http://luaplayer.org/forums/index.php?topic=507]Complete Lua development cycle outline[/url][/size]

  22. #9592
    QJ Gamer Green
    Points: 9.319, Level: 64
    Level completed: 90%, Points required for next Level: 31
    Overall activity: 99,0%

    Registriert seit
    May 2008
    Ort
    GA, USA
    Beiträge
    243
    Points
    9.319
    Level
    64
    Downloads
    0
    Uploads
    0

    Standard

    The only function that needs HM is the web browser. Right now I am trying to refine the functions that could be carried out by .20. I do understand what you are saying tho.


    EDIT

    Never mind about the testing issues. I forgot I have irshell so I am just goin to use nethost and run the eboot that way
    -=Double Post Merge =-
    I keep getting "attempt to index local 'fileHandler' (a nil value)"
    Geändert von corytheidiot1 (12-15-2008 um 05:10 PM Uhr) Grund: Automerged Doublepost

  23. #9593
    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

    omg lua devs these days are stupid, use iRShell and USB Host, then simply launch your app from lowser and restart it when you have updated the file, but still it wouldnt affect you as you have said you have no usb ports but still other devs should do that.

    p.s. can you show me the code you are using aswell because that error sounds like you are passing it an invalid file path or something
    ------ 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).

  24. #9594
    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 keep getting "attempt to index local 'fileHandler' (a nil value)"
    Gee I wonder what the hell that means. Maybe it means youre trying to use something called fileHandler which is undefined?
    [size=3][url=http://luaplayer.org/forums/index.php?topic=507]Complete Lua development cycle outline[/url][/size]

  25. #9595
    QJ Gamer Green
    Points: 3.567, Level: 37
    Level completed: 45%, Points required for next Level: 83
    Overall activity: 0%

    Registriert seit
    May 2008
    Ort
    The Netherlands
    Beiträge
    330
    Points
    3.567
    Level
    37
    Downloads
    0
    Uploads
    0

    Standard

    Ej everyone I have a big problem. If I don't use a background image (so the background is black) I can see my sprite etc. but if I use a background image for my game, I can't see my sprites and my buildings anymore. Does somebody know how to solve this, because I think it's something with transparant backgrounds or something.

  26. #9596
    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

    Your most probably blitting the background image after the sprite.
    E.g
    screen:blit(--sprite)
    The background should be before that.
    again example,
    screen:blit(--Background)
    screen:blit(--sprite)

  27. #9597
    QJ Gamer Green
    Points: 3.567, Level: 37
    Level completed: 45%, Points required for next Level: 83
    Overall activity: 0%

    Registriert seit
    May 2008
    Ort
    The Netherlands
    Beiträge
    330
    Points
    3.567
    Level
    37
    Downloads
    0
    Uploads
    0

    Standard

    It works. Thanks for your help
    Geändert von malliet (12-17-2008 um 06:53 AM Uhr)

  28. #9598
    QJ Gamer Green
    Points: 9.319, Level: 64
    Level completed: 90%, Points required for next Level: 31
    Overall activity: 99,0%

    Registriert seit
    May 2008
    Ort
    GA, USA
    Beiträge
    243
    Points
    9.319
    Level
    64
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von TurtlesPwn Beitrag anzeigen
    "I keep getting "attempt to index local 'fileHandler' (a nil value)"
    Gee I wonder what the hell that means. Maybe it means youre trying to use something called fileHandler which is undefined?
    The line that is having a problem is inside a function. The value will be defined when I call on the functio, but the problematic line is not in the main loop or anything.

    P.S. I will give you the file when I get on the computer that has it.

  29. #9599
    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

    you on that computer yet?
    ------ 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).

  30. #9600
    QJ Gamer Bronze
    Points: 5.826, Level: 49
    Level completed: 38%, Points required for next Level: 124
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Ort
    Everywhere
    Beiträge
    206
    Points
    5.826
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    Is this possible?

    Code:
    x = 15
    function blah(local x) -- local, so it doesnt interfere with earlier 'x'
        screen:print(0,0,x) 
    end
    
    blah(3) -- prints 3, instead of 15

    I know that if there is a way to do that, then that isn't the way to do it.
    But can you do this? Or do functions already make arguments local?

    Thanks.
    Pokemon Islands in Development : Qj Forum | Google Forum | Probords Forum


 

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

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