And now let me show you how to build the same game but using Haxe this time. Particularly a library called OpenFl, which recreates the Flash ActionScript3 api, in the same way that say, StageXL does it for Dart. Historically speaking, there is a string correlation between Flash and Haxe, but Haxe grew to be its own thing and far more powerful in terms of features, than Flash is or will ever be.
Finally the last bit of logic to the game: collision. We need to check collision between enemy bombs and the player and trucks, between the player and the enemies and trucks, and between the player’s bullet and the enemies.
Now it’s time to add multiple instances of GameTile and see what happens! Luckily nothing will break. We just need to distribute them when we first instantiate the GameTiles and then scroll the freakin things.