Giter VIP home page Giter VIP logo

pool-game's Introduction

pool-game

Pool Game written in Canvas. Manchester University Computer Science Third Year Project.

pool-game's People

Contributors

joehs avatar

Forkers

uom-cs-projects

pool-game's Issues

Black ball can be assigned to player

For the pool rules, the black ball can be assigned to a player in the break phase as if it were another type of ball such as red or yellow, as game ending logic for the black ball is incomplete.

Implement Snooker game end logic

When all reds have been potted, and then the break ends (when player is on colours), the remaining colours should be potted in ascending points order.

Cannot always apply maximum power to cue ball

If the cue ball is against the edge of the table/canvas, the user cannot apply the maximum allowed amount of power, as a click and drag past the edge of the canvas is not detected.

Collision Bug Fixing

  • Calculate distance extracted to function

  • Separate balls upon collision (Prevent overlapping)

  • Correct conservation of momentum simulation

  • Prevent balls being generated in a state where they overlap

Cue does not always render

Bug introduced when we implemented hiding and disabling the cue.
Cue does not render when you hold the mouse down while you are not allowed to take a shot, and keep it held until the next shot phase begins. Releasing the mouse takes the shot, but you cannot see the state of the cue.

Snooker Rules

Use what I have learned implementing Pool rules for the system, and do the same for Snooker.

Create a sandbox

Visualise the previous issues in a sandbox that randomly generates ball objects that interact with each other appropriately, and keep this code apart from the core mechanics of the gameplay so that the rest of the code is re-useable.

Fix collision bugs

  • Fix issue where balls can move past rails at high speeds
  • Fix issues where collision with pockets was not detected
  • Make collisions between two balls more realistic

Extend drawing context

Create subclasses of the drawing context to represent rectangular and circular objects to represent the environment and the interactive balls, respectively.

Laws of motion

Realistically, or semi-realistically, react and adjust the simulation when objects collide.

Pool Rules

Represent rules for British Pool in a finite state machine within a class in such a way that new classes could be written to extend functionality with new game types.

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.