Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: image limit in lua?

                  
   
  1. #1
    DCEmu Regular Anonymous D's Avatar
    Join Date
    Jul 2006
    Posts
    414
    Rep Power
    67

    Default image limit in lua?

    i have a game i have written in lua. i load images at the start of each script , i have one for the game, menu and scores screens. each one loads 7-8 images aprt from scores.

    my question is is there a limit to images loaded ? and if so is there a way to clear the memory, as i keep getting errors and the only possible reason seems to be im loading to many images in each script or $#@!ulativley over the 3 .

    edit:it works fine on the pc lua player but returns errors on the psp

  2. #2
    DCEmu Regular Nicko01's Avatar
    Join Date
    Jun 2006
    Location
    www.nicko01.com
    Age
    31
    Posts
    434
    Rep Power
    70

    Default

    yes, that would be why.
    i recommend learning C instead. It isn't very much harder, and it is easy to port lua to C.
    if you want to learn, go to www.psp-programming.com

  3. #3
    DCEmu Pro dangee's Avatar
    Join Date
    Feb 2007
    Posts
    531
    Rep Power
    66

    psp

    no real limit on no. of images in lua,but
    sounds like RAM overflow. At the end of
    each script, undefine any images no longer
    needed (eg level1Background = nil) and the
    garbage collector should free up memory for you
    automatically

    *EDIT* making images local to the script
    would have the same effect

  4. #4
    DCEmu Regular Anonymous D's Avatar
    Join Date
    Jul 2006
    Posts
    414
    Rep Power
    67

    Default

    thankjs dangee that worked a treat

  5. #5
    DCEmu Pro dangee's Avatar
    Join Date
    Feb 2007
    Posts
    531
    Rep Power
    66

    Default

    pleasure, btw theres loads of good lua stuff at evilmana

  6. #6
    DCEmu Regular Anonymous D's Avatar
    Join Date
    Jul 2006
    Posts
    414
    Rep Power
    67

    Default

    lol im actually using that site anyway. one more question. i have a lua game id like to release here how do i do that? its not a standalone, just a folder to go in apps and works with lua player 0.16 best, o.20 returns a lot of random errors for no reason.

  7. #7
    DCEmu Coder Safari Al's Avatar
    Join Date
    Mar 2007
    Location
    http://homebrewheaven.net
    Posts
    863
    Rep Power
    0

    Default

    Just release it in the develoment forum
    Come Visit Homebrew Heaven, Where you'll find the latest gaming news and downloads!

    View My Coding Blog


    The Return of The Lounge!
    Mario Gold Rush
    Current C++ Project: To be Announced soon on Homebrew Heaven

    Currently Coding in: C++ for the PSP

  8. #8
    PSP Coder -Xandu-'s Avatar
    Join Date
    Jan 2007
    Posts
    1,036
    Rep Power
    79

    Default

    You can post it in the Submit News forum.

    If you're talking about how to boot it without having to play it from Lowser, here's how:
    1- Open up the System\system.lua
    2- Replace
    System.currentDirectory("Applications")
    appsDir = System.currentDirectory()

    System.currentDirectory("Lowser")
    dofile("index.lua")
    with
    dofile("script.lua") <---- Your index script file.
    It should autoplay without having to play it from Lowser .

  9. #9
    DCEmu Regular Anonymous D's Avatar
    Join Date
    Jul 2006
    Posts
    414
    Rep Power
    67

    Default

    thanks -Xandu- will do that

  10. #10

    Default

    When doing that you can get rid of the "Lowser" folder.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •