Author Topic: hiding part of a merged object  (Read 7066 times)

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: hiding part of a merged object
« Reply #15 on: August 05, 2010, 11:34:43 pm »
just for comparision. same level with separate diamond objects. barely renders at 10fps

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: hiding part of a merged object
« Reply #16 on: August 06, 2010, 03:41:42 am »
btw, do dynamically compiled objects have any disadvantage compared to static objects ?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: hiding part of a merged object
« Reply #17 on: August 06, 2010, 08:23:46 am »
btw, do dynamically compiled objects have any disadvantage compared to static objects ?
In desktop jPCT: yes! They are a whole lot slower than static objects. In desktop jPCT, static objects are compiled to display lists using indexed geometry, dynamic ones to vertex arrays using non-indexed geometry by default.
In AE, it depends...! Static objects are compiled to either vertex arrays or VBOs (depending on the setting in Config) using non-indexed geometry, dynamic objects are compiled to vertex arrays using indexed geometry. The behaviour of AE is solely based on the performance characteristics of my phone (and the emulator), i.e. non-indexed geometry is prefered over indexed for static objects, because it's faster (should actually be the other way round like on the desktop, but it's not...). Dynamic objects use indexed geometry, because it decreases update time more than it hurts render time. VBOs are not used for dynamic objects, because it simply doesn't work in my phone that way. However, the difference between vertex arrays and VBOs as well as between indexed and non-indexed geometry on Android is pretty small. VBOs do speed up rendering on modern phones (like N1 or Galaxy S) by around 5-15%...nothing to get crazy about. It doesn't do anything for last generation chipsets like mine.

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: hiding part of a merged object
« Reply #18 on: August 07, 2010, 02:23:17 am »
i went one step forward and merged moveable tiles into one. moving is not done always but once started it's performed every frame for a while. i do movement by translating vertices via VertexController. even that performed much better than many single objects with lazy transformations.

overhead of many objects really kills this interpreted jvm. maybe JIT balances it. (right, i didn't upgraded to 2.2 yet, despite it asks me every one hour or so :o)