Avoiding Direct Coding In JavaScript

So this may be met with ridicule from JS developers but I’m just starting out with Phaser 3 and have a simple example game working. Now it’s time to decide whether this is the right tool set for me. In short I’d prefer strong typing and clear runtime semantics. JS feels to me like I’m back writing Basic in 1975 - all those years of hard fought language improvements e.g. structure, scoping, strong typing, object orientation … now discarded or twisted. Sigh.

So perhaps there is a way to cross compile into JS? That could work. Is there a GWT tool chain for Phaser? Any other ideas floating around out there?

You may want to try TypeScript.

JavaScript is dynamically typed, but it’s not chaos. It has clear rules for scoping, objects, and inheritance.

2 Likes

This. Go with typescript.

Or Haxe if you want more powerful language and don’t care much for JS ecosystem.