Code Monkey home page Code Monkey logo

christianoellers / vector-storm Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 1.0 728 KB

Abstract arcade style 2D space shooter, developed with JavaScript and Canvas. Architectural and creative experiment. Fully working game with enemies and scoring!

Home Page: vector-storm.vercel.app

License: MIT License

HTML 2.77% JavaScript 3.56% TypeScript 89.25% SCSS 4.42%
canvas canvas-2d game-development game javascript html5 game-engine vector vector-math canvas-api

vector-storm's Introduction

Vector-Storm

Vector Storm

2D Arcade space shooter



Quality Gate status



About

Classic arcade style space shooter with Canvas 2D, ES6 and HTML 5.

A 'Proof of concept' and technical experiment about game architecture and maths. Over time the code got a bit messy and it's not intended to sustain ;)

Compatibility

  • Browser with Canvas 2D API support
  • Desktop PC with min. 700px screen width
  • Decent computing/ graphics power (can be resource intense)
  • Mouse, keyboard, audio output



Examples

Find the live version to play here:



Features

  • Fully playable game with win/lose conditions
  • Automatically shoot at stuff (just avoid being hit)
  • Bounce into enemy ships rewards with extra score
  • Extra speed boost + Fx



Limitations

  • Tested with Google Chrome, Desktop only

  • Requires keyboard + Mouse to play

  • Restart requires page reload

  • Playing for longer durations might slow down the game. Projectiles are currently not removed from the scene and will drain performance over time.



How to use

  1. Open the 'index.html' in a browser like Google Chrome on any Desktop browser.
  2. Read instructions how to play & enjoy!



Todo

Fix

  • Collision: Vector maths sometimes creates extreme values

Optimize

  • Debounce hit testing to prevent fast accumulating scores
  • Remove 'dead objects from scene (projectiles) OR implement an 'object pool'
  • OOP
    • Decouple state, view, controls, score ...
    • Decouple constructors from initialization?

Performance

  • HUD + Score should be rendered in HTML, not Canvas
  • Use faster sin/cos calculations; e.g. lookup tables or polynomial approximation curves

New features

  • Player should bounce off the boundaries (or slow down) and not be able to leave the field
  • Reacting to score, player could get different weapons or conditional states over time
  • Implement 'scene' concept to manage all objects (e.g. pause, show, hide) and switch between multiple scenes

vector-storm's People

Contributors

christianoellers avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

keyzf

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.