- Alexis Couvreur
This source code is visisble here, and the playable version at my github page.
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.
Une musique de fond est activée via l'API Audio
.
- Simulation d'un effet parallax en fonction du layer choisi (cf. fonction
createStars
dans game.js) ; - utilisation de sprites :
- 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é) ;
- 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.
- Utilisation des techniques apprises en cours :
- syntaxe ES6 (classes, héritage, lambdas, etc.) ;
- frameworks à la main (GameFramework skelleton) ;
- loader d'assets (dans le fichier sprite.js) asynchrone avec fonction de callback ;
- utilisation de sprites sheets ;
- utilisation audio (malheureusement pas AudioContext) ;
- black-boxing comme le game framework (voire framework Shield dans joueur.js) ;
- 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.
- 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 !).