Seite 76 von 342 ErsteErste ... 26 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 126 176 ... LetzteLetzte
Zeige Ergebnis 2.251 bis 2.280 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; Zitat von ZereoX want me to send it to you. sure sorry madsoul, nope. (dont know any)...

  
  1. #2251
    QJ Gamer Green
    Points: 13.310, Level: 75
    Level completed: 15%, Points required for next Level: 340
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    Here
    Beiträge
    2.715
    Points
    13.310
    Level
    75
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von ZereoX
    want me to send it to you.
    sure

    sorry madsoul, nope. (dont know any)


    [CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]

  2. #2252
    QJ Gamer Platinum
    Points: 87.718, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 100,0%
    Awards:
    Activity Award

    Registriert seit
    Jan 2006
    Ort
    stevens bumhole
    Beiträge
    10.308
    Points
    87.718
    Level
    100
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von EminentJonFrost
    sure

    sorry madsoul, nope. (dont know any)
    damn... i need it for my breakout game.. thanks anyway

  3. #2253
    QJ Gamer Gold
    Points: 18.627, Level: 86
    Level completed: 56%, Points required for next Level: 223
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    LOLWUT
    Beiträge
    2.625
    Points
    18.627
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von madsoul
    damn... i need it for my breakout game.. thanks anyway
    I found a collosion tutorial: GUIDE: Collisions
    Cant wait for the breakout game! :Punk:

  4. #2254
    QJ Gamer Platinum
    Points: 87.718, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 100,0%
    Awards:
    Activity Award

    Registriert seit
    Jan 2006
    Ort
    stevens bumhole
    Beiträge
    10.308
    Points
    87.718
    Level
    100
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von PSPduh
    I found a collosion tutorial: GUIDE: Collisions
    Cant wait for the breakout game! :Punk:
    thx man! :) il put you somewhere in the credits as a helper... ;)

  5. #2255
    QJ Gamer Gold
    Points: 18.627, Level: 86
    Level completed: 56%, Points required for next Level: 223
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    LOLWUT
    Beiträge
    2.625
    Points
    18.627
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    Thank you. And to tell you the truth, I just put in "collision" in search, and thats what it came up with.
    Geändert von PSPduh (05-14-2006 um 04:11 AM Uhr)

  6. #2256
    QJ Gamer Silver
    Points: 11.326, Level: 70
    Level completed: 19%, Points required for next Level: 324
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Beiträge
    871
    Points
    11.326
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    I have a little probleme making my guy move left and right
    Code:
    function playerright()
    screen:blit(player.x,player.y,walkingright1)
    screen:blit(player.x,player.y,walkingright2)
    screen:blit(player.x,player.y,walkingright3)
    end
    but the problem is that all the image stack is there a way to do

    screen:clear(player.x,pla yer.y,walkingright1)
    EX:

    Code:
    function playerright()
    screen:blit(player.x,player.y,walkingright1)
    screen:clear(player.x,player.y,walkingright1)
    screen:blit(player.x,player.y,walkingright2)
    screen:clear(player.x,player.y,walkingright2)
    screen:blit(player.x,player.y,walkingright3)
    screen:clear(player.x,player.y,walkingright3)
    end

  7. #2257
    Points: 5.745, Level: 48
    Level completed: 98%, Points required for next Level: 5
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Beiträge
    404
    Points
    5.745
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    i have a question
    Code:
    x0 = math.sin(1 / 100 * time) * 190 + 195
    what does / mean?
    Bequiet!!!
    I'm learning cc©cc

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

    The '/' means division.

    * = multiply, + = add, - = subtract and / = divison

    ^ = exponent

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


  9. #2259
    sceKernelExitGame();
    Points: 19.955, Level: 89
    Level completed: 21%, Points required for next Level: 395
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    New York
    Beiträge
    3.126
    Points
    19.955
    Level
    89
    Downloads
    0
    Uploads
    0

    Standard

    hello, could anyone please help me with a simple tic tac toe AI? i would really, really appreciate it :) thanks

  10. #2260
    QJ Gamer Blue
    Points: 7.244, Level: 56
    Level completed: 47%, Points required for next Level: 106
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Ort
    Pluto
    Beiträge
    490
    Points
    7.244
    Level
    56
    Downloads
    0
    Uploads
    0

  11. #2261
    sceKernelExitGame();
    Points: 19.955, Level: 89
    Level completed: 21%, Points required for next Level: 395
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    New York
    Beiträge
    3.126
    Points
    19.955
    Level
    89
    Downloads
    0
    Uploads
    0

    Standard

    yeah, i was the one who rewuested them ;) i guess i'll just be patience

  12. #2262
    QJ Gamer Silver
    Points: 11.326, Level: 70
    Level completed: 19%, Points required for next Level: 324
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Beiträge
    871
    Points
    11.326
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    How can i do a leveling collision what i mean by that is this Ex: like when i touch the floor the gravity changes.!?

  13. #2263
    Points: 5.745, Level: 48
    Level completed: 98%, Points required for next Level: 5
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Beiträge
    404
    Points
    5.745
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von ZereoX
    How can i do a leveling collision what i mean by that is this Ex: like when i touch the floor the gravity changes.!?
    if you know how to set up gravity and stuff,
    i think to make that place to change it
    you'll have to do something like
    Code:
    if true then 
    if x0 >= 100 and x0 <= 200 and y0 >= 90 and y0 <= 100 then
    (change gravity)
    end
    end
    the 1st x0 and y0 is the object positions. the 2nd x0 and y0 is the ending of that object.
    but hey, i dont know if this is what you need
    Geändert von natan333 (05-14-2006 um 02:31 PM Uhr)
    Bequiet!!!
    I'm learning cc©cc

  14. #2264
    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 personally believe that the people who made lua in there next update should add a hittest and rotation command into lua i mean i know it wouldn't be easy(or at least i don't think it would) but it would end so many problems that people are asking
    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

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

    ...your joking right? I could easily add collision to the LuaPlayer... Its jsut i have a C collision detection function/prototype setup... So id have to convert to C++... So if anyone couyld do that theres collision for you... or i could just convert my Collision detection into a brand new 'lib' for LUA, kind of like netlib, but full of math commands if you will... Likely to be added next would be rotation via angles, but not radians, which i may just add a few lines to convert that way...

    If anyone would like to help with such a thing, just PM, and i may think about doing such a thing. Itll be like netlib...but instead of WLAN functionality, itll be math and such...

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


  16. #2266
    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 said it would end many people probs and no i'm not jokeing trying to get collision to work properly isn't that easy to the noobies so thus a hittest command would make it really easy for them and i would enjoy a rotation feature(sorry if mispelled)
    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

  17. #2267
    QJ Gamer Silver
    Points: 9.678, Level: 66
    Level completed: 7%, Points required for next Level: 372
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    The Migrant Fleet
    Beiträge
    908
    Points
    9.678
    Level
    66
    Downloads
    0
    Uploads
    0

    Standard

    Is there any word or notepad like program that can do something like this?

    See i have a long function.. but i have about 10 different ways to do that function.. and i need to edit about 50 variables like "[1]" to "[2]"... Is there any program that will let me copy and paste and change all the text i choose into something else? Cuz just editing functions from [1] to [2] gets boring fast.

  18. #2268
    QJ Gamer Gold
    Points: 18.627, Level: 86
    Level completed: 56%, Points required for next Level: 223
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    LOLWUT
    Beiträge
    2.625
    Points
    18.627
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von PSPduh
    I am really sorry for a double post, but now I have a problem. I want it so that a variable increases by 1 everytime my timer increases by 1. my code so far:

    Code:
    red = Color.new(255,0,0)
    yellow = Color.new(255, 255, 0)
    blue = Color.new(0, 0, 255)
    orange = Color.new(223, 88, 6)
    grey = Color.new(94, 97, 111)
    black = Color.new(0, 0, 0)
    white = Color.new(255, 255, 255)
    green = Color.new(0,255,0)
    
    duh = Timer.new()
    duh2 = duh:time()
    x = 470
    y = 0
    
    while true do
    screen:clear()
    duh:start()
    
    if duh2 >= 470 then
    screen:blit(470,0,man)
    end
    
    screen:blit(x,y,man)
    I know that I haven't loaded the man image yet, but I think that you can use a for loop, but I have no idea how that works. Again, everytime the timer increases by 1 I want the x to increase by 1. Help?
    Can someone help me with this a few pages back? :icon_sad:

  19. #2269
    Your Fate is Grim...
    Points: 11.640, Level: 70
    Level completed: 98%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Beiträge
    2.269
    Points
    11.640
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von PSPduh
    Can someone help me with this a few pages back? :icon_sad:
    you could just put:

    Code:
    x = duh2
    that should work.
    --------------------------------------------------------------------------------------

  20. #2270
    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

    yes, what ever you declared as increasing by 1 second, just have the second variable you want to also = w/e the other cariable ='d or just have it = the other cariab le tat already has the time thing... confusing a little....

    anyway, im planning on making a simple lib... but only having collision may not be called a lib... os any more ideas would be great.... as for rotation... im not sure if the PSP's GUM libs have been converted, if not, then it shall be simple trig for rotation... which may be a slow processing time... so.... Oh and maybe an animation prototype as wel, aka function.... Unless youresam is alreay doing so?

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


  21. #2271
    QJ Gamer Green
    Points: 13.310, Level: 75
    Level completed: 15%, Points required for next Level: 340
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    Here
    Beiträge
    2.715
    Points
    13.310
    Level
    75
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von montrob
    Is there any word or notepad like program that can do something like this?

    See i have a long function.. but i have about 10 different ways to do that function.. and i need to edit about 50 variables like "[1]" to "[2]"... Is there any program that will let me copy and paste and change all the text i choose into something else? Cuz just editing functions from [1] to [2] gets boring fast.
    If your using notepad, press the CTRL and H buttons at once.

    It'll ask what to find, and what to replace what it finds with.

    PSPduh showed me that. VERY handy little feature of Notepad.
    [CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]

  22. #2272
    QJ Gamer Bronze
    Points: 5.924, Level: 49
    Level completed: 87%, Points required for next Level: 26
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Ort
    Earth, UK
    Beiträge
    457
    Points
    5.924
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    soz i all ready worked out how to do this my self :Jump:
    lua rocks
    Geändert von JoeDaStudd (05-15-2006 um 07:48 AM Uhr)
    <<Put A message Here>>
    <<Just made another rubbish website visit it here.>>

  23. #2273
    QJ Gamer Silver
    Points: 9.678, Level: 66
    Level completed: 7%, Points required for next Level: 372
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    The Migrant Fleet
    Beiträge
    908
    Points
    9.678
    Level
    66
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von EminentJonFrost
    If your using notepad, press the CTRL and H buttons at once.

    It'll ask what to find, and what to replace what it finds with.

    PSPduh showed me that. VERY handy little feature of Notepad.

    OMG! That feature is AWSM! :Jump: :Jump:


    And I need help somewhere else..

    My game is going to be played with the psp held vertical.. Is there a way that you can print text to the screen vertical?
    Geändert von montrob (05-15-2006 um 08:00 AM Uhr)

  24. #2274
    QJ Gamer Green
    Points: 13.310, Level: 75
    Level completed: 15%, Points required for next Level: 340
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    Here
    Beiträge
    2.715
    Points
    13.310
    Level
    75
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von montrob
    OMG! That feature is AWSM! :Jump: :Jump:


    And I need help somewhere else..

    My game is going to be played with the psp held vertical.. Is there a way that you can print text to the screen vertical?
    um...the only way i can think of is making a pic with the text you want shown printed sideways.

    you mean vertical as in
    |
    |<shoulder button
    |


    < top PSP logo bottom >


    |
    |<shoulder button
    |

    right?
    [CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]

  25. #2275
    QJ Gamer Silver
    Points: 9.678, Level: 66
    Level completed: 7%, Points required for next Level: 372
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    The Migrant Fleet
    Beiträge
    908
    Points
    9.678
    Level
    66
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von EminentJonFrost
    um...the only way i can think of is making a pic with the text you want shown printed sideways.

    you mean vertical as in
    |
    |<shoulder button
    |


    < top PSP logo bottom >


    |
    |<shoulder button
    |

    right?
    ya thats right

  26. #2276
    QJ Gamer Green
    Points: 5.559, Level: 48
    Level completed: 5%, Points required for next Level: 191
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Beiträge
    506
    Points
    5.559
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von montrob
    Is there any word or notepad like program that can do something like this?

    See i have a long function.. but i have about 10 different ways to do that function.. and i need to edit about 50 variables like "[1]" to "[2]"... Is there any program that will let me copy and paste and change all the text i choose into something else? Cuz just editing functions from [1] to [2] gets boring fast.
    I know EminentJonFrost already helped with this, but I just wanted to say that Word has a function and you can say what to replace with what and it replaces all of those.

    Hmmm also with my notepad of Win98SE its just the same as backspace...
    LUA manual:
    [url]http://www.lua.org/manual/5.0/manual.html[/url]

    LUA Wiki:
    [url]http://wiki.ps2dev.org/psp:lua_player[/url]

  27. #2277
    QJ Gamer Green
    Points: 13.310, Level: 75
    Level completed: 15%, Points required for next Level: 340
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    Here
    Beiträge
    2.715
    Points
    13.310
    Level
    75
    Downloads
    0
    Uploads
    0

    Standard

    maybe this might be of interest to you montrob:

    Luaplayer v0.19
    ==========
    - directory detection bugfix [moonlight]
    - Changed System.loadModule to loadlib to work. [Oobles
    the same as the traditional lua loadlib function
    - Made loadlib check if a module is already loaded before trying
    to load. [Oobles]
    - Removed getLuaState export. No longer required. [Oobles]
    - Made debugOutput work in the same way as printf in bootstrap. [Oobles]
    - Added loadlib.prx kernel module. required for module loading. [Oobles]
    - Added a module sample for manipulating images [Shine]
    I havent checked it out yet, but it sounds like what you may be looking for. I'm gonna look into it now.

    Edit - I found in the new Luaplayer (version 19) in the Samples folder, this script:

    Code:
    function rotate(image)
    	local w = image:width()
    	local h = image:height()
    	local result = Image.createEmpty(h, w)
    	for x=0,w-1 do
    		for y=0,h-1 do
    			result:pixel(h-y-1, x, image:pixel(x, y))
    		end
    	end
    	return result
    end
    
    function printRotated(x, y, text, color, image, rotateIndex)
    	rotateIndex = math.mod(rotateIndex, 4)
    	local w = string.len(text)
    	local result = Image.createEmpty(w * 8, 8)
    	result:print(0, 0, text, color)
    	if rotateIndex > 0 then
    		rotateIndex = rotateIndex - 1
    		for i=0,rotateIndex do
    			result = rotate(result)
    		end
    	end
    	image:blit(x, y, result)
    end
    
    cadetBlue = Color.new(95, 158, 160)
    
    printRotated(132, 0, "Don't ask what Lua Player", cadetBlue, screen, 0)
    printRotated(472, 76, "can do for you,", cadetBlue, screen, 1)
    printRotated(160, 264, "ask what you can do", cadetBlue, screen, 2)
    printRotated(0, 76, "for Lua Player!", cadetBlue, screen, 3)
    screen.flip()
    while true do
    	screen.waitVblankStart()
    end
    :)
    Geändert von EminentJonFrost (05-15-2006 um 12:04 PM Uhr)
    [CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]

  28. #2278
    TheMarioKarters
    Guest

    Standard

    Zitat Zitat von EminentJonFrost
    If your using notepad, press the CTRL and H buttons at once.

    It'll ask what to find, and what to replace what it finds with.

    PSPduh showed me that. VERY handy little feature of Notepad.
    Wow, that's awesome.
    Cheers.

  29. #2279
    sceKernelExitGame();
    Points: 19.955, Level: 89
    Level completed: 21%, Points required for next Level: 395
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    New York
    Beiträge
    3.126
    Points
    19.955
    Level
    89
    Downloads
    0
    Uploads
    0

    Standard

    can any help me with making text return once is hit the edge off the screen? so it doesnt run if the end of the screen? thanks

  30. #2280
    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

    just set x to 450 so like:
    if x > 480 then x = 450 end

    very simple
    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


 

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

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