BASEBALL
BASEBALL
Solo Graduate School Project
Made from scratch in C
3 Week Project
Project Description
The game is a recreation of old school arcade baseball games with the following features:
Batting - Simple Click to hit mechanic
The power is determined by the timing of when the player clicks, with a sweet spot being not too early and not too late
The location of the hit, is determined by where you click on the ball, for example clicking on the left side of the ball will apply a force that sends the ball right
AI Pitching
The AI uses one of 5 pitch types, and chooses a random spot to attempt to throw it at. Then it uses a further random radius so the AI has a chance of throwing a ball instead of only strikes.
Pitching - Choose pitch type, and where to throw it, and it will show a region of uncertainty (the cursor is the random radius) of where it will go in the strike box, to allow for possible balls.
AI Batting
The AI has a chance to swing at the ball based on how close it is to the edge of the strike box, the further away it is the lower the chance the AI has to swing
Once a swing is initiated a roll will be made to see if the swing actually contacts the ball, and using that roll (of x and y position), a spot on the ball is determined and it can hit the ball just like the player.
Outfield Play - Players will automatically run to the ball to try and catch it, using the time of the ball in the outfield, the game will calculate a result, and cause the players to run the bases automatically
If the ball is caught before a bounce was tracked, and out will be automatically logged
The game ends after three innings of baseball.