general vram question

This forum is currently in read-only mode.
  • if I add up the size on disk of every png file I use as a sprite, and I have no effects at all, no canvases, etc. just sprites, is that around how much vram I'll be using, or does it have to convert it at runtime to some other form that takes up more ram. Also, do effects eat up alot of vram? layers? I'm getting ready to move from the experimental phase to creating my first level. Some of the graphical elements will take alot of time to create. I'm planning on having smooth frame by frame animations, and high res textures. Before going through some of the trouble of creating these, I want to have at least a general idea of my limitations

  • AFAIK you should pad the size of each used image to the nearest power of two. I think Construct does that internally.

    Effects should use no VRAM. Canvas probably does though.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • All of the images are stored uncompressed in VRAM, so they'll end up being much larger than the PNG files.

  • The VRAM expression can tell you how much VRAM is being used. The next build will introduce features that allow you to choose which parts of the application are loaded in to VRAM and when, which will help reduce your usage a lot.

    As mentioned, images are fully decompressed (to alpha-red-green-blue format, 4 bytes per pixel) and placed on a texture a size of a power-of-two, eg. 512x512 for a 300x300 image.

    Large animations with lots of frames are an extremely inefficient way to use VRAM. You can end up using tens of megabytes from one object. A much faster and more conservative way is to use static images and move them about to create an animation. The end result is actually smoother than you can achieve with frame-by-frame animations, too. If you play with the bone movement, you should see the effects you can get with six unanimated sprites, which would use hardly any VRAM at all. The same goes for explosions and so on: importing a really high resolution explosion animation with loads of frames is a huge waste of memory. With a few fading, moving sprites, a couple of particle effects (which use basically nothing, if you use say a 32x32 particle texture), you can actually create a much more interesting explosion, and it'll use hardly any VRAM at all.

    If you're worried about VRAM, change your technique to one which doesn't revolve around basically loading entire video files on the GPU.

  • thanks for the info ashley. I may just have to find a more efficient way of doing things. I've got a really killer look going right now though, this is going to take some real innovation to reproduce. I really love construct...it's awesome.

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