Multi-Resolution Game Development With GameBuilder Studio Check it out!
NEW Version 0.9.7 has arrived! New Blazing Fast Particle Engine & More Game Actions. Check it out
What is much graphics?
  • Hey Lavon,

    I was wondering in the tutorial "Importing SWF Vector assets into gameboilder studio" you say that SWF is good if you don't have much graphics to load well how much is to much=)?

    Kind regards

  • 1 Comment sorted by
  • @Isak it really depends on the final size of the draw assets and the amount of graphics memory on the device. GBs takes the vector swf data and draws it to a bitmap at the current scale and size of the renderer. When using multi-resolution scaling the asset is also scaled up first before drawing without loosing quality. So a swf renderer at size 200 x 200 on a 2x resolution device is actually 400 x 400 pixels of image data on the device. Here is a snippet from the Starling Wiki explaining the size of images in memory:

    Before we go on, it might be interesting to know how much memory is required by a texture, anyway.

    A PNG image stores 4 channels for every pixel: red, green, blue and alpha, each with 8 bit (that makes 256 values per channel). It's easy to calculate how much space a 512×512 pixel texture takes up:

    Memory footprint of a 512x512 RGBA texture:
    512 x 512 pixels x 4 bytes = 1,048,576 bytes = 1 MB

    When you've got a JPG image, it's similar; you just spare the alpha channel.

    Memory footprint of a 512x512 RGB texture:
    512 x 512 pixels x 3 bytes = 786,432 bytes = 768 kB

    Quite a lot for such a small texture, right? Beware that the built-in file compression of PNG and JPG does not help: the image has to be decompressed before stage3D can handle it. In other words: the file size does not matter; the memory consumption is always calculated by the above formula.

    Nevertheless: if your textures fit into graphics memory that way — go ahead and use them! Those formats are very easy to work with and will be fine in many situations, especially if your game is targeting desktop hardware.

    However, there might come a moment in the development of your game where your memory consumption is higher than what is available on the device (looking at you, iPad 1!). This is the right time to look at the ATF image format.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion