Seite 312 von 342 ErsteErste ... 212 262 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 ... LetzteLetzte
Zeige Ergebnis 9.331 bis 9.360 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 making a lua game (card game uno) and i need help the whole way i will give credit ...

  
  1. #9331
    Points: 2.612, Level: 31
    Level completed: 8%, Points required for next Level: 138
    Overall activity: 0%

    Registriert seit
    Aug 2008
    Beiträge
    20
    Points
    2.612
    Level
    31
    Downloads
    0
    Uploads
    0

    Question Help me

    I am making a lua game (card game uno) and i need help the whole way i will give credit to anyone who helps me. if it is easier i can get help through pm. this topic is crowded. so can anyone help me along the way. question 1. what do i do first?



  2. #9332
    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

    First, you stop using an obnoxious font. Second, you go find some basic tutorials, documentation, and reference. Third, you make your game. Simple.

  3. #9333
    QJ Gamer Green
    Points: 4.034, Level: 40
    Level completed: 43%, Points required for next Level: 116
    Overall activity: 0%

    Registriert seit
    Jul 2008
    Beiträge
    467
    Points
    4.034
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    TurtlesPwn: I would have thought You would have snapped

    But seriously do it yourself, because its alot more rewarding and you learn better.
    My Releases:
    ---------------------------------------------------
    [URL="http://forums.qj.net/showthread.php?t=145654"]ROFLFlasher[/URL]

    [URL="http://forums.qj.net/showthread.php?t=144892"]DTS MGS Edition[/URL]

    [URL="http://forums.qj.net/showthread.php?t=143735"]Arkanoid Deluxe Beta[/URL]

    [URL="http://forums.qj.net/showthread.php?p=2144700#post2144700"]SAVIOR![/URL]

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

    Code:
    t = 0
    while true do
      screen:clear()
      for i = 33, 127 do
        screen:print(math.random(0,480),math.random(0,272),string.char(i),Color.new(math.random(0,255),math.random(0,255),math.random(0,255)))
      end
      screen:print(math.sin((math.atan(1) * 4) * 2 / 360 * (t*2)) * 150 + 192.5,math.cos((math.atan(1) * 4) * 2 / 360 * t) * 100 + 131,string.char(71,84,70,79,32,32,78,79,79,66,33,33),Color.new(255,255,255))
      screen.waitVblankStart()
      screen.flip()
      t = t + 1
    end
    That'll tell you how to do it HomebrewModder.

    ...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


  5. #9335
    Raining
    Points: 7.355, Level: 57
    Level completed: 3%, Points required for next Level: 195
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    In The Fog...
    Beiträge
    545
    Points
    7.355
    Level
    57
    My Mood
    Relaxed
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von SG57 Beitrag anzeigen
    Code:
    t = 0
    while true do
      screen:clear()
      for i = 33, 127 do
        screen:print(math.random(0,480),math.random(0,272),string.char(i),Color.new(math.random(0,255),math.random(0,255),math.random(0,255)))
      end
      screen:print(math.sin((math.atan(1) * 4) * 2 / 360 * (t*2)) * 150 + 192.5,math.cos((math.atan(1) * 4) * 2 / 360 * t) * 100 + 131,string.char(71,84,70,79,32,32,78,79,79,66,33,33),Color.new(255,255,255))
      screen.waitVblankStart()
      screen.flip()
      t = t + 1
    end
    That'll tell you how to do it HomebrewModder.

    Wow, a magical bit of code that solves all my problems. Give me some more of that stuff.

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

    If I'm remembering my ASCII table correctly, what SG57 is trying to say is please leave, newbie. GTFO NOOB!!

  7. #9337
    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

    In a nicer fashion Turtles ;)

    I'm surprised you haven't gone off on an insulting obfuscated code rampage to release your stress :) You should try it ;)

    ...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


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

    Knowing my luck, someone would convert it to plain english and not be discrete about it. It's easier to just get mad in plain english.

  9. #9339
    Raining
    Points: 7.355, Level: 57
    Level completed: 3%, Points required for next Level: 195
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    In The Fog...
    Beiträge
    545
    Points
    7.355
    Level
    57
    My Mood
    Relaxed
    Downloads
    0
    Uploads
    0

    Standard

    Can we use this more often? I like it.

  10. #9340
    QJ Gamer Green
    Points: 4.034, Level: 40
    Level completed: 43%, Points required for next Level: 116
    Overall activity: 0%

    Registriert seit
    Jul 2008
    Beiträge
    467
    Points
    4.034
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    Can I crop images before I blit them and save them to a variable, or would I have to crop them during bliting. I am using a sprite sheet.
    My Releases:
    ---------------------------------------------------
    [URL="http://forums.qj.net/showthread.php?t=145654"]ROFLFlasher[/URL]

    [URL="http://forums.qj.net/showthread.php?t=144892"]DTS MGS Edition[/URL]

    [URL="http://forums.qj.net/showthread.php?t=143735"]Arkanoid Deluxe Beta[/URL]

    [URL="http://forums.qj.net/showthread.php?p=2144700#post2144700"]SAVIOR![/URL]

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

    You can do either. Personally, I prefer the latter.

  12. #9342
    QJ Gamer Green
    Points: 4.034, Level: 40
    Level completed: 43%, Points required for next Level: 116
    Overall activity: 0%

    Registriert seit
    Jul 2008
    Beiträge
    467
    Points
    4.034
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    Thanks. I just figured it would be easier to animate with them already in variables as I would only have to change the Player.img
    My Releases:
    ---------------------------------------------------
    [URL="http://forums.qj.net/showthread.php?t=145654"]ROFLFlasher[/URL]

    [URL="http://forums.qj.net/showthread.php?t=144892"]DTS MGS Edition[/URL]

    [URL="http://forums.qj.net/showthread.php?t=143735"]Arkanoid Deluxe Beta[/URL]

    [URL="http://forums.qj.net/showthread.php?p=2144700#post2144700"]SAVIOR![/URL]

  13. #9343
    Raining
    Points: 7.355, Level: 57
    Level completed: 3%, Points required for next Level: 195
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    In The Fog...
    Beiträge
    545
    Points
    7.355
    Level
    57
    My Mood
    Relaxed
    Downloads
    0
    Uploads
    0

    Standard

    Having a problem loading sounds. I removed the sounds completely from the script and it loaded perfectly. I do not have the location wrong at all and cannot think for the life of me must be wrong with it. I have tried this before and they worked perfectly but after I reorganized my project files and decided to test out my project it didn't work.

    Code:
    opening = Sound.load ("Resources/Intro/Opening.wav")
    opening1 = Sound.load ("Resources/Intro/Opening1.wav")
    opening2 = Sound.load ("Resources/Intro/Opening2.wav")
    opening3 = Sound.load ("Resources/Intro/Opening3.wav")
    And here is the error I get:

    Code:
    Error: SCRIPT.LUA:10: error loading sound
    Line 10 is where my code for loading the sounds starts. Can anyone think of why this is not working? I am trying to get my project down but little things like these keep stunting my progress.

    Thanks,
    -Daniel

  14. #9344
    Developer
    Points: 7.577, Level: 58
    Level completed: 14%, Points required for next Level: 173
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    1.026
    Points
    7.577
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    Lua Player only supports 16-bit mono WAV files.

    Ensure yours match this format.

    Check out my homebrew & C tutorials at http://insomniac.0x89.org/
    Coder formerly known as Insomniac197

    tshirtz: what is irshell ??
    Atarian_: it's where people who work for the IRS go when they die

  15. #9345
    Raining
    Points: 7.355, Level: 57
    Level completed: 3%, Points required for next Level: 195
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    In The Fog...
    Beiträge
    545
    Points
    7.355
    Level
    57
    My Mood
    Relaxed
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Insert_Witty_Name Beitrag anzeigen
    Lua Player only supports 16-bit mono WAV files.

    Ensure yours match this format.
    Yes, it does, plus there is the fact that it worked before. Does this mean it is a problem with the code I am using? I am on LPHM6.6 and I have used it before to launch the same program. The only thing different I did was move everything to its own folder, hence the "Resources/Intro" location.

  16. #9346
    Developer
    Points: 7.577, Level: 58
    Level completed: 14%, Points required for next Level: 173
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    1.026
    Points
    7.577
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    Ensure the path you're using is correct.

    It could be a possible bug with LPHM.

    Check out my homebrew & C tutorials at http://insomniac.0x89.org/
    Coder formerly known as Insomniac197

    tshirtz: what is irshell ??
    Atarian_: it's where people who work for the IRS go when they die

  17. #9347
    Raining
    Points: 7.355, Level: 57
    Level completed: 3%, Points required for next Level: 195
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    In The Fog...
    Beiträge
    545
    Points
    7.355
    Level
    57
    My Mood
    Relaxed
    Downloads
    0
    Uploads
    0

    Standard

    Heh, no need. I talked to Homemister about it and he fixed a bug that made that happen. Thanks for your help too IWN.

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

    Kinda ironic there huh? :P (person who made a better lua interpreter correcting an old one)

    ...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


  19. #9349
    Points: 2.282, Level: 28
    Level completed: 88%, Points required for next Level: 18
    Overall activity: 0%
    Achievements:
    First 1000 Experience Points

    Registriert seit
    Aug 2008
    Beiträge
    1
    Points
    2.282
    Level
    28
    Downloads
    0
    Uploads
    0

    Standard

    Spoiler for Animation Code:
    left = Image.load("left.png")
    left2 = Image.load("left2.png")
    left3 = Image.load("left3.png")
    left4 = Image.load("left4.png")
    left5 = Image.load("left5.png")
    left6 = Image.load("left6.png")
    left7 = Image.load("left7.png")
    left8 = Image.load("left8.png")
    right = Image.load("right.png")
    right2 = Image.load("right2.png")
    right3 = Image.load("right3.png")
    right4 = Image.load("right4.png")
    right5 = Image.load("right5.png")
    right6 = Image.load("right6.png")
    right7 = Image.load("right7.png")
    right8 = Image.load("right8.png")
    standright = Image.load("standright.pn g")

    player = {}
    player.x = 20
    player.y = 200
    player.img = standright

    Timer = Timer + 1

    function moveleft()


    if Timer>= 41 or Timer<=0 then

    Timer = 0

    end



    if Timer==5 then

    player.img = left

    end



    if Timer==10 then

    player.img = left2

    end



    if Timer==15 then

    player.img = left3

    end



    if Timer==20 then

    player.img = left4

    end


    if Timer==25 then

    player.img = left5

    end

    if Timer==30 then

    player.img = left6

    end

    if Timer==35 then

    player.img = left7

    end

    if Timer==40 then

    player.img= left8
    end

    end

    function moveright()

    Timer = Timer + 1

    if Timer>= 41 or Timer<=0 then

    Timer = 0

    end



    if Timer==5 then

    player.img = right

    end



    if Timer==10 then

    player.img = right2

    end


    if Timer==15 then

    player.img = right3

    end



    if Timer==20 then

    player.img = right4

    end

    if Timer==25 then

    player.img = right5

    end

    if Timer==30 then

    player.img = right6

    end

    if Timer==35 then

    player.img = right7

    end

    if Timer==40 then

    player.img = right8

    end
    end

    end

    while true do ----MAIN LOOP----

    oldx = player.x
    oldy = player.y


    screen:clear()


    pad = Controls.read()


    if pad:left() and player.x > 0 then
    moveleft()
    player.x = player.x - 4
    end



    if pad:right() and player.x < 480 then
    moveright()
    player.x = player.x + 4
    end

    screen:blit(player.x, player.y, player.img)

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

    I get an error that says, : Error: index.lua:159: '<eof>' expected near 'end'

    Can anybody help me out?

  20. #9350
    QJ Gamer Blue
    Points: 3.795, Level: 38
    Level completed: 97%, Points required for next Level: 5
    Overall activity: 27,0%

    Registriert seit
    Jul 2007
    Beiträge
    296
    Points
    3.795
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    It's a syntax error. If you honestly can't figure out the errors, I have a few suggestions.


    1. Don't ask us to find it for you.
    2. Read http://www.lua.org/pil/
    3. Pay attention on the sections about Tables.

    I suggest you read PIL in it's entirety before continuing on any game you are working on.

    Please, take advice from those who are more experienced than yourself.

    Additionally, learn to indent your code, so that it is easier to read. It will only benefit yourself.

    Code:
    -- Global scope, no indenting
    function SomeFunction(a, b)
        -- Indent, new scope
        if a == b then
            -- Indent, new scope
            return 1
        end
    
        -- Same scope, indent only once
        return 0
    end

  21. #9351
    Raining
    Points: 7.355, Level: 57
    Level completed: 3%, Points required for next Level: 195
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    In The Fog...
    Beiträge
    545
    Points
    7.355
    Level
    57
    My Mood
    Relaxed
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von SG57 Beitrag anzeigen
    Kinda ironic there huh? :P (person who made a better lua interpreter correcting an old one)
    Oh, lol. Well it really is just because of the specific situation I'm in. He is helping me translate my project to be compatible with LPHMv2 but meanwhile I am still working on it so I am still coding in a LuaPlayer HM 6.6 and below compatible way as I am still getting the hang of LPHMv2(shouldn't be too hard but I am trying to get my project done first before anything else). So that's why I would need a fix for HM 6.6 because my project isn't fully compatible with LPHMv2 yet.

  22. #9352
    Points: 2.295, Level: 28
    Level completed: 97%, Points required for next Level: 5
    Overall activity: 0%
    Achievements:
    First 1000 Experience Points

    Registriert seit
    Aug 2008
    Beiträge
    3
    Points
    2.295
    Level
    28
    Downloads
    0
    Uploads
    0

    Standard

    hi guys im newbie at lua programming so
    im tried and done smth but i wanna do Ai matrix code rain?(binary)

    just a simple 101001010101 randomized code rain with lua
    just like this


    1001010010101111101010100 10010111010
    1001010010101111101010100 10010111010
    0010110101010110011010001 01000101010
    1010010111010101001010010 10101011101
    1010111010101101011101011 10101010101
    0010110100010101000101011 11011100101
    1010000100011110101011101 01110101010

    help me pls :)

  23. #9353
    QJ Gamer Blue
    Points: 3.795, Level: 38
    Level completed: 97%, Points required for next Level: 5
    Overall activity: 27,0%

    Registriert seit
    Jul 2007
    Beiträge
    296
    Points
    3.795
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    1. Go read Programming In Lua (Link) [Yes, all of it]
    2. Download PGE Lua (Link)
    3. Read the PGE Lua Documentation. (Link)
    4. Code it yourself.
    5. ???
    6. ....


    Now, do that, in order, without skipping anything.

  24. #9354
    Points: 2.295, Level: 28
    Level completed: 97%, Points required for next Level: 5
    Overall activity: 0%
    Achievements:
    First 1000 Experience Points

    Registriert seit
    Aug 2008
    Beiträge
    3
    Points
    2.295
    Level
    28
    Downloads
    0
    Uploads
    0

    Standard

    thx dude but ive luaplayer and i know basics but i donno how to know that?

  25. #9355
    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 energytr Beitrag anzeigen
    thx dude but ive luaplayer and i know basics but i donno how to know that?
    Uh, ... what?

  26. #9356
    QJ Gamer Blue
    Points: 3.795, Level: 38
    Level completed: 97%, Points required for next Level: 5
    Overall activity: 27,0%

    Registriert seit
    Jul 2007
    Beiträge
    296
    Points
    3.795
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    No, you don't know the basics. If you did, you would know where to start.

    Now do what I said if you actually want to do this.

  27. #9357
    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 _dysfunctional Beitrag anzeigen
    1. Go read Programming In Lua (Link) [Yes, all of it]
    2. Download PGE Lua (Link)
    3. Read the PGE Lua Documentation. (Link)
    4. Code it yourself.
    5. ???
    6. ....


    Now, do that, in order, without skipping anything.
    lol
    You should like post that at the top of every page.

  28. #9358
    QJ Gamer Green
    Points: 4.034, Level: 40
    Level completed: 43%, Points required for next Level: 116
    Overall activity: 0%

    Registriert seit
    Jul 2008
    Beiträge
    467
    Points
    4.034
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von _dysfunctional Beitrag anzeigen
    1. Go read Programming In Lua (Link) [Yes, all of it]
    2. Download PGE Lua (Link)
    3. Read the PGE Lua Documentation. (Link)
    4. Code it yourself.
    5. ???
    6. ....


    Now, do that, in order, without skipping anything.
    That would be the greatest signature ive ever seen.

    energytr: dysfunctional is right, if you knew the basics then you would realise that what you want to do isn't that hard.
    My Releases:
    ---------------------------------------------------
    [URL="http://forums.qj.net/showthread.php?t=145654"]ROFLFlasher[/URL]

    [URL="http://forums.qj.net/showthread.php?t=144892"]DTS MGS Edition[/URL]

    [URL="http://forums.qj.net/showthread.php?t=143735"]Arkanoid Deluxe Beta[/URL]

    [URL="http://forums.qj.net/showthread.php?p=2144700#post2144700"]SAVIOR![/URL]

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

    Yea, it sure would be.
    [size=3][url=http://luaplayer.org/forums/index.php?topic=507]Complete Lua development cycle outline[/url][/size]

  30. #9360
    QJ Gamer Green
    Points: 4.034, Level: 40
    Level completed: 43%, Points required for next Level: 116
    Overall activity: 0%

    Registriert seit
    Jul 2008
    Beiträge
    467
    Points
    4.034
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    Nice signature ^^
    My Releases:
    ---------------------------------------------------
    [URL="http://forums.qj.net/showthread.php?t=145654"]ROFLFlasher[/URL]

    [URL="http://forums.qj.net/showthread.php?t=144892"]DTS MGS Edition[/URL]

    [URL="http://forums.qj.net/showthread.php?t=143735"]Arkanoid Deluxe Beta[/URL]

    [URL="http://forums.qj.net/showthread.php?p=2144700#post2144700"]SAVIOR![/URL]


 

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

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