Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Loading images is blocking? — Gideros Forum

Loading images is blocking?

edited August 2013 in General questions
Hello!

I wrote this adventure game of sorts a while ago using Corona SDK: https://play.google.com/store/apps/details?id=com.kidoteca.nonoamazonia.beta

One of its issues is that loading is ungodly slow, and on some devices it is very crashy (because of weird memory behavior).

I thinking about using Gideros instead (mostly because of native code access and offline build, Corona stance on only allowing offline builds by people that pay 1000 USD is clearly a policy of having profits as priority instead attending to costumer needs, this also reflects on other stuff, but is off-topic).

On Corona SDK loading images is blocking, it freezes the entire app when a image is loading, also there is no way to create sprites composed of several images (in case you want to load several smaller images of a bigger object, to make the loading more smooth).

Gideros has the same behavior?
I make games for children: http://www.kidoteca.com

Comments

  • hgvyas123hgvyas123 Guru
    edited August 2013
    -->On Corona SDK loading images is blocking, it freezes the entire app when a image is loading

    ------> yes and i think loading image in the background is not a good way for the games in app you can show dummy image for any user untill app gets it from server but for game no not a good way so this behaviour is totally fine.

    alternatively if you game requires much graphics you can load them as 16 bit it will take half memory then original much good option.

    -->there is no way to create sprites composed of several images

    ------->i think you are talking about spritesheet in Gideros and corona in both it is possible but in gideros you can create sprite from the sheet with one line of code while in corona it needs some more lines as they have particularly designed it for the purpose of animation and not to display single image.

    :)
  • SinisterSoftSinisterSoft Maintainer
    edited August 2013
    -->there is no way to create sprites composed of several images

    If you mean to then render those small sprites to make one big sprite that would then be used - you can do this using render to texture then use the texture.

    Else, if you want to keep them small but all linked together and moved via a single command then you can do this by adding the sprites as children to the main sprite.

    -->On Corona SDK loading images is blocking

    You really need a load routine that will start loading something like a table concurrently, then give you an event once the data has finished loading - so you can play whilst the next level is loading. This is a good idea and you should put it into the suggestions box.

    Alternatively, you could write a loader that did something whilst the level loaded - like a bonus screen inbetween levels, or a shop. On each frame 'event' you could load a little more, but not enough to slow the bonus screen. You have a whole 60th of a second to fir both in, which might not sound a lot, but in reality is a lot of time.

    If this is a mix of both points - you want to load a large image over a period of time whilst the game is playing - so you don't get a 'stutter'... then you could load a 2048x2048 texture, but in small chunks by splitting it into something like 128x128 images and load it and image at a time over each frame, re-assembling it by using render to texture back to the 2048x2048 texture image that you really want.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • I'd still say that is an overkill, and would probably load the image by making the user wait a bit with the loading screen and then use it as you normally would

    Likes: SinisterSoft

    +1 -1 (+1 / -0 )Share on Facebook
  • Overkill maybe, but it should work all the same and should be pretty easy for @speeder_kidoteca to code.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • render do texture! Interesting!

    @ar2rawseen


    It is not overkill, my game on some devices take 2 minutes to load, and it is a game for children below 6 years old, that we know are not very patient... I need a way to make loading times low as possible to make the children don't dump the game because the wait times.

    @SinisterSoft

    You understood exactly what I wanted, it is not good as I wanted, but it might work (I saw a loader for Marmalade for example, that loaded row-by-row of pixel of a image, to load it concurrently).
    I make games for children: http://www.kidoteca.com
Sign In or Register to comment.