News for hackers. Stuff that matters.

Ask HN: How to build flash game in 2022?

I have a few game ideas that I'd like to build and host on my website. Similar games to those found on Cool Math Games or Addicting Games. With Adobe Flash having been discontinued, I'm wondering

1) What software stack do recommend for developing a new game?

2) How do I prevent cheating?

( 5 comments | 3 points | on HN )
Re:Ask HN: How to build flash game in 2022? by Leftium on Saturday February 05, 2022 @09:53PM (#30228857)
HTML5+JS is the best stack for games that will work in the browser without installing any additional software. PixiJS and Phaser seem to be two great libraries. However, it is nontrivial to cheat in JS games. And I'm not aware of any game dev-specific IDE for HTML5 games; the development will be more "manual."

Unity requires installing a browser plugin before your game can be played. However the games might get more access to the computer's resources. Also it will be harder to cheat in a Unity-based game. Unity comes with an IDE that is geared towards game dev. And it should be easier to port your game to other platforms like iOS, Android, Switch, etc.

Links to these libraries and examples built with them:

- https://pixijs.com/

- https://pixijs.com/gallery/

- https://phaser.io/

- https://phaser.io/news/category/game

- https://unity.com/

Re:Ask HN: How to build flash game in 2022? by 8toast on Saturday February 05, 2022 @11:25PM (#30229412)
Code editor for HTML5 games: https://ctjs.rocks/ https://godotengine.org/
Re:Ask HN: How to build flash game in 2022? by armchairhacker on Saturday February 05, 2022 @09:55PM (#30228876)
honestly as long as the logic graphics aren’t particularly complex you’ll probably be best using TypeScript. Just make a small site in something like vite.

See https://github.com/collections/javascript-game-engines for a list of game engines. ive used pixi.js and it’s a very good graphics library although it doesn’t have other “game-engine” features like physics (you could use matter.js which is a standalone physics library). Others recommend phaser which is a real game engine although it looks kind of dated.

For accounts, multiplayer, iap, etc. you’ll need a server. This can also be done in TypeScript or choose any other server framework. There are JavaScript libraries like Koa for web-socket communication.

Re:Ask HN: How to build flash game in 2022? by austincheney on Saturday February 05, 2022 @09:44PM (#30228803)
Program in almost any popular language and compile to WASM. WASM is the new Flash.
Re:Ask HN: How to build flash game in 2022? by tomcam on Sunday February 06, 2022 @05:07AM (#30231041)
1. https://haxe.org/

2. Always know it’s an arms race