GithubHelp home page GithubHelp logo

mi-ruan / slimeairhockey Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 167.18 MB

Physics-based JavaScript browser game inspired by the original slime game.

Home Page: http://michaelruan.xyz/SlimeAirHockey

HTML 4.99% JavaScript 87.06% CSS 7.94%

slimeairhockey's Introduction

Slime Air Hockey

Background

Slime originated from the old browser game Slime Volleyball where each player controls a semicircle character (slime) and plays volleyball each other. For this project, the sport will be the arcade classic air hockey. There will be a goal on either side and points are scored when the player enters the opposite goal. The ball or puck can bounce off all four sides of the wall except for the goal. The game starts off with the puck in the middle and players jockey for the puck. After a goal, the loser gets the initiative to hit the puck first. For this game, players can cross the center line. Game will end after a set amount of time(1 - 2 mins) and winner is decided by who scored the most.

Functionality and MVP

In this Slime Air Hockey, features include:

  • start and restart game through a menu UI
  • human vs human games
  • human vs simple ai games
  • ai vs ai games
  • human vs ai using learned weights

UI

This app contains a single screen with game window in the center. Control instructions are on the bottom of the game window. Personal Links such as Linkedin, Github, and Portfolio will be on the right of the game window.

Snapshot

Architecture and Technologies

  • JavaScript
  • DOM for menu UI
  • brain.js for inspiration on machine learning

The scripts involved for this projects are:

game_view.js - handles UI and what type of game to start
game.js - handles the game logic when points are scored and when the game is won
slime.js - handles the players input controls and properties of slime
puck.js - handles the physics of the puck
moving_object.js - handles physics for all moving objects (slime, puck) including wall collisions, and ball to ball collisions
AAIslime.js - handles the logic for the aggressive AI: always goes for the ball
RAIslime.js - handles the logic for the random AI
DAIslime.js - handle the logic for the defensive AI
BAIslime.js - handle the logic for the bossy AI: always goes for the other slime
MLslime.js - handle the logic for "Machined-Learned" AI: used directional weights to determine what direction for the AI is optimal

slimeairhockey's People

Contributors

mi-ruan avatar

Watchers

James Cloos avatar

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.