Wednesday 10 August 2022

JS13k Warm Up 2022

 This years js13k will be a bit different for me - I am travelling for most of the 30 days and it seems unlikely I'll spend more than 15 hours on the project before I leave. However I've completed every year for 7 years and would like to do a simple respectable entry.


Last year I spend a significant portion of the time setting up infrastructure for my project which was required to play in three modes (player vs player local; player vs player online and player vs AI) and the UI interface to support these modes including a lobby where on line players can meet.


In order to avoid this overhead this year I decided to do a public prep framework with some basics required to support a two player turn based game. This new structure makes extensive use of async/await to make the game code very readable; it also support basic audio support; a menu system;js13k style sockets support for multi-player and some basic DOM manipulation code.

The 'game' in this example is a trivial game where each player takes a turn and the game ends after 5 turns.

A running installation can be found here  and the code is publicly available here.




No comments:

Post a Comment