Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Thanks for the write-up. Always cool to see how different people solve these kind of problems.

I don't know much about cocos2d but since the dots are purely visual, do they need to be game objects? Couldn't you keep their transform in a separate data structure which you can update independently and pass to a shader (or similar) for rendering? I'm thinking something similar to how particles in VFX are usually done.



Thanks for the comment. It is indeed something I've been considering. In fact, lots of the optimization done here is to move the logic away from the game objects , which should enable the flow you've described.

I ended up not doing it in this iteration because:

- cocos2d's custom shader support is kind of poor, especially documentation is pretty much zero

- the dot is not "purely" visual. For example you can trace and highlight a resource's movement. This is not a blocker per se, but requires more work




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: