Patches we would like to contribute back to Rokon community

1 view
Skip to first unread message

Yu Chao

unread,
Jan 22, 2010, 1:55:47 AM1/22/10
to rokon-...@googlegroups.com
Hi Rich and other Rokon maintainers,

We are a development team from Exoweband we're currently porting our iPhone game to the Android platform. We are very grateful for the Rokon game engine.  Ihas saved us a lot of time, so we'd like to contribute our bug fixes and performance improvements back to the community.

For your convenience to read and review, we've separated them to single patches.

The first one (custom_m...@trunk.diff) is the integration of a faster random() method. It's from http://www.javamex.com/tutorials/random_numbers/xorshift.shtml. Its time cost is 1/2 the time required by Math.random(). This patch also includes the optimization that if maxValue equals minValue,then there is no need to calculate the random value between them.

The second one (layer_adding_obj...@trunk.diff) is to fix the logic when adding objects toLayer.

The third one is a performance optimization for the particle system (emitter_performanc...@trunk.diff). Basically, we added a Particle pool for reusing Particle objects in order to reduce any choppiness from object deallocation.  We override updateVertexBuffer() in Particle.java to do nothing, since it's a very time consuming operation, while it seems it's ok if it does nothing here. Also we included some fixes derived from some tips from google.  In our game we're generating 60 particles per-second, and after applying this patch, our fps increased by 15+.


We hope that this can help you improve the Rokon engine, and we look forward to contributing a few other patches later.  Let us know if you'd like any information or clarifications, and keep up the good work!

Best Regards,
rokon_patches.zip

Richard Taylor

unread,
Jan 22, 2010, 4:24:44 AM1/22/10
to rokon-...@googlegroups.com
Hi


Thanks very much for all that, really appreciate it




Richard
Reply all
Reply to author
Forward
0 new messages