Coder Social home page Coder Social logo

zombie-house's Introduction

Zombie House

This is a game in which the player is placed in a dark, unfamiliar, and zombie-infested house and only one way to escape. The player must navigate through the house's dangerous hallways and find the one exit before the zombies catch them and eat their brains!

Documentation

The JavaDocs can be found here The Project specification can be found [here](http://cs.unm .edu/~joel/cs351/notes/CS-351-05-ZombieHouse.pdf)

Models

  • The character controlled by the player
  • The house where the character moves
  • Obstacles
  • Zombies

Controllers

  • Player input
  • Controller to perform actions on the player’s character (move, attack)

Views

  • Renderer – Render the objects onto the screen

Main

  • Main loop is in ZombieHouse.java. Events are passed from here to controller

Menu Options

  • Play - Resumes a game
  • Restart - Reset the house to it's previous saved state
  • Exit - Quits the game
  • Settings - Opens a settings menu to change the current game settings
  • Generate - Generates a house using the current game settings
  • Level 1 through 5 - Generates a house based on pre-defined settings

The menu can be opened any time in game by pressing SPACE. Cycle through the menu's options by using the left and right arrow keys.

Running

Preferable over jar file

Permission fix (if not already set)

    chmod u+rwx game

Run

    ./game run

Other commands

    ./game build

    ./game clean

####Setting up Intellij

  1. On the startup screen, click the option, Check out from Version Control
  2. Choose git from the dropdown menu
  3. Paste the Git repo URL [[email protected]:javierchavez/zombie-house.git]
  4. Choose the dir. for the repo to live.
  5. Select yes when it asks if you want to create an intellij proj.

######Authors

zombie-house's People

Contributors

esosebee avatar kf4x avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

zombie-house's Issues

Character movement

Character movement

quick overview

  1. At start up the GameEngine (controller) will tell House how large the house needs to be.
  2. The model will generate a house and return a house back to GameEngine.
  3. The controller will then hand a Character to the House and the house will randomly place it.
  4. The GameEngine controller will then hand the house with everything placed to the render-er to which it will draw.
  5. After this ZombieHouse is going to start calling GameEngine's update() at ~60fps, in addition its imdidetatly going to start passing any events to the GameEngine.
  6. GameEngine will be passed ALL events and therefore need to be filtered/sifted through and only grab the one's we need.
  7. GameEngine Will then call methods of other controllers like CharacterController to rotate
  8. CharacterController is when the actual Character object's attributes should be updated. i.e. if the GameEngine calls the CharacterController's rotateLeft() then the controller will update its instance method of the Character character.rotate(180)

Movements

  • Left
  • Right
  • Up
  • Down
  • Run
  • Pickup
  • Drop

Zombies path

  1. If a Random Walk zombie does not smell the player, then, on each decision step, the zombie will choose, with uniformly distributed probability, a heading 0.0 through 360.0 degrees from east.
  2. After choosing a heading, the zombie will continue to move in that heading until the next decision update.
  3. When a zombie collides with a wall or obstacle, the collision detection must stop the zombie at the wall. However, the zombie will continue to attempt to walk in that same direction until its next decision update.
  4. On a decision update, if a Random Walk zombie had on the previous update hit a wall, then the zombie will not choose to move in that same direction.
  5. On a decision update, it a Random Walk zombie is adjacent to a wall, but did not hit that wall on the previous update, then the zombie will not favor nor disfavor that direction.

Procedural Floor Generation

Procedural Floor Generation
In the House Model creating a way for the house to be dynamically generated.

quick overview

  1. At start up the GameEngine (controller) will tell House how large the house needs to be.
  2. The model will generate a house so that the GameEngine can query the model for specifics.
  3. The controller will then hand a Charater to the House and the model will randomly place it.
  4. The GameEngine controller will then hand the house with everything placed to the render-er to which it will draw.

Rendering

House Rendering

quick overview

  1. At start up the GameEngine (controller) will tell House how large the house needs to be.
  2. The model will generate a house and return a house back to GameEngine.
  3. The controller will then hand a Character to the House and the house will randomly place it.
  4. The GameEngine controller will then hand the house with everything placed to to the render-er to which it will draw.
  5. After this ZombieHouse is going to start calling GameEngine's update() at ~60fps, in addition its imdidetatly going to start passing any events to the GameEngine.
  6. At this point render-er will be called.
  7. HouseRenderer's render() will be invoked and a house reference will already be at available.
  8. Determine the screen size, house size, adjust the view, and clip as needed.
  9. When different objects are encountered call the corresponding render class.

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.