Giter VIP home page Giter VIP logo

pvz's Introduction

PvZ - SYSC3110 Plants vs Zombies Software Development Project - Github

Authors:

Changes made in Deliverable 1:

  • Added base model(Plants, Zombies, Level Grid)
  • Created text based User Interface that plays level
  • Added basic level modeling (currently a .txt file)
  • Added lawnmower functionality

Changes made in Deliverable 2:

  • Created Graphic User Interface to play level
  • Reconfigured certain aspects of model to improve configurability or reduce "smell"
  • Java classes were refactored to be in organized locations
  • JUnit testing was implemented across the project's model

Changes made in Deliverable 3:

  • Drastically Improved the Graphic User Interface
  • Implemented JSON to store level data
  • JUnit testing was implemented across the project's view and controller
  • 3 Additional plants and 2 additional zombies were added to the game
  • The ability to have more than 1 level was added
  • The view was improved to form to different screen sizes and resolutions
  • Entity movement was changed to be based on # spots rather than # pixels

Known Issues:

  • If a group of zombies kills a plant, sometimes the group will split up. (Not necessarily an issue)
  • No delay exists between being allowed to place plants
  • (Fixed)Lacking error checking on user input
  • Plants are created regardless of whether they are successfully able to be placed on the board
  • (Fixed)Zombies always attack the front plant, regardless of whether that plant is in front of them
  • (Fixed)Plants always attack the front zombie, regardless of whether that zombie is in front of them
  • (Fixed)The method to place plants can be confusing
  • (Fixed)Plants don't have their costs printed on screen
  • (Fixed)When the size of the gui is changed, the component's sizes don't change and can overlap in strange ways
  • No menu exists to give instructions, only a popup at game start
  • (Fixed)Print statements still exist throughout the project and should be removed
  • Win/Lose Dialog Box Doesn't end game

How to play:

  1. Launch the main class, this should bring up the gui
  2. Within each turn, you have the options of placing plants, ending your turn or quitting.
  3. When placing a plant, click on the spot you'd like to place your plant, then click on the plant you'd like to place.
  4. Ending your turn will cause the board to update with any potential new zombies, as well as cause all Entities currently on the board to update (Peashooters will shoot, Sunflowers generate sun, Zombies either walk forward or attack a plant)
  5. If zombies reach the end of the lane, a 1-use per lane per level lawnmower will be used to mow over every zombie in that lane, the second time a zombie reaches the end of a lane, the player loses.
  6. If all waves of zombies are killed by the player, the player wins.
  7. You can undo and redo plant placements within a turn using ctrl-z and ctrl-y or by clicking the respective buttons in the menu.

Roadmap Ahead

  • Implement continuous integration on github
  • Allow for saving/loading the game at any point
  • Allow for user creation and saving/playing of levels
  • Fix the slight smell in Lane.java

Readme Author: Simon Krol

JavaDoc Documentation Author: Simon Krol

UML Diagram and Sequence Diagram Author: Shaun Gordon and Simon Krol

pvz's People

Contributors

boyansiromahov avatar gordon-macdonald avatar gordonmacdonald16 avatar seangordean avatar simonkrol avatar

Watchers

 avatar  avatar

pvz's Issues

No telling what went wrong

We should have some sort of label or dialog box that gives messages/instructions to the user, telling them when they've won/lost, why they can't place a plant..etc

Resolution Sizes cause issues

The resolution of the computer being played can cause issues with regards to how the GUI looks, this should likely be fixed by revamping the coordinate system to use Spots rather than using pixels. Should likely be implemented throughout the model and deal with all pixel calculations in the view and controller.

Win/Lose Dialog Box Doesn't end game

The Winning and Losing dialog boxes currently come up, but by clicking OK, you can continue playing the game. This shouldn't happen, getting a win or a lose should end the game.

Zombies always attack front plant

Zombies always attack the front plant in the lane, no matter which plant they find themselves in front of. Need a method that gets a specific plant rather than the front plant in every circumstance. This method should likely exist in the Lane class.

Plants created regardless of viable placement

When trying to place a plant, we create the plant object regardless of whether or not the plant can successfully be placed on the board, not a huge deal, but not very efficient.

No Instruction Menu

The game currently has a popup at the start of the game that instructs you how to place plants, this should either be removed if we can get plant placing to a reasonable level, or changed to be some sort of menu instead. (Cause that popup is annoying)

No delay between plant placing

Placing plants should be on a turn delay, that way a player can't just spam plants throughout the game, this should be done either by turning off the clickability(?) of the plant's button or by preventing it within the model when we try to place the plant. The model solution is cleaner in terms of code, but the view button solution is nicer for the user interface. My recommendation would be to do the code itself in the model, then link the buttons clickability to that aspect of the model, not exactly sure how this should be done.

Images shouldn't be created in ImageCanvas

The images representing plants and zombies should not be stored in the GameCanvas class, but should likely be moved to their respective classes in a public static final ImageIcon and accessed dynamically. (This is so when we have more types of P and Z, we dont have a massive collection of if statements.

Plants always attack front Zombie

Plants always attack the front zombie in the lane, rather than the first zombie in front of them, this may need to be fixed by implementing some sort of projectile that is actually responsible for dealing damage.

Print statements exist

Some print statements still exist throughout the project that should be removed as we are no longer using the text UI.

Way of placing plants can be confusing

Placing plants currently requires the user to click "add plant" followed by the spot they'd like the plant to be placed then clicking on which plant they'd like to place. It would be better if this could follow a "click plant, click spot" flow instead.

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.