Chapter III in the series  of tutorials on how to build a game from scratch with TypeScript and native browser APIs

Welcome back, reader! This is the first part of Chapter III of the series of articles where we discuss how to build a simple turn-based game with TypeScript and native browser APIs.

Image for post

This is a demo of the gameplay we are looking to achieve

This chapter is all about drawing. Our game is played on a “board” or a “grid” of these gray squares. We have to visualize them, so the player knows where to place their “Ships”.

We will use the browser’s Canvas API to draw those gray squares. But it’s just one part of the equation. We must make these elements smart enough so the Player could interact with them. To do so, we will use the full power of the knowledge we acquired in the previous chapters: Entity Component System and Game Loop.

#typescript #game-development #javascript #algorithms #design-patterns

Building a game with TypeScript. Drawing Grid 1/5
1.35 GEEK