---
layout: post
title: "Bringing Battle City Back"
modified:
categories: posts
excerpt:
tags: [game, javascript]
image:
feature:
date: 2016-04-30T15:59:02-07:00
---

# I rarely finish my side projects
I started developing a fully web-based, HTML5 and Javascript game in 2011. At
that time, I fantasized about making it a multi-player game via WebRTC. I wanted
to make it a massively fun and competitive game. It was gonna a be a blast! The
project went strongly for 2 weeks and then I left it there rotting for 5 years!
What happened? Time just flies.

Today, I wanted to revive the project. It was so much fun developing the game, I
even created my own Javascript engine for the game. I called it *B*.  You can
try the game here
[http://thaibui.github.io/battle-city/](http://thaibui.github.io/battle-city/)
and the source code is published [here](https://github.com/thaibui/battle-city).

The reality is that I couldn't finish the game. So I should just accept that
fact and embrace it. Publishing the game and letting people play will hopefully
make my work a bit more useful than letting it rot on my computer. 

## About the game

The game concept is very simple. I am trying my best to bring back all the
previous components of the old Battle City game on NES. I did the graphics; I
edited the tank pixel by pixel based on a reference image I found on the internet.
The bullet and the bricks are also a recreation from some of the reference images
I found. They look better than the originals, I think.

## About the engine

I created the game from scratch. I use only what available in Javascript and
HTML5 because I wanted it to run on multiple platforms. I was too ambitious and
it's probably why the game was not finished. But it is playable, though.

I was also reading the book [High Performance
JavaScript](http://shop.oreilly.com/product/9780596802806.do) at that time. I
applied most of the knowledge I've learned from that book to make the game run as
fast as possible. 

Add new post. Battle city
Add new post. Battle city
