Seite 179 von 342 ErsteErste ... 79 129 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 229 279 ... LetzteLetzte
Zeige Ergebnis 5.341 bis 5.370 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; hey sg57 how would i do that?...would be like actually i have no clue, can you help me...il give u ...

  
  1. #5341
    QJ Gamer Blue
    Points: 4.918, Level: 44
    Level completed: 84%, Points required for next Level: 32
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    6ft. Down Underground........Oh and guess what my avatar is
    Beiträge
    387
    Points
    4.918
    Level
    44
    Downloads
    0
    Uploads
    0

    Standard

    hey sg57 how would i do that?...would be like

    actually i have no clue, can you help me...il give u credit if you do, lol



  2. #5342
    QJ Gamer Blue
    Points: 5.034, Level: 45
    Level completed: 43%, Points required for next Level: 116
    Overall activity: 0%

    Registriert seit
    Nov 2005
    Beiträge
    243
    Points
    5.034
    Level
    45
    Downloads
    0
    Uploads
    0

    Standard

    sounds like all he needs to do to speed it up is increase an integer somewhere
    actually its a little harder than that, its currently slow because it loops through every pixel on the screen each frame, thats 130,560 pixels it has to deal with, per-frame.
    well thats what it used to do, he's changed it so it only loops through the section the text is in, witch is like one 20th of the screen (20x faster).

  3. #5343
    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

    Zitat Zitat von the undead
    Can lua right to flash 0? and 1?
    if u mean write, then probably not, i wanted to test it, but definetly can read from flash0/1

  4. #5344
    QJ Gamer Green
    Points: 5.400, Level: 47
    Level completed: 25%, Points required for next Level: 150
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    London
    Beiträge
    165
    Points
    5.400
    Level
    47
    Downloads
    0
    Uploads
    0

    Standard

    I've upgraded my pong code from ealier in this thread (if you saw it...).
    Spoiler for My code:

    Code:
    -- Colors
    white = Color.new(255, 255, 255);
    red = Color.new(255,0,0)
    -- paddle image
    paddleimg = Image.createEmpty(10, 60)
    paddleimg:clear(white)
    -- ball image
    ballimg = Image.createEmpty(5,5 )
    ballimg:clear(white)
    -- score
    score1 = 0
    score2 = 0
    ---Direction
    direction = "none"
    direction2 = "none"
    Bstartdir = math.random(1,2)
    -- paddles
    paddle = { }
    paddle[1] = { x = 5, y = 100, img = paddleimg }
    paddle[2] = { x = 465, y = 100, img = paddleimg }
    -- ball
    ball = { }
    ball[1] = { x = 240, y = 130, img = ballimg }
    -- screen
    screenwidth = 480 - paddleimg:width()
    screenheight = 272 - paddleimg:height()
    -- speed
    speed = 2
    -- Collision Detection Function
    function collision(x1, y1, w1, h1, x2, y2, w2, h2)
    if (y2 >= y1 and y1 + h1 >= y2) or (y2 + h2 >= y1 and y1 + h1 >= y2 + h2) or (y1 >= y2 and y2 + h2 >= y1) or (y1 + h1 >= y2 and y2 + h2 >= y1 + h1) then
    if x2 >= x1 and x1 + w1 >= x2 then
    return true
    elseif x2 + w2 >= x1 and x1 + w1 >= x2 + w2 then
    return true
    elseif x1 >= x2 and x2 + w2 >= x1 then
    return true
    elseif x1 + w1 >= x2 and x2 + w2 >= x1 + w1 then
    return true
    end
    end
    return false
    end
    function movePlayer1( )
    if pad:up() and paddle[1].y > 0 then
    paddle[1].y = paddle[1].y - speed
    end
    if pad:down() and paddle[1].y < screenheight then
    paddle[1].y = paddle[1].y + speed
    end
    end
    function movePlayer2( )
    if pad:triangle() and paddle[2].y > 0 then
    paddle[2].y = paddle[2].y - speed
    end
    if pad:cross() and paddle[2].y < screenheight then
    paddle[2].y = paddle[2].y + speed
    end
    end
    while true do
    screen:clear()
    -- store player's position at beginning of each loop
    oldx = ball[1].x
    oldy = ball[1].y
    screen:clear()
    screen:print(220, 15, ""..score1, red)
    screen:print(255, 15, ""..score2, red)
    screen:blit(paddle[1].x, paddle[1].y, paddleimg )
    screen:blit(paddle[2].x, paddle[2].y, paddleimg )
    screen:blit(ball[1].x, ball[1].y, ball[1].img )
    pad = Controls.read()
    movePlayer1( )
    movePlayer2( )
    ---Direction
    if direction == "left" then
    ball[1].x = ball[1].x - speed
    end
    if direction == "right" then
    ball[1].x = ball[1].x + speed
    end
    if direction2 == "up" then
    ball[1].y = ball[1].y - speed
    end
    if direction2 == "down" then
    ball[1].y = ball[1].y + speed
    end
    ---ball start direction
    if Bstartdir == 1 then
    direction = "left"
    end
    if Bstartdir == 2 then
    direction = "right"
    end
    -- Collision Detection for paddle1
    Bstartdir = 0
    if collision(ball[1].x, ball[1].y, ball[1].w, ball[1].img:height(), paddle[1].x, paddle[1].y, paddle[1].img:width(), paddle[1].img:height()) then
    direction = "right"
    end
    if collision(ball[1].x, ball[1].y, ball[1].img:width(), ball[1].img:height(), paddle[1].x, paddle[1].y, paddle[1].img:width(), paddle[1].img:height()) and pad:up() then
    Bstartdir = 0
    direction = "right"
    direction2 = "up"
    end
    if collision(ball[1].x, ball[1].y, ball[1].img:width(), ball[1].img:height(), paddle[1].x, paddle[1].y, paddle[1].img:width(), paddle[1].img:height()) and pad:down() then
    Bstartdir = 0
    direction = "right"
    direction2 = "down"
    beep:play()
    end
    --- Collision Detection for paddle2
    if collision(ball[1].x, ball[1].y, ball[1].img:width(), ball[1].img:height(), P2x, P2y, paddle[1].img:width(), paddle[1].img:height()) then
    Bstartdir = 0
    direction = "left"
    beep:play()
    end
    if collision(ball[1].x, ball[1].y, ball[1].img:width(), ball[1].img:height(), paddle[2].x, paddle[2].y, paddle[2].img:width(), paddle[2].img:height()) and pad:triangle() then
    Bstartdir = 0
    direction = "left"
    direction2 = "up"
    beep:play()
    end
    if collision(ball[1].x, ball[1].y, ball[1].img:width(), ball[1].img:height(), paddle[2].x, paddle[2].y, paddle[2].img:width(), paddle[2].img:height()) and pad:cross() then
    Bstartdir = 0
    direction = "left"
    direction2 = "down"
    beep:play()
    end
    
    screen.waitVblankStart()
    screen.flip()
    end

    But I'm getting this error:
    Code:
    error: index.lua:47: attempt to perform local arithmatic on local 'w1' (a nil value)
    I think this means that you cant 'do math' on that variable, but all the other dummy variables in that function luaPlayers fine with.....

    Oh, and thanks to BlackShark whos code has been great to learn from! (Hope thats OK.... :o )

  5. #5345
    QJ Gamer Silver
    Points: 7.278, Level: 56
    Level completed: 64%, Points required for next Level: 72
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    Pimp'en in the US F#
    Beiträge
    1.254
    Points
    7.278
    Level
    56
    Downloads
    0
    Uploads
    0

    Standard

    hehe, its cool, I just hope it helps ( and I see another great Pong game that rivals mine )

    EDIT: the reason that comes up is because you have not defined w1 yet, w1 in this case would be the width of what ever object that applies to, weather ball or paddle. I don't think you defined the X's and Y's in there either, you'll probably get an error for those soon enough to if you don't define them!
    The Wentire Worls in two Sectors....
    When did I get dev statz?
    Spoiler for my PSP homebrewReleases:
    Ace of Space V1|PvP Pong Online|PvP Pong v3 | 3.03 BlackShark Custom Firmware
    (PvP Pong DL'ed well over 2403 times combined! get yours now!)
    Spoiler for Great Quotes:

    "No Snowflake in an Avalanche ever feels responsible....." - Fortune Cookie.

  6. #5346
    .info
    Points: 15.395, Level: 80
    Level completed: 9%, Points required for next Level: 455
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    ACT, Australia
    Beiträge
    1.674
    Points
    15.395
    Level
    80
    Downloads
    0
    Uploads
    0

    Standard

    Can someone help me? I've never gotten the error before, but when exiting my main game.lua file and reloading it, i get the error "Loop ingettable"

    Any help please?

    http://www.yongobongo.com
    PSN - yongobongo

  7. #5347
    QJ Gamer Green
    Points: 5.400, Level: 47
    Level completed: 25%, Points required for next Level: 150
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    London
    Beiträge
    165
    Points
    5.400
    Level
    47
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von BlackShark
    hehe, its cool, I just hope it helps ( and I see another great Pong game that rivals mine )

    EDIT: the reason that comes up is because you have not defined w1 yet, w1 in this case would be the width of what ever object that applies to, weather ball or paddle. I don't think you defined the X's and Y's in there either, you'll probably get an error for those soon enough to if you don't define them!
    Thanks for your help BlackShark, but isnt the w1 variable a dummy var? (ie its only used in the function and arent defined, and whatever values are parsed through it through the function call change the variables.
    eg.
    Code:
    white = Color.new(255,255,255)
     
    function maths(x, y) -- dummy vars are x and y
    return x * y         -- these are not declared
    end
     
    while true do
    num1 = 1
    num2 = 2
    test = maths(num1, num2)
     
    screen:print(0,0, "The number is: " .. test, white)
    screen.waitVblankStart()
    screen.flip()
    end
    That works and the variables arent declared, so why does mine not work?

  8. #5348
    QJ Gamer Silver
    Points: 7.278, Level: 56
    Level completed: 64%, Points required for next Level: 72
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    Pimp'en in the US F#
    Beiträge
    1.254
    Points
    7.278
    Level
    56
    Downloads
    0
    Uploads
    0

    Standard

    technecly,
    Code:
    function maths(x, y) -- dummy vars are x and y
    return x * y         -- these are not declared
    end

    IS defining the x/y variables,
    the w1 is supposed to be defined as the with of object 1 or maybe like your paddle, find the width of your paddle, then up in somewhere in your code write

    w1 = 10

    replace 10 with the actual width of your paddle.
    The Wentire Worls in two Sectors....
    When did I get dev statz?
    Spoiler for my PSP homebrewReleases:
    Ace of Space V1|PvP Pong Online|PvP Pong v3 | 3.03 BlackShark Custom Firmware
    (PvP Pong DL'ed well over 2403 times combined! get yours now!)
    Spoiler for Great Quotes:

    "No Snowflake in an Avalanche ever feels responsible....." - Fortune Cookie.

  9. #5349
    QJ Gamer Green
    Points: 5.400, Level: 47
    Level completed: 25%, Points required for next Level: 150
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    London
    Beiträge
    165
    Points
    5.400
    Level
    47
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von BlackShark

    IS defining the x/y variables,
    the w1 is supposed to be defined as the with of object 1 or maybe like your paddle, find the width of your paddle, then up in somewhere in your code write

    w1 = 10

    replace 10 with the actual width of your paddle.
    even if i define it, i still get the same error
    EDIT: Does a function accept table values as arguments?

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

    Blake1 - The reason num1 and num2 arent giving you errors in your snippet, is becuase your setting them to a value, and that also means you'd be initlizing it, which means your creating it. Now, if you were comparing num1 and/or num2, than it would give you anerror as for one - there is no value in 'num1' and two, it cant find a variable named num1.

    As for the motion blurr thing, yes, eyece explained it quite well. After seeing hte GIF, Im going to cut down on al ayer, so in turn that should boost it by 480*12 x faster. Think someone could test this:
    Code:
    scene = {}
    scene[1] = {newcolor = {r=0,g=0,b=0,a=0},
    	 finalcolor = Color.new(0,0,0),
    	 screencolor = Color.new(0,0,0),
    	 image=Image.createEmpty(480,13)}
    scene[2] = {newcolor = {r=0,g=0,b=0,a=0},
    	 finalcolor = Color.new(0,0,0),
    	 screencolor = Color.new(0,0,0),
    	 image=Image.createEmpty(480,13)}
    
    scene_num = 1
    
    time = 0
    pi = math.atan(1) * 4
    i=0
    y=0
    x=0
    
    screen:clear()
    screen.waitVblankStart()
    screen.flip()
    
    while true do
         for x=0,479 do
              for y=130,142 do
    		scene[scene_num].screencolor = screen:pixel(x,y) -- get pixel color
    		scene[scene_num].newcolor = scene[scene_num].screencolor:colors() -- give it to new table
    		scene[scene_num].newcolor.a = 255/scene_num-40/scene_num -- edit transparency value
    		scene[scene_num].finalcolor = Color.new(scene[scene_num].newcolor.r,scene[scene_num].newcolor.g,scene[scene_num].newcolor.b,scene[scene_num].newcolor.a)
    		scene[scene_num].image:pixel(x,y-130,scene[scene_num].finalcolor) -- give that color to the old scene 
              end
         end
         scene_num = scene_num + 1
         if scene_num > 2 then scene_num = 1 end
    
         screen:clear()
    
         x = math.sin(pi * 2 / 360 * time) * 150 + 180.5
         screen:print(x, 131, "Does this blur?", Color.new(0,255,0))
         time = time + 1
         if time >= 360 then time = 0 end
    
         for i=1,2 do screen:blit(0,130,scene[i].image) end 
    
         screen.waitVblankStart()
         screen.flip()
    end

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


  11. #5351
    QJ Gamer Blue
    Points: 4.918, Level: 44
    Level completed: 84%, Points required for next Level: 32
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    6ft. Down Underground........Oh and guess what my avatar is
    Beiträge
    387
    Points
    4.918
    Level
    44
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von myschoo
    if u mean write, then probably not, i wanted to test it, but definetly can read from flash0/1
    im sure their is a wau to do it tho, or atleast i hope so

  12. #5352
    QJ Gamer Green
    Points: 5.400, Level: 47
    Level completed: 25%, Points required for next Level: 150
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    London
    Beiträge
    165
    Points
    5.400
    Level
    47
    Downloads
    0
    Uploads
    0

    Standard

    SG57 - the arguments that are going into the function are initialised, in an array/table .

  13. #5353
    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

    Uh... what? The arguments in the function in your snippet are just place holders, in a sense. The best way to learn it, is to learn C's syntax, as it will help you understand programming in general much better.
    Code:
    int maths(int x, int y) { return x*y; }
    That is your maths function in C. It returns a whole number (hence the 'int' data type), and hte arguments are being initilized, so no error there. Its just, when you call that function and supply the arguments with a value, than your setting those variables to those values, than running the code within the function...
    Code:
    int some_vars[2];
    
    some_var[0] = maths(3,9)
    // whats happening here is...
    maths ( x = 3, y = 9 ) { some_vars[0] = 3*9; }
    
    some_var[1] = maths(2,13)
    // whats happening here is...
    maths ( x = 2, y = 13) { some_vars[1] = 2*13 }
    I dont quite understand what you are saying, so please elaborate before i rant some more :Argh:

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


  14. #5354
    QJ Gamer Blue
    Points: 5.034, Level: 45
    Level completed: 43%, Points required for next Level: 116
    Overall activity: 0%

    Registriert seit
    Nov 2005
    Beiträge
    243
    Points
    5.034
    Level
    45
    Downloads
    0
    Uploads
    0

    Standard

    its doing the same thing SG57, blurring, getting darker, and still showing that clip of the lowser (wtf).

  15. #5355
    QJ Gamer Green
    Points: 5.400, Level: 47
    Level completed: 25%, Points required for next Level: 150
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    London
    Beiträge
    165
    Points
    5.400
    Level
    47
    Downloads
    0
    Uploads
    0

    Standard

    I know their placeholders. They dont have to be defined outside of the function, right?

    But the error im getting is:
    Code:
    error: index.lua:47: attempt to perform local arithmatic on local 'w1' (a nil value)
    with this code:
    Spoiler for My Code:

    Code:
    -- Colors
    white = Color.new(255, 255, 255);
    red = Color.new(255,0,0)
    -- paddle image
    paddleimg = Image.createEmpty(10, 60)
    paddleimg:clear(white)
    -- ball image
    ballimg = Image.createEmpty(5,5 )
    ballimg:clear(white)
    -- score
    score1 = 0
    score2 = 0
    ---Direction
    direction = "none"
    direction2 = "none"
    Bstartdir = math.random(1,2)
    -- paddles
    paddle = { }
    paddle[1] = { x = 5, y = 100, img = paddleimg }
    paddle[2] = { x = 465, y = 100, img = paddleimg }
    -- ball
    ball = { }
    ball[1] = { x = 240, y = 130, img = ballimg }
    -- screen
    screenwidth = 480 - paddleimg:width()
    screenheight = 272 - paddleimg:height()
    -- speed
    speed = 2
    -- Collision Detection Function
    function collision(x1, y1, w1, h1, x2, y2, w2, h2)
    if (y2 >= y1 and y1 + h1 >= y2) or (y2 + h2 >= y1 and y1 + h1 >= y2 + h2) or (y1 >= y2 and y2 + h2 >= y1) or (y1 + h1 >= y2 and y2 + h2 >= y1 + h1) then
    if x2 >= x1 and x1 + w1 >= x2 then
    return true
    elseif x2 + w2 >= x1 and x1 + w1 >= x2 + w2 then
    return true
    elseif x1 >= x2 and x2 + w2 >= x1 then
    return true
    elseif x1 + w1 >= x2 and x2 + w2 >= x1 + w1 then
    return true
    end
    end
    return false
    end
    function movePlayer1( )
    if pad:up() and paddle[1].y > 0 then
    paddle[1].y = paddle[1].y - speed
    end
    if pad:down() and paddle[1].y < screenheight then
    paddle[1].y = paddle[1].y + speed
    end
    end
    function movePlayer2( )
    if pad:triangle() and paddle[2].y > 0 then
    paddle[2].y = paddle[2].y - speed
    end
    if pad:cross() and paddle[2].y < screenheight then
    paddle[2].y = paddle[2].y + speed
    end
    end
    while true do
    screen:clear()
    -- store player's position at beginning of each loop
    oldx = ball[1].x
    oldy = ball[1].y
    screen:clear()
    screen:print(220, 15, ""..score1, red)
    screen:print(255, 15, ""..score2, red)
    screen:blit(paddle[1].x, paddle[1].y, paddleimg )
    screen:blit(paddle[2].x, paddle[2].y, paddleimg )
    screen:blit(ball[1].x, ball[1].y, ball[1].img )
    pad = Controls.read()
    movePlayer1( )
    movePlayer2( )
    ---Direction
    if direction == "left" then
    ball[1].x = ball[1].x - speed
    end
    if direction == "right" then
    ball[1].x = ball[1].x + speed
    end
    if direction2 == "up" then
    ball[1].y = ball[1].y - speed
    end
    if direction2 == "down" then
    ball[1].y = ball[1].y + speed
    end
    ---ball start direction
    if Bstartdir == 1 then
    direction = "left"
    end
    if Bstartdir == 2 then
    direction = "right"
    end
    -- Collision Detection for paddle1
    Bstartdir = 0
    if collision(ball[1].x, ball[1].y, ball[1].w, ball[1].img:height(), paddle[1].x, paddle[1].y, paddle[1].img:width(), paddle[1].img:height()) then
    direction = "right"
    end
    if collision(ball[1].x, ball[1].y, ball[1].img:width(), ball[1].img:height(), paddle[1].x, paddle[1].y, paddle[1].img:width(), paddle[1].img:height()) and pad:up() then
    Bstartdir = 0
    direction = "right"
    direction2 = "up"
    end
    if collision(ball[1].x, ball[1].y, ball[1].img:width(), ball[1].img:height(), paddle[1].x, paddle[1].y, paddle[1].img:width(), paddle[1].img:height()) and pad:down() then
    Bstartdir = 0
    direction = "right"
    direction2 = "down"
    beep:play()
    end
    --- Collision Detection for paddle2
    if collision(ball[1].x, ball[1].y, ball[1].img:width(), ball[1].img:height(), P2x, P2y, paddle[1].img:width(), paddle[1].img:height()) then
    Bstartdir = 0
    direction = "left"
    beep:play()
    end
    if collision(ball[1].x, ball[1].y, ball[1].img:width(), ball[1].img:height(), paddle[2].x, paddle[2].y, paddle[2].img:width(), paddle[2].img:height()) and pad:triangle() then
    Bstartdir = 0
    direction = "left"
    direction2 = "up"
    beep:play()
    end
    if collision(ball[1].x, ball[1].y, ball[1].img:width(), ball[1].img:height(), paddle[2].x, paddle[2].y, paddle[2].img:width(), paddle[2].img:height()) and pad:cross() then
    Bstartdir = 0
    direction = "left"
    direction2 = "down"
    beep:play()
    end
    
    screen.waitVblankStart()
    screen.flip()
    end
    Code:
    
    
    But of couse the w1 var is a nil value, if its only a placeholder.

    EDIT: Why am I getting that empty code block in my post?

  16. #5356
    Developer
    Points: 4.318, Level: 41
    Level completed: 84%, Points required for next Level: 32
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    205
    Points
    4.318
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    Blake, look at your third input argument the first time you use the collision function.

  17. #5357
    QJ Gamer Silver
    Points: 7.278, Level: 56
    Level completed: 64%, Points required for next Level: 72
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    Pimp'en in the US F#
    Beiträge
    1.254
    Points
    7.278
    Level
    56
    Downloads
    0
    Uploads
    0

    Standard

    ya, you still haven't defined it, you need to, put "w1 = 10" or something like that above your function. you can change "10" to what ever the actual width of your paddle is.
    The Wentire Worls in two Sectors....
    When did I get dev statz?
    Spoiler for my PSP homebrewReleases:
    Ace of Space V1|PvP Pong Online|PvP Pong v3 | 3.03 BlackShark Custom Firmware
    (PvP Pong DL'ed well over 2403 times combined! get yours now!)
    Spoiler for Great Quotes:

    "No Snowflake in an Avalanche ever feels responsible....." - Fortune Cookie.

  18. #5358
    QJ Gamer Blue
    Points: 4.918, Level: 44
    Level completed: 84%, Points required for next Level: 32
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    6ft. Down Underground........Oh and guess what my avatar is
    Beiträge
    387
    Points
    4.918
    Level
    44
    Downloads
    0
    Uploads
    0

    Standard

    any one know how to write to the flash(0 and 1) ive been looking all over the place

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

    LMelior nailed it
    Code:
    if collision(ball[1].x, ball[1].y, ball[1].w, ball[1].img:height(), paddle[1].x, paddle[1].y, paddle[1].img:width(), paddle[1].img:height()) then
    direction = "right"
    end
    Notice the typo? What the heck is ball[1].w?

  20. #5360
    QJ Gamer Blue
    Points: 4.917, Level: 44
    Level completed: 84%, Points required for next Level: 33
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    In a cave according to SG57 lol
    Beiträge
    273
    Points
    4.917
    Level
    44
    Downloads
    0
    Uploads
    0

    Standard

    Does anyone know how to make .xm files play smoothly?

    I put in Music.playFile("moise.xm" , true) and it works, but it plays a note every second and lags my game like crazy.

  21. #5361
    Ponies and Unicorns
    Points: 5.778, Level: 49
    Level completed: 14%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Pelennor Fields
    Beiträge
    547
    Points
    5.778
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    then exchange true with false. and it will play once.
    If you play WoW come find me on DOOMHAMMER (US) I am Human mage lvl 64 Atrana is the name (dont ask for runs!)
    Gold donations are highly appreciated!

  22. #5362
    QJ Gamer Blue
    Points: 4.209, Level: 41
    Level completed: 30%, Points required for next Level: 141
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    72
    Points
    4.209
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    No, that wont make a difference. The problem is probably due to the psp running out of processing power, or the memory stick constantly being accessed. Try to optimise your code

  23. #5363
    QJ Gamer Green
    Points: 7.598, Level: 58
    Level completed: 24%, Points required for next Level: 152
    Overall activity: 0%

    Registriert seit
    Nov 2005
    Ort
    NoWhere . . . .
    Beiträge
    1.266
    Points
    7.598
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von the undead
    any one know how to write to the flash(0 and 1) ive been looking all over the place
    theres no writing to flash 0/1 only read access

  24. #5364
    QJ Gamer Blue
    Points: 4.918, Level: 44
    Level completed: 84%, Points required for next Level: 32
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    6ft. Down Underground........Oh and guess what my avatar is
    Beiträge
    387
    Points
    4.918
    Level
    44
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von zmathue
    theres no writing to flash 0/1 only read access
    kthanks now i need to learn c and make a lua player mod, lol

    know any good tuts?

    -edit
    actuallyy ill just learn c and make an eboot, so know any good tuts?...lol

  25. #5365
    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

    Just have someone edit the LUA Player so we can get flash 0 write, But keep in mind LUA was meant for the beginning coders so thats why LUA is easy to learn.

  26. #5366
    QJ Gamer Silver
    Points: 7.278, Level: 56
    Level completed: 64%, Points required for next Level: 72
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    Pimp'en in the US F#
    Beiträge
    1.254
    Points
    7.278
    Level
    56
    Downloads
    0
    Uploads
    0

    Standard

    if ever a mod was to come out like that, id make a mod flasher like xflash :), but who knows if that would ever be implemented.
    The Wentire Worls in two Sectors....
    When did I get dev statz?
    Spoiler for my PSP homebrewReleases:
    Ace of Space V1|PvP Pong Online|PvP Pong v3 | 3.03 BlackShark Custom Firmware
    (PvP Pong DL'ed well over 2403 times combined! get yours now!)
    Spoiler for Great Quotes:

    "No Snowflake in an Avalanche ever feels responsible....." - Fortune Cookie.

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

    I hope it doesn't happen, Too many newb LUA coders will start making stuff related to flash and i can see all the bricks already.

  28. #5368
    Ponies and Unicorns
    Points: 5.778, Level: 49
    Level completed: 14%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Pelennor Fields
    Beiträge
    547
    Points
    5.778
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von PSPhakkor
    No, that wont make a difference. The problem is probably due to the psp running out of processing power, or the memory stick constantly being accessed. Try to optimise your code
    If you talking about my post (because I think you are) yes actually it will make a difference. Changing that last variable to false will play the song once or once everytime it is called. Trust me I made a app with a tuner in it.
    If you play WoW come find me on DOOMHAMMER (US) I am Human mage lvl 64 Atrana is the name (dont ask for runs!)
    Gold donations are highly appreciated!

  29. #5369
    .info
    Points: 15.395, Level: 80
    Level completed: 9%, Points required for next Level: 455
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    ACT, Australia
    Beiträge
    1.674
    Points
    15.395
    Level
    80
    Downloads
    0
    Uploads
    0

    Standard

    Can someone help me? I have an error when using dofile() and then loading the same file again...Loop ingettable?

    http://www.yongobongo.com
    PSN - yongobongo

  30. #5370
    Ponies and Unicorns
    Points: 5.778, Level: 49
    Level completed: 14%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Pelennor Fields
    Beiträge
    547
    Points
    5.778
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    Need some code.
    If you play WoW come find me on DOOMHAMMER (US) I am Human mage lvl 64 Atrana is the name (dont ask for runs!)
    Gold donations are highly appreciated!


 

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

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