StarEngine 2D Javascript

The more I work and build projects, the more StarEngine makes sense for a lot of products. I never thought I could apply that engine to other projects than a gaming one, but as it turns out, it can be applied to a lot more. I know I’m not giving out much right now but it will all makes sense pretty soon hopefully.

While I am building a complex world editor for the gaming engine, I also need a smaller and easier one for quicker projects that don’t require every option the game editor does, so I have translated the 2D engine to Javascript. The performances as expected are greatly impacted (remind me again while we dumped Flash in favor to Javascript in the browser, without implying Steve Jobs or Apple?) but still somewhat acceptable for the immediate purpose of editing smaller worlds.

The first editor was already a Javascript one in the browser but the performances were pretty bad and it made at that time the editing of the world very painful. The algorithm wasn’t as good and it was in the end just a quick put-it-together to be able to start working with a base file.

So here it is, a quick video of the Javascript version, that you can compare to the AS3 version if you fancy. Both demos work on a large set of time (180 000) and of course nothing outside the view is visible nor exists in memory at the DOM/HTML level. Note that this is the non hardware accelerated version since it doesn't use canvas for backward compatibility reasons. Another canvas version is in the making, unfortunatelly, my favorite canvas framework, KineticJS, is no longer maintained and I have yet to find back the documentation. It's such a shame because it was probably the best canvas lib out there. It's only a Javascript library so it's not too bad, close call.

What have we learnt today kids? Do not go to production with new open source frameworks, and try to keep it raw code as much as possible. Even older frameworks are at risk. Ask Angular.JS dudes who have to swallow the big pill of totally new and changed Angular 2 after such a steep learning curve, and no backward compatibility. I have learnt that lesson via Symphony framework a few years back and it is still relevant.

Update: Since it is too much of a risk to go for a now unmaintained library, KineticJS will be abandonned in favor to PixiJS which as it appears is very fast (hoping this one won't go down too soon). I hadn't checked out the new canvas rendering libraries in a while (they come and go), busy with projects and StarEngine, but this is very promissing. So in the upcoming days, I will build a quick port of StarEngine2D pure javascript to test PixiJS. I have also been very disappointed by Adobe's attitude towards AIR bugs and low support. Building ANE's is also painful since they really didn't put out a simple mechanism to do so. Also seing the efforts put towards Cordova/Phonegap, I am now examining the situation thoroughly and will decide at some point if I should stick to that platform. Don't get me wrong, Adobe AIR is solid for advanced renderings and game engines, where it falls short is support, native extensions and bugs for newer features.


* won't be displayed nor shared
CAPTCHA Image