Seite 183 von 342 ErsteErste ... 83 133 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 233 283 ... LetzteLetzte
Zeige Ergebnis 5.461 bis 5.490 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 cant get it to work inside homebrew games......

  
  1. #5461
    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 cant get it to work inside homebrew games...



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

    Hmm... Maybe ask around or something? Do you not have a webcam or something?

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


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


    well Shrooms pretty much covered it, it first explodes with white pixels/particles then again with color, it goes out from the center and disappears after going so far, it kind of looks like a star field except the particles don't get bigger as they move out. Thats about it, looks like they do what there supposed to do. Hope this helps
    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.

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

    Im an idiot... Damn opaque values got mixed up in my head... Anywho... Someone tell me what they think of this. this version should fade away the particles, as well as have some take longer, and some shorter, to fade away. Now... I just need to do that color scheme method where if 2 particles are on eachother, the color on the screen turns more white...
    Code:
    --[[
         Lua Particle Demo
             By: SG57
    
    
         No more than an
          eye looker...
            For now ;)
    ]]
    math.randomseed(os.time( ))
    num_particles = 499 -- # of particles to have on screen
    particle = {}
    
    for i=0,num_particles do  -- constructs each particle with default values
           particle[i] = { x=240,y=136,                   -- x and y coordinates
                           xspeed,yspeed,                -- speed on x and y planes
                           color=Color.new(255,255,255), -- color of particle
                           life=255,                       -- life determines color ^
                           angle=math.random(360),       -- random angle for particle movement
                           speed=10,                      -- particle speed
                           fade_speed=40,  -- fading speed of particle
                           r=255,g=255,b=255             -- so color can be changed
                         }
           particle[i].xspeed = math.sin(particle[i].angle) * particle[i].speed -- set x axis vector speed
           particle[i].yspeed = math.cos(particle[i].angle) * particle[i].speed -- set y axis vector speed
    end
    
    while true do
       screen:clear()
       for i=0,num_particles do
           particle[i].xspeed = math.sin(particle[i].angle) * particle[i].speed -- set x axis vector speed
           particle[i].yspeed = math.cos(particle[i].angle) * particle[i].speed -- set y axis vector speed
    
           particle[i].x = particle[i].x + particle[i].xspeed -- Vector speeds
           particle[i].y = particle[i].y + particle[i].yspeed -- ^
    
           particle[i].color = Color.new(particle[i].r,particle[i].g,particle[i].b,particle[i].life)
    
           if particle[i].life <= 0 then
                particle[i].r=math.random(255)
                particle[i].g=math.random(255)
                particle[i].b=math.random(255)
                particle[i].life = 255
                particle[i].speed=math.random(3,5)
                particle[i].fade_speed=math.random(15,50)
                particle[i].x = 240
                particle[i].y = 136
                particle[i].angle=math.random(360)
           end
    
           particle[i].life = particle[i].life - particle[i].fade_speed
    
           screen:fillRect(particle[i].x,particle[i].y,2,2,particle[i].color)
       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


  5. #5465
    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

    Just tested it, the particles still don't fade, But they do disappear at different times/places, however most of them disappear before the last usual point, (over all, the entire particle smoke/explosion is smaller)...I'm going to try to rig up some screen shotter so you can at least take a look.

    EDIT:, ok, I got a Screen..

    Probably doesn't help as much as actuelly watching it, but I hope it helps
    Geändert von BlackShark (01-31-2007 um 01:58 AM Uhr)
    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. #5466
    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

    nice SG57.

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

    Thats it :)
    hey eyece, do you mind if I ask how you got that?
    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.

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

    I take a look at it when I get some time tonight but you looking for these type of particle effects?

    http://www.youtube.com/watch?v=gh5RzfDU_ew

    The reason for the ring like explosion at the beginning is because of this line

    Code:
    fade_speed=40,  -- fading speed of particle
    This should be random between 15 and 50.

  9. #5469
    QJ Gamer Silver
    Points: 7.371, Level: 57
    Level completed: 11%, Points required for next Level: 179
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    貴方
    Beiträge
    1.159
    Points
    7.371
    Level
    57
    Downloads
    0
    Uploads
    0

    Standard

    my ai isnt moving...
    Zitat Zitat von ai code
    math.randomseed(os.time() )

    Player = { x = 205, y = 120, img = earth}

    ufo1 = { x = 0, y = 120, img = ufo }

    function chasePlayer()
    stallchase = math.random(2)
    if stallchase == 1 then
    if ufo1.x > 205 then
    ufo1.x = ufo1.x - 2
    elseif ufo1.x < ufo1.x then
    ufo1.x = ufo1.x + 2
    end
    end
    stallchase = math.random(2)
    if stallchase == 1 then
    if ufo1.y > ufo1.y then
    ufo1.y = ufo1.y - 2
    elseif ufo1.y < 120 then
    ufo1.y = ufo1.y + 2
    end
    end
    end
    thank you for ur help

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

    Thats it
    hey eyece, do you mind if I ask how you got that?
    I put a screen:save() after screen.flip() and put all the frames into a gif.

    @head shot, how is "elseif ufo1.x < ufo1.x then" meant to work?, don't you mean player x?.
    Geändert von eyece (01-31-2007 um 01:17 PM Uhr)

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

    mm, i don't think your using that math random right...

    Code:
    math.randomseed(os.time() )
    
    Player = { x = 205, y = 120, img = earth}
    
    ufo1 = { x = 0, y = 120, img = ufo }
    
    function chasePlayer()
    
    if math.random(1,2) == 1 then
    if ufo1.x > 205 then
    ufo1.x = ufo1.x - 2
    elseif ufo1.x < ufo1.x then
    ufo1.x = ufo1.x + 2
    end
    if ufo1.y > ufo1.y then
    ufo1.y = ufo1.y - 2
    elseif ufo1.y < 120 then
    ufo1.y = ufo1.y + 2 end
    end
    end
    end
    Give that a try, not sure if it works, but its worth a try, ( I eliminated the stall variable itself cuz you didn't really need it in that code, but you can always add it in again if you'd like. What I did with the math.random is ever loop it will come up with, either a 1 or a 2, if it comes up as a 1, your if statements will come into play, Hope this helps
    -= Double Post =-
    Zitat Zitat von eyece
    I put a screen:save() after screen.flip() and put all the frames into a gif.
    ahh, cool, how did you get it to save as different names?
    Geändert von BlackShark (01-31-2007 um 01:08 PM Uhr) Grund: Automerged Doublepost
    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.

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

    ahh, cool, how did you get it to save as different names?
    i put
    Code:
    imgc = 0
    above the while loop and
    Code:
    if Controls.read():start() then break end
       screen:save("screen"..imgc..".png")
       imgc = imgc + 1
    below the flip.

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

    ah, i see, cool, Thanks :)
    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.

  14. #5474
    QJ Gamer Silver
    Points: 7.371, Level: 57
    Level completed: 11%, Points required for next Level: 179
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    貴方
    Beiträge
    1.159
    Points
    7.371
    Level
    57
    Downloads
    0
    Uploads
    0

    Standard

    still not moving...

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

    In your main loop add

    chasePlayer()

    This calls the chase player function

  16. #5476
    QJ Gamer Silver
    Points: 7.371, Level: 57
    Level completed: 11%, Points required for next Level: 179
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    貴方
    Beiträge
    1.159
    Points
    7.371
    Level
    57
    Downloads
    0
    Uploads
    0

    Standard

    i know that
    obviously i have that in my main loop

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

    Then post your whole code, It will really help.

  18. #5478
    QJ Gamer Silver
    Points: 7.371, Level: 57
    Level completed: 11%, Points required for next Level: 179
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    貴方
    Beiträge
    1.159
    Points
    7.371
    Level
    57
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von game.lua
    --game
    --by HeaD_ShOt
    System.usbDiskModeActivat e()

    bg = Image.load("space.png")
    Bullet = Image.load("bullet.png")
    ufo = Image.load("ufo.png")
    s1 = Image.load("satelite1.png ")
    s2 = Image.load("satelite2.png ")
    s3 = Image.load("satelite3.png ")
    s4 = Image.load("satelite4.png ")
    earth = Image.load("earth.png")
    dofile("ai.lua")
    dofile("bullet.lua")

    function collisionCheck()
    if ufo1.x == 190 then
    Player.x = 205
    Player.y = 120
    ufo1.x = 0
    ufo1.y = 120
    player.health = player.health - 10
    end
    end

    black = Color.new(0,0,0)
    green = Color.new(0,255,0)
    white = Color.new(255,255,255)
    red = Color.new(255,0,0)

    healthbar = {}
    healthbar.y = 10

    player = {}
    player.health = 100

    current = 1
    oldpad = Controls.read()
    while true do
    pad = Controls.read()
    screen:clear()

    screen:blit(0,0,bg)
    screen:fillRect(10,10,100 ,10,white)
    screen:fillRect(10,10,pla yer.health,healthbar.y,re d)
    screenrint(10,30,player.health, white)
    chasePlayer()
    screen:blit(ufo1.x,ufo1.y ,ufo1.img)
    screen:blit(205,100,earth )

    if pad:start() then
    break
    end
    if pad:left() then
    current = 1
    end
    if pad:right() then
    current = 2
    end
    if pad:up() then
    current = 3
    end
    if pad:down() then
    current = 4
    end
    if pad:circle() and player.health < 100 then
    player.health = player.health + 0.5
    end

    if pad:square() and player.health > 0 then
    player.health = player.health - 0.5 end

    collisionCheck()

    if current == 1 then
    screen:blit(180,128,s1)
    end
    if current == 2 then
    screen:blit(285,128,s2)
    end
    if current == 3 then
    screen:blit(230,70,s3)
    end
    if current == 4 then
    screen:blit(230,180,s4)
    end

    if current == 1 then
    if pad:cross() and oldpad:cross() ~= pad:cross() then
    bulletSetup()
    end
    end

    chasePlayer()
    bulletFire()

    screen.waitVblankStart()
    screen.flip()
    oldpad = pad
    end
    Zitat Zitat von ai.lua
    math.randomseed(os.time() )

    Player = { x = 205, y = 120, img = earth}

    ufo1 = { x = 0, y = 120, img = ufo }

    function chasePlayer()
    if math.random(1,2) == 1 then
    if ufo1.x > 205 then
    ufo1.x = ufo1.x - 2
    elseif ufo1.x < ufo1.x then
    ufo1.x = ufo1.x + 2
    end
    end
    if ufo1.y > ufo1.y then
    ufo1.y = ufo1.y - 2
    elseif ufo1.y < 120 then
    ufo1.y = ufo1.y + 2 end
    end
    there it is

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

    Ok, Before i start seeing what your problem is, Why is your AI in another file? You dont need a dofile for that.

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

    yaustar - I know why the explosion is at the start, andsince people complemented it, i kept it in.

    Ill taek a look at that vid right now - and what im looking for is basiclly:
    Code:
    if particle[i].x == particle[j].x and particle[i].y == particle[j].y and i~=j then particle color.g += 3 else particle color.g -= 3 end
    The j would be a for loops incrementing variable, and would be right inside the first for loop.... That SHOULD make it turn more greenish, if 2 particles or more over lap... STill needs work i know.

    ...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. #5481
    QJ Gamer Silver
    Points: 7.371, Level: 57
    Level completed: 11%, Points required for next Level: 179
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    貴方
    Beiträge
    1.159
    Points
    7.371
    Level
    57
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von game.lua
    --game
    --by HeaD_ShOt
    System.usbDiskModeActivat e()

    bg = Image.load("space.png")
    Bullet = Image.load("bullet.png")
    ufo = Image.load("ufo.png")
    s1 = Image.load("satelite1.png ")
    s2 = Image.load("satelite2.png ")
    s3 = Image.load("satelite3.png ")
    s4 = Image.load("satelite4.png ")
    earth = Image.load("earth.png")
    dofile("bullet.lua")

    math.randomseed(os.time() )

    Player = { x = 205, y = 120, img = earth}

    ufo1 = { x = 0, y = 120, img = ufo }

    function chasePlayer()
    if math.random(1,2) == 1 then
    if ufo1.x > 205 then
    ufo1.x = ufo1.x - 2
    elseif ufo1.x < ufo1.x then
    ufo1.x = ufo1.x + 2
    end
    end
    if ufo1.y > ufo1.y then
    ufo1.y = ufo1.y - 2
    elseif ufo1.y < 120 then
    ufo1.y = ufo1.y + 2 end
    end

    function collisionCheck()
    if ufo1.x == 190 then
    Player.x = 205
    Player.y = 120
    ufo1.x = 0
    ufo1.y = 120
    player.health = player.health - 10
    end
    end

    black = Color.new(0,0,0)
    green = Color.new(0,255,0)
    white = Color.new(255,255,255)
    red = Color.new(255,0,0)

    healthbar = {}
    healthbar.y = 10

    player = {}
    player.health = 100

    current = 1
    oldpad = Controls.read()
    while true do
    pad = Controls.read()
    screen:clear()

    screen:blit(0,0,bg)
    screen:fillRect(10,10,100 ,10,white)
    screen:fillRect(10,10,pla yer.health,healthbar.y,re d)
    screenrint(10,30,player.health, white)
    chasePlayer()
    screen:blit(ufo1.x,ufo1.y ,ufo1.img)
    screen:blit(205,100,earth )

    if pad:start() then
    break
    end
    if pad:left() then
    current = 1
    end
    if pad:right() then
    current = 2
    end
    if pad:up() then
    current = 3
    end
    if pad:down() then
    current = 4
    end
    if pad:circle() and player.health < 100 then
    player.health = player.health + 0.5
    end

    if pad:square() and player.health > 0 then
    player.health = player.health - 0.5 end

    collisionCheck()

    if current == 1 then
    screen:blit(180,128,s1)
    end
    if current == 2 then
    screen:blit(285,128,s2)
    end
    if current == 3 then
    screen:blit(230,70,s3)
    end
    if current == 4 then
    screen:blit(230,180,s4)
    end

    if current == 1 then
    if pad:cross() and oldpad:cross() ~= pad:cross() then
    bulletSetup()
    end
    end

    chasePlayer()
    bulletFire()

    screen.waitVblankStart()
    screen.flip()
    oldpad = pad
    end
    there u go

  22. #5482
    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

    Wow... this is a sight to be hold ;) Lua Help Thread without an unanswered question :)

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


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

    quite beautiful isnt it SG?
    [CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]

  24. #5484
    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

    it's almost like a little community up in this thread

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

    Loading an image from memory, Is this a good idea? I know it involves more code but does it improve anything to your game? Or does it just take up memory?

    Code:
    jpegFile = io.open("anim0.jpg", "rb")
       data = jpegFile:read("*a")
    jpegFile:close()
    image = Image.loadFromMemory(data)

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

    ive seen this on wiki.ps2dev too... anyone can answer?

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

    This would be good, im guessing, if you wanted to reload an image. It should be muuuuch faster than loading from memory stick.

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


  28. #5488
    QJ Gamer Gold
    Points: 11.629, Level: 70
    Level completed: 95%, Points required for next Level: 21
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Beiträge
    1.633
    Points
    11.629
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    But when you set an image to nil it drops from memory.

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

    Why would you free than load an image? Im sure you can load an image into another one....
    Code:
    image = Image.load("blah.png")
    
    image = Image.load("blah2.png")
    
    while true do
         screen:blit(0,0,image)
         screen.waitVblankStart()
         screen.flip()
    end
    Im too lazy to test that out.

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


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

    faster maybe...but how many images would you need so that a noticable difference in speed occurs?
    -= Double Post =-
    Zitat Zitat von SG57
    Why would you free than load an image? Im sure you can load an image into another one....
    Code:
    image = Image.load("blah.png")
    
    image = Image.load("blah2.png")
    
    while true do
         screen:blit(0,0,image)
         screen.waitVblankStart()
         screen.flip()
    end
    Im too lazy to test that out.
    lol
    like that, its like you never loaded "blah.png" at all. but i'm sure you know that. :)
    Geändert von EminentJonFrost (02-01-2007 um 04:13 PM Uhr) Grund: Automerged Doublepost
    [CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]


 

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

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