Terminal Bullet Game

This project is more of an engine than a game. It’s made in C++ using only the default windows libraries. I wanted to challenge myself at the cost of multiplatform support.

弾幕Project.7z or GitHub

The screen is updated 60 frames per seconds but the whole screen isn’t drawn in this time, as I found that to be sluggishly slow. Instead the cursor jumps around efficiently to “pixels” that need to be replaced. The pixels refer to each letter space in the terminal window. The pixels are held by a “sprite” object, and each holds a rectangle of pixels defined by it’s height and width. Each pixel can independently have it’s own background color, symbol color, and symbol. Each of these can be set to transparent. Most game objects have a transparent background so that the actual background can shine through them for example. These sprites can display in layers on top of one another.

Each game object holds a sprite, as well as decimal coordinates. This means a sprite can be in between two pixels, but of course the engine can’t show this graphically. The purpose is to allow smooth, multi degree movement across the display. However to avoid confusion to the actual player, all collision is calculated on what the user sees, not the actual location of the sprites decimal coordinates. Some basic trigonometry math was used to allow circular and angular motion for the bullets. Together with the ability for there to be hundreds of sprites on screen at once, the end result has the potential to look much more beautiful than what you would expect from a terminal window.


The purpose of the game is for the player to dodge bullets for as long as possible. The score and name of the player is saved on a file, and replaced if the player gets a high score and enters their name. When the player gets hit the engine drops red backgrounds to make the screen look “bloody”. With too much damage the engine starts replacing the sprites themselves with garbage. This is not intended to make the game hard, but unplayable, dooming the player to a certain death.

Animated Screenshots (click)

Leave a Reply

Your email address will not be published. Required fields are marked *