Git Product home page Git Product logo

asteroids's Introduction

Projet : Web2.0 Master IFI

Author

  • Alexis Couvreur

Code

This source code is visisble here, and the playable version at my github page.

Gameplay

Vous contrôlez un fusée dôtée d'un bouclier activable via ESPACE, le but est de survivre pendant un temps t affiché en haut à gauche. Le bouclier vous permet de passer outre les obstacles.

Effets sonores

Une musique de fond est activée via l'API Audio.

Design

  • Simulation d'un effet parallax en fonction du layer choisi (cf. fonction createStars dans game.js) ;
  • utilisation de sprites :
    1. pour le joueur, la fusée est animée à l'arrière grâce à un sprite, de même que pour son bouclier (sprite non animé) et l'explosion (sprite animé) ;
    2. pour les astéroïdes, j'utilise un sprite représentant différents astéroïdes et donc ne sont pas une suite de mouvement, chaque astéroïde généré en a un choisi au hasard ;
  • les images ainsi que le fichier audio ont été trouvés sur internet.

Points positifs

  • Utilisation des techniques apprises en cours :
    1. syntaxe ES6 (classes, héritage, lambdas, etc.) ;
    2. frameworks à la main (GameFramework skelleton) ;
    3. loader d'assets (dans le fichier sprite.js) asynchrone avec fonction de callback ;
    4. utilisation de sprites sheets ;
    5. utilisation audio (malheureusement pas AudioContext) ;
    6. black-boxing comme le game framework (voire framework Shield dans joueur.js) ;
    7. séparation des tâches en fichier
  • niveaux infinis car générés aléatoirement ;
  • déplacement du vaisseau fluide via un facteur accélération et vélocité ;
  • facilement maintenable et évolutif.

Points négatifs

  • Gameplay pas forcément très intéressant et diversifié ;
  • l'utilisation de l'audio est très limitée, j'aurais aimé synchroniser le rythme de la musique avec le spawning d'astéroïde ;
  • impossiblité d'utiliser l'API soundcloud car ils ne permettent plus d'enregistrer une application ! (c'est dommage !).

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.