Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Gideros Update 2015.05.09 - Page 2 — Gideros Forum

Gideros Update 2015.05.09

2

Comments

  • hgy29hgy29 Maintainer
    @freessp, This is a very good question and to be true I'd like to get other users their opinion about stability and the 'fit for market' status of latests releases (I am not talking about slowness or known bugs). I'd say that as long as you, as a developper, is happy with newest versions behavior (be sure to check on real devices), then you can definitely go ahead with those versions.
  • freesspfreessp Member
    Thanks @hgy29. So far, I only test with the desktop player and the android player that comes packaged with Gideros, but I plan on doing a "real" test as soon as possible.
  • keszeghkeszegh Member
    edited May 2015
    2015.05.09 version vs 2015.03.22 version speed comparison on tegra2.

    @hgy29, i made a test case, its 2x difference (10fps on the new player and 22 fps on 03.22 version).
    (for further tests with textured mesh and sprite, see the next post)

    this should be in main.lua, that's all.
    function cardColorMesh(sizeX,sizeY,rgb)    
      local card=Sprite.new()
      card.sizeX=sizeX
      card.sizeY=sizeY
      card.currentAngle=0
      card.mesh=Mesh.new()
      card:addChild(card.mesh)
      local mesh=card.mesh
      mesh:setVertices(1,-sizeX/2,-sizeY/2,2,sizeX/2,-sizeY/2,3,sizeX/2,sizeY/2,4,-sizeX/2,sizeY/2)
      mesh:setIndices{1,1,2,2,3,3}
      mesh:setIndices{4,1,5,3,6,4}
      mesh:setColorTransform(rgb[1]/256,rgb[2]/256,rgb[3]/256,1)
      return card
    end
     
    k=100
     
    width=512
    height=512
    cardArray={}
     
    for i=1,k do  
      cardArray[i]=cardColorMesh(width,height,{10,150,20})
      stage:addChild(cardArray[i])
    end
     
     
    local frame = 0
    local timer = os.timer()
    local function displayFps()
    	frame = frame + 1
    	if frame == 60 then
    		local currentTimer = os.timer()    
    		local fps=math.ceil(60 / (currentTimer - timer))
        local memory=math.floor(collectgarbage("count"))
        print(fps.." "..memory)
    		frame = 0
    		timer = currentTimer	
     
    	end    
    end
     
    stage:addEventListener(Event.ENTER_FRAME, displayFps)
  • keszeghkeszegh Member
    edited May 2015
    if texture.png is a 512x512 png, then
    changing the line mesh:setColorTransform(rgb[1]/256,rgb[2]/256,rgb[3]/256,1) to:
    texture=Texture.new("texture.png",true)
    mesh:setTexture(texture)
    mesh:setTextureCoordinates{1, 0, 0, 2, texture:getWidth(), 0, 3, texture:getWidth(), texture:getHeight(),4,0,texture:getHeight()}
    gives 30fps vs 10 fps even bigger 3x difference.

    and finally, changing the line cardArray[i]=cardColorMesh(width,height,{10,150,20}) to:
    texture=Texture.new("texture.png",true)
    cardArray[i]=Bitmap.new(texture)
    has again a 2x difference (6fps vs 3fps) and also in the new version the bitmap is flickering.


    btw it does not matter if we put at the beginning the line texture=Texture.new("texture.png",true) and so only make one texture, the fps' remain the same.
  • keszeghkeszegh Member
    edited May 2015
    another test

    i tried the same things on my xperia e4g (with different k) and there surprisingly in the textured versions there is not much difference but in the colored meshes there still is:

    2015.05.09 version vs 2015.03.22 version:
    18vs48 colored mesh
    18vs20 textured mesh
    5vs6 textured bitmap


  • hgy29hgy29 Maintainer
    @keszegh, thanks a lot for the tests and for the sample, this is very helpful. I'll have a deeper look at code involved in those samples.
  • keszeghkeszegh Member
    @hgy29, hopefully you will get to the bottom of the problem. thanks
  • hgy29hgy29 Maintainer
    @keszegh, I've been able to perform some tests along your code on my iPad, and I indeed have some pointers about what to improve: it looks like the pixel shader program is the root cause of the slowdown. I tried to make a single shader for all cases, and it was probably a poor idea for performances. Dedicated shaders for each case (i.e color only, texture only, texture tainting, 2D only), are more efficient though harder to maintain... I'll have some thnking about it and try to come with something both elegant and efficient.
  • keszeghkeszegh Member
    @hgy29, sounds good. i need fast performance for colored (and also for textured) meshes as that's the basis of my drawing/animating app, where i draw zillions of them. until now this was pretty fast even on slower android machines.
    you could also expose the shaders longterm to gideros users while providing some predone shaders to be used in the above cases you mention.
  • totebototebo Member
    In my game I had a background rectangle shape and lots of shapes in a different sprite above it. This was very slow.

    When I removed the background rectangle and replaced it with application:setBackgroundColor() the slowdown disappeared. Confused!

    Dislikes: Dafb

    My Gideros games: www.totebo.com
    +1 -1 (+0 / -1 )Share on Facebook
  • keszeghkeszegh Member
    @totebo, at least until v2015.03.22 meshes were considerably faster than shapes (and sprites), at least when you had many of them, so you can try them if your shapes are not too complicated and you don't need the shape border color feature.

    Likes: totebo

    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    @keszegh, did some tests on desktop player regarding shaders without luck so far. Now I just borrowed a Xperia Z3 from my wife, hopefully I will be able to reproduce your figures and find a solution.. Keeping you posted!
  • KellogKellog Member
    When I export [using Mac Gideros] to Mac Desktop and start the .app I get the error "module 'bit' not found: no field package.preload['bit']"

    I've tried adding bitop.dylib into myprogram.app/Contents/Plugins but that doesn't solve the problem.

    (It all works ok using the Mac Player)

    Any ideas? Thanks.
  • ar2rsawseenar2rsawseen Maintainer
    @Kellog currently you need to add Plugins into Plugins folder that is relative to your exported app the same way it is relative to the player, basically on the same level outside .app

    will be fixed in future though
  • hgy29hgy29 Maintainer
    @keszegh, A little update on the slowdown issue:
    - on the Xperia Z3 I had, latest gideros performance was 50% better
    - on my iPhone6, latest gideros was 30% worst
    - arturs have an android phone having the same slowness issue too

    I did some work with my iphone, and my last gideros version is now 50% faster than the old gideros. We still need to check that those changes work on every platform...
  • keszeghkeszegh Member
    @hgy29, if you send me only a new giderosplayer.apk, that should be enough to test it quickly.

    Likes: SinisterSoft

    +1 -1 (+1 / -0 )Share on Facebook
  • keszeghkeszegh Member
    hgy29 made some changes after testing my testapp and now the testapps and also my real apps are as fast as before with his newest fixes, which will be in the next release probably. good work.
    (you should make 'public' the setclip method also, if it seems to be working)

    Likes: SinisterSoft

    +1 -1 (+1 / -0 )Share on Facebook
  • @hgy29 @keszegh That is great to hear. I am curious if my project will behave similar. Soon it is released, I will let you know.
  • KellogKellog Member
    @Kellog currently you need to add Plugins into Plugins folder that is relative to your exported app the same way it is relative to the player, basically on the same level outside .app

    will be fixed in future though
    @ar2rsawseen Thanks, I've not managed to find the right place for plugins on the Mac, but ok for Windows Desktop. Will be trying WinRT in a day or so.

    @marcelojunior I've been testing the Windows Desktop export, been working great so far with my app, well impressed.

    Scaling doesn't seem to be supported at the moment, will that be added?

  • keszeghkeszegh Member
    @hgy29, i noticed that @ar2rsawseen's Transform.lua stopped working, then i tried to use directly matrices and it does not work neither. Sprite:setMatrix() function stopped working. i think you may be responsible for that : ) and more importantly you may be able to repair this. i changed it to setRotation in my code as i just rotated anyway, but all in all matrix manipulation should remain possible.
  • hgy29hgy29 Maintainer
    @keszegh, true, I am certainly responsible for that and I thought I kept the compatibility. I will look into it.
  • icworxicworx Member
    I can't believe I completely missed the KickStarter campaign, the Gideros Command Reference sounds to be a handy book, will you sell it after it's out? Paper version preferred.
  • Oops, Sprites are placed in wrong position in this version. It still worked find recently
  • SinisterSoftSinisterSoft Maintainer
    edited May 2015
    @icworx I personally think that a paper version should be available - I've let John know of a way of printing via Amazon (so you buy via Amazon) that should be priced ok compared to other reference books.

    It depends if any of the kickstarters object to it being made available at this time?
    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
  • john26john26 Maintainer
    edited May 2015
    @icworx, Yes, we are planning to make paper copies of the Reference Manual available either through Amazon or Lulu probably at the end of the project in June. The PDF version will remain for Kickstarter donors only. By the way, I intend to release and updaed version of the reference manual (paper and PDF) at the end of the project to include all the new APIs we have added.
    +1 -1 (+2 / -0 )Share on Facebook
  • SinisterSoftSinisterSoft Maintainer
    +1 for Amazon (and also Lulu = choice and possibly greater availability).
    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
  • Hi,

    Is it possible to know the next release date ? i am also seeing the drastic slowdown in rendering of mesh on the player itself.

    -uk
  • ar2rsawseenar2rsawseen Maintainer
    @uncleking currently we are testing and resolving issues with @hgy29 redesigned drawing api, that should be as fast as previous Gideros version, once that done, there will be a release with that new drawing approach. Unfortunately currently no precise estimates, but hopefully it will be this weekend
    +1 -1 (+2 / -0 )Share on Facebook
Sign In or Register to comment.