Update 4 – (6/8/2012)
- – Pause – You can pause the game and return to the main menu.
- – 2 player mode – Take turns with another player, the game will track each players score.
- – Sounds / Music – Sounds for hitting cue ball, ball collisions, cushion collisions, potting balls, and Menu music.
- – Power is shown above the power bar to clearly show that the bar represents the percentage of power.
- – Win screen – The game will show who wins the game and the score.
- – Mute – You can mute the sounds and music in the game.
Update 3 – (13/7/2012)
- – Foul system: The game will track most fouls and rules from the real game including; missing all balls, hitting the wrong ball, potting the wrong ball, potting the cue ball. The above video shows how it works.
- – Player states: States have been added for the Menu, Play, and Stop. Menu for when the player is in the main menu, Play for when the ball is moving, Stop is when the balls have stopped moving.
- – A rectangle in the top left corner that is coloured differently to represent the different states – Red is Stop, Blue is Play. This helped development to work out when to add or deduct points.
- – Menu system: This is currently quite basic, you can choose between 2 modes.
- – 6 ball game: You can choose to play a game with 6 reds instead of 15.
Update 2 – (03/05/2012)
Although I have been busy with other University work I have made some progress with the project.
- – I have added working pockets so you can pot the balls on the table.
- – The correct points will be added to your score when you pot a ball.
- – I have added a trail ahead of the cue ball to show where you are aiming because it was quite difficult before.
- – I have added more collision work with the cushion edges using line-circle intersection collisions so balls will bounce back more realistically
- – When a ball is potted and removed from the table it will go in the top left of the screen, showing the player what has previously been potted.
- – I have also automatically set the ball positions at the start of the game including the red ball ‘triangle’. When each colour is potted it will return to it’s designated spot, unless there are no reads left on the table.
Update 1 – (8/4/2012)
I have been using the DirectX 2D game engine for a while now and 2 weeks ago we learnt in University how to handle circular collisions and implement it into a pool game. After learning this I decided to build a Snooker game for a project because I enjoy playing Snooker and Pool games and thought it would be a fun project to partake.
I started the project by building the Snooker ball classes that use bmp images for different colour balls, I then implemented an aiming function which uses the unit vector of the position of the cue ball and mouse cursor position and when the user clicks it will fire the cue ball in that direction. I then added the ball collisions that calculates the velocity of the 2 balls after colliding using the standard elastic collision velocity calculation. I then added a bmp image of a snooker table and added boundaries to the balls so when they hit the cushions of the snooker table the ball will bounce back correctly. I then changed the boundaries to only reach the edges of each cushion of the snooker table. Using similar circular collisions like the balls I used circle collisions for the edge of each cushion as it is a similar shape and will generate similar results to a ball hitting the edge of a rectangle.
This is where I am up to with my Snooker game. So far I have:
- – Snooker ball class that allows different colour balls and different sized radius
- – Cue ball that draws a line from the cue ball to the mouse cursor, this shows the direction the cue ball will fire in.
- – Using the mouse scroll wheel it will change the size of the line. The longer the line, the more powerful the shot will be.
- – All the cushions on the table work and the balls will bounce off them correctly
- – The black squares on the screenshot show where the circle collisions are at the end of each cushion.