VRAM loading question.

This forum is currently in read-only mode.
  • I'm making a scrolling game, that uses painted backgrounds. I didn't want the vram to be really high, so I tried keeping all the objects in a storage frame, then creating the objects on the frame when I need them (so the whole level doesn't have to be in the vram) then deleting them when they're out of frame.

    At first, I thought I'd just have a couple of 1024x1024 BG sprites displayed at time, but when 1024x1024 textures are loaded into the frame there is a stutter/pause when it is loaded into vram. When I halved the textures to 512 x 512, I don't notice any stutter. However, I'm a bit worried that it might stutter on other computers, perhaps if I reduce the the size to 256 it might safer?

    Is it best not to use this method of loading into VRAM, and just stick to the normal "load entire frame" at start up (it'll probably be around 90mb vram)? Or is it okay to do this?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • When you create objects, the computer has to send the textures to the graphics card. That's not as quick a process as you think it might be. That pause is the amount of time it takes to get the texture to the graphics card, because the card has to wait for the texture to be able to draw the next frame.

    If you split up the textures into 256x256 squares, but still load them all in the same tick, you'll probably still have the same problem because you'll still be loading as much texture information in the same tick. You might be able to get around it by distributing the loading across multiple frames by only loading one 256 square texture each tick.

  • Yeah I can easily load them at separate times, that shouldn't be a problem. I guess it should be smooth loading 256x256 sprites.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)