Git Product home page Git Product logo

cs1830-lightsout's Introduction

LightsOut ๐Ÿ”ฆ

LightsOut is a game with a simple premise, survive the dark. In a world devoid of light monsters evolved to thrive in the dark and now they are hunting you! How long can you survive?

Navigate though this new world with your wits and trusty flash light, but be careful of what you might find.

Requirements

SimpleGUI

To use simpleGUI in pycharm or other idle:

  • Open the command prompt
  • Enter and run the following:
    • python -m pip install --upgrade pip
    • pip install pygame
    • pip install SimpleGUICS2Pygame
    • pip install PyAutoGUI

To use tkinter, which I think is need but not 100% certain, I now have a copy of it on a memory stick and can give it to those who need it. It should come standard with python 3 onwards, to check it is there navigate to C:\Users\Adam Plaskitt\AppData\Local\Programs\Python\Python37-32\Lib for windows users, and check that a file called tkinter exists. As stated above I have copied this file to a memory stick and can give it to anyone who needs it.

pygame is installed as a prerequisite for SimpleGUICS2Pygame, and for the use of pygame.mouse.get_pos(), to get the position of the mouse.

These install both PyAutoGUI (a mouse and keyboard handler) and SimpleGUICS2Pygame (a simplegui emulator package)

When using SimpleGUICS2Pygame (simplegui) you want to import it as:

try:
    import simplegui
except ImportError:
    import SimpleGUICS2Pygame.simpleguics2pygame as simplegui

gspread

To install use cmd to run:

  • pip install gspread
  • pip install --upgrade oauth2client

gspread is used to access a google spreadsheet, in google drive. This spreadsheet is the data for the scoreboard. The google account is:

username: [email protected]

password: Pa$$w0rd12345

gspread is used to provide access to the online scoreboard, if this is inaccessible due to any reason (eg. gspread isn't install properly or there is a connection issue) a local scoreboard will be used instead.

cs1830-lightsout's People

Contributors

adamplaskitt avatar benhicks84 avatar jetheridge99 avatar rickus-dg avatar aljawharatalal avatar

Stargazers

 avatar  avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

Forkers

aljawharatalal

cs1830-lightsout's Issues

003: Optimising

In Menu

  • optimise the code, to better work the state inherited
    • This will allow it to connect to other States

000

Changes in the States of control

change the game states t use the canvas sizes in the settings dictionary instead of the CANVASWIDTH and CANVASHEIGHT

00G: Black overlay part 1

Black overlay part 1

  • load the map
  • create a (possible static) black overlay to over the map with a missing circle in the centre

00O: Points

Points

  • Build a points system
    • points build up over time
    • receive points when enemies killed
    • receive points as a reward for other stuff

001

Create set_up in leaderboard

create the set_up method in leaderboard to get scores, overriding set_up() from inherited State

00A: Optimisation and Enhancement

Optimisation and Enhancement to reduce the likelihood of errors

  • Change if statements that deal with the mouse being within a button, to the inherited is_in_bounds method or an overridden is_in_bouinds method

00J: Enemy super class

Enemy superclass

  • Create the class to be inherited by the types of enemies
  • key features:
    • health
    • speed
    • damage
    • position
    • target

004: Optimising

Optimise Scores

*Optimise the get and add score methods to decrease load time

00B: UI Improvment

UI Improvement

  • Find a way to centre objects on the screen
  • Find a way to centre text on the screen, and in a button (both X and Y axis for buttons)

00N: Map walls

Map walls

  • make vectors to define the 'walls' on the map

009: Improvement for testing code

Improvement for when the code is being tested

  • change the:
if __name__ == '__main__':
    # Do stuff
  • change the #Do stuff to a running of LightsOut with the start state changed to be the state which is being tested

00C: Pathfinding

Enemies pathfinding

  • implement a basic pathfinding algorithm from the enemies to be used for testing and proof of concept.

00M: Admin screen

Admin screen

  • To include options useful for testing, accessed by pressing the ` key on the main menu
  • Will need to be connected to the state dictionary in LightsOut

To include:

  • option to not show the black overlay

00Q: Torch super class

make a super class for the torch that takes the range and damage of a torch and implements it on the screen

006

Mouse handler in gameOver

  • Link the gameOver page to a mouse handler
  • use the new mouse handler to highlight buttons when the mouse hovers over them

00L: Pause screen

Pause screen

  • Create a pause screen
  • Add it to state list in LightsOut
  • set up mouse handler for its buttons

00H: load player

Load player

  • load the player sprite
  • connect to mouse handler
    • have player 'look' in the direction of the mouse

00D: User input

User input on the game_over screen

  • create a key listener on the game_over screen to be able to tell when the user types their name
    • To be used for the add_score method

00I: Black overlay Part 2

Black overlay Part 2

  • overlay a black 'Pacman' around the player so that the torch gap can see the map beneath
    • clear segment has defining vectors?

002

Changes in GameOver.py

  • Convert Gameover to a class, which inheritances State
  • Add the Gameover State to the state_dictionary in LightsOut

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.