What mad pursuit? What struggle to escape? What wild ecstasy?

Inspiration

Primarily, I wanted to improve my JavaScript and understanding of HTML5 canvas. As far as the game's aesthetics go, I studied Classics in college, I'm always looking for a way to mingle my two main passions. I've studied most of the ruins that function as levels, as well as a fair amount of the vase paintings, so needless to say, I got no small amount of pleasure from design.

How it works

Ancient Asteroids is built primarily through Javascript and HTML5 Canvas. It uses Jquery for click events, such as pausing, playing, moving and shooting. Levels are done through CSS and Jquery transition events and pausing is done through using Jquery to toggle a modal. Positioning is done through Canvas drawing and basic trig.

Challenges I ran into

Probably the most difficult part of the game was keeping track of its state (i.e. paused, playing, transitioning), where all objects are, and how to act accordingly. The Game class is mostly responsible for altering the game according to current data, e.g. when objects collide and how to react, how many asteroids to add per level, when and where to spawn them according to the ship's position or the game's state.

Accomplishments that I'm proud of

I was able to use canvas for (in my humble opinion) rather smooth controls. I was particularly proud that the ship rotates depending on velocity, as well as the asteroids. The flame was another nice touch. Really, just having a full functioning game that's in a constant state of motion felt great

Share this project:

Updates