Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Graphics/texture memory - and shapes — Gideros Forum

Graphics/texture memory - and shapes

StoffeStoffe Member
edited November 2011 in General questions
How many textures, of what size can be expected to be used on a modern device using Gideros? Give or take, of course, and of course we have small and large textures etc. Also, is there a max size such as 2048x2048?

For instance, my levels are not looking to be (easily) tileable, but on the other hand not going to be super huge either, but maybe I need to split it into big squares and load/unload as I scroll around? If I would do that, do I need to manage the actual bitmaps objects, or is the system smart enough to manage off-screen objects by itself? 

Also, is drawing/filling/texturing shapes cheap or expensive, both in CPU/Memory and do they affect texture memory?

I'm not hitting any apparent limits here, yet, just curious if there seems to be one way to go better than another.

Very fuzzy questions I know, but some tips on best practices for effective graphics would be very nice. :)

Dislikes: TheOddLinguist

Tagged:
+1 -1 (+0 / -1 )Share on Facebook

Comments

  • atilimatilim Maintainer
    edited November 2011
    Hi,

    Older iPhones and iPods have 1024x1024 and newer iPhones, iPods and iPads have 2048x2048 texture size limit. But on Android, there isn't a specific limit/capability of texture size. (I think you shouldn't use textures bigger than 1024x1024 on Android).

    Fill rate is really low on mobile devices. For example if you draw 3-4 screen sized textured rectangles on iPad 1 (with bare OpenGL, cocos2d, or any other framework), frame rate starts to drop from 60.

    Currently, Gideros draws everything that's added to the stage even if your objects are outside of the screen. Therefore, it's better to divide your levels and addChild/removeChild your parts while moving around. Right now we're optimizing our graphics engine and we will eliminate all drawings outside the screen with the next version.

    greetings :)

  • Following up, do you already know some best practices for this, say recommended tile size and how to create the tiles? I'm creating my levels in Inkscape to get freeform paths and export them via a small java program to create the collisions (and currently I also draw paths instead of using images), I can also export the drawn level as a PNG for instance. I may clean this tool up for others if there is interest by the way, it's a great way to design something quickly.

    Also, it would probably be quite useful to be able to get some debug statistics from the player, if possible, such as texture memory used/available, FPS and some things like that. Is that possible?

    Thanks again!

    Likes: atilim

    +1 -1 (+1 / -0 )Share on Facebook
  • Following up, do you already know some best practices for this, say recommended tile size and how to create the tiles? I'm creating my levels in Inkscape to get freeform paths and export them via a small java program to create the collisions (and currently I also draw paths instead of using images), I can also export the drawn level as a PNG for instance. I may clean this tool up for others if there is interest by the way, it's a great way to design something quickly.

    Also, it would probably be quite useful to be able to get some debug statistics from the player, if possible, such as texture memory used/available, FPS and some things like that. Is that possible?

    Thanks again!

    Sounds like an interesting tool.

    Mike

    What would you do for your other half?

    http://www.sharksoupstudios.com
  • atilimatilim Maintainer
    Also I'm really interested about this tool :)

    For showing FPS, you can use a code like this:
    local frameCount = 0
    local currentTimer = os.timer()
     
    local function onEnterFrame()
    	frameCount = frameCount + 1
     
    	if frameCount == 60 then
    		local timer = os.timer()
    		local deltaTime = timer - currentTimer
    		currentTimer = timer
     
    		print("fps:", 60 / deltaTime)
     
    		frameCount = 0
    	end
    end
     
    stage:addEventListener(Event.ENTER_FRAME, onEnterFrame)
    For texture memory, we're already writing some debug info. You can see it on Android by using logcat and for iOS by using XCode's console.

    Also we're planning to provide a realtime statistics window integrated into Gideros Studio to see what's going on in realtime (memory usage, script/graphics profiling, etc.)

    Likes: Stoffe

    +1 -1 (+1 / -0 )Share on Facebook
  • @atilim

    "Also we're planning to provide a realtime statistics window integrated into Gideros Studio to see what's going on in realtime (memory usage, script/graphics profiling, etc.)"

    Is this in there now?
  • ar2rsawseenar2rsawseen Maintainer
    edited July 2013
    We are in process of separating IDE and opensourcing it, then after that it will be easier to extend, and this kind of additions may appear after open sourcing :)

    Likes: plamen

    +1 -1 (+1 / -0 )Share on Facebook
Sign In or Register to comment.