Code Monkey home page Code Monkey logo

galaxywars's Introduction

GalaxyWars

Introduction

Galaxy Wars is a game that consists in a space ship that continuously tries to reach further distance until infinity. The main objective of the game is to last for the longest time possible. The game consists in three different difficulties (easy, medium, hard) differing of the quantity of enemies being thrown at.

User Manual

  • Main Menu Once the game is launched, the user can select:
    • New Game
      Initializes the screen with two options. Play game or quit game. If play game option is chosen it redirects to difficulty choice menu. alt text

    • Difficulty Choice Menu
      Gives the user three options of difficulty:

      • Easy
      • Medium
      • Hard alt text
    • Action
      After the user choice of the game difficulty the game will start being the user the spaceship in the left and the enemies are all of the bodies coming from the right.

alt text

  • Controls

    • "W"
      Gives the player's spaceship an upwards impulse (must be pressed repeatedly)

    • "S"
      Gives the player's spaceship a downwards impulse (must be pressed repeatedly)

  • Enemies

    There are 3 different tipes of enemies:

    • ZigZag Bounces up and down unpredictably while moving left towards the player
      alt text

    • Shooter Fires projectiles while trying to aim at the player
      alt text

    • Kamikaze Tries to lock the player's altitude and then quickly launches itself towards him.
      alt text

    If any of the enemyes collide with the player, the game is over.

    The player can pause the game at any point by pressing "esc", entering the pause menu:

  • Pause menu alt text

Design Patterns

* **Model View Controller**
	To make testing easier and the code more organized. 

* **Object Pool**
	This design pattern is used to save memory and improve the performance when firing the projectiles, as they exist in a limited amount and are contantly being created and destroyed. It was also used in the creation of the different enemies.

* **Singleton**
	It's implemented in the GameModel class.

UML

[https://github.com/francismaria/GalaxyWars/blob/master/imgs/umlrealsize.jpg]

Major Difficulties

The major difficulties we encountered during the development of the project was the making of of the explosions animation due to the fact that we couldn't keep the correct time between the changing of the frames of the animation.
We also had a difficult time dealing with the buttons interface because they were all "handmade" which means we had to keep scaling and changing the images.
The last major difficulty we have faced was the implementation of the singleton design pattern as there were times that we had to access to variables in a non-static way forcing us to change the implementation.

Lessons Learned

We have learned that the design patterns are essential for a good, organized project. They help to maintain the sustainability of the code aswell as adding new modifications or even refactoring the code. This was something that we had valued since the beginning of the project allowing us to organize and create a better project.

galaxywars's People

Contributors

francismaria avatar dinismoreira avatar

Watchers

André Restivo 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.