Tag: Java
Huge Refactoring in Gaia Sky: ECS
Moving the old inheritance hierarchy to an entity component system
In these last few days I have merged a huge internal refactoring into Gaia Sky’s master branch. This refactoring has been cooking for several months and has adapted or completely replaced virtually every piece in the code base. Read on if you want to know more.
Performance Analysis of Java Loop Variants
What is the fastest loop variant? Does it even matter?
From time to time I profile Gaia Sky to find CPU hot-spots that are hopefully easy to iron out. To do so, I launch my profiler of choice and look at the CPU times for the top offender methods. Today I went through such a process and was surprised to find a forEach()
method of the Java streams API among the worst offenders. Was the forEach()
slowing things down or was it simply that what’s inside the loop took too long to process? I found conflicting and inconsistent reports in the interwebs, so I set on a quest to provide my own answers.
From Slick to Libgdx
A migration story
A couple of posts ago I mentioned I would write a few lines about my experience with the migration of my RTS engine from Slick to Libgdx and that’s what I’ll do in this post. I’ll be talking very lightly on some issues such as the code structure, the rendering process, the camera, etc. If you need a starting tutorial please refer to the official documentation, this is not what you are looking for. I’m just trying to give my impressions in the migration process I had to undertake. But first I want to back up a little and give a quick overview of both libraries.