My Pong clone was created inward 24 hours, though non inward the type of all-nighter hack-a-thon you lot mightiness facial expression or fifty-fifty a typical 3 run days. I convey a full-time twenty-four hours job, hence evolution is typically done belatedly evenings, but fortunately I kept runway of the amount of fourth dimension spent on specific components. Note that I started amongst a working Direct3D application from Luna's bulk Introduction to 3D Game Programming amongst DirectX 9.0c: H5N1 Shader Approach. Here is the hours-to-effort breakdown:
- 10 Hours - I dedicated the kickoff 10 hours to rendering the basics of the game: the board, 2 paddles, as well as the ball. This included creation of graphical "placeholders"; I'm non an creative soul but I realized I could come upwardly dorsum as well as brand the fine art fancy afterwards everything worked. Getting the ball inward motility as well as hence allowing it to bounce off the walls as well as paddles (Collision Detection) was the 2nd major focus. Finally, the uncomplicated mechanic of allowing the thespian to displace a paddle up/down brought the game into a playable state.
- 4 Hours - The primary seek of the adjacent stretch was to implement a basic estimator opponent (Artificial Intelligence), as well as I started amongst a perfect opponent whose vertical seat matched the ball's seat at every moment. When adding unlike game modes, this perfect opponent became business office of the game's Practice Mode. I added the ball's motility blur resultant only to improve aesthetics as well as moved hard-coded values to an include file for easier maintenance as well as testing.
- 4 Hours - In this stage I worked on creating a estimator opponent that moved to a greater extent than realistically but was too fallible; a perfect opponent gets ho-hum to play against! I added unlike difficulty levels (easy/medium/hard), which industrial plant yesteryear choosing a random "reaction fourth dimension delay" betwixt when the thespian hits the ball as well as the estimator opponent is allowed to striking the ball. Obviously, equally difficulty increases, the computer's reaction fourth dimension improves to instruct far a to a greater extent than formidable opponent.
- 4 Hours - At this request the game was playable amongst differing levels of difficulty but no clear means of selecting game settings. I created the carte du jour organisation as well as added scoring to scope upwardly one's heed the winner.
- 2 Hours - The final stride earlier I considered the game completed was to run on the art, which could clearly nonetheless utilisation or hence work! :)
Final Thoughts:
I knew this projection would last relatively uncomplicated because at that topographic point are entirely 4 game objects to croak on runway of: 2 paddles, i ball, as well as i board. However, due to its uncomplicated nature, I was inclined to hack it together speedily as well as did non follow strict OOP (object-oriented programming) principles. The bulk of the game code is inward a unmarried monolithic file. I too resorted to reusing an existing bird designed to output uncomplicated statistics to display text-based menus. But worse, the same bird used to exhibit all menus as well as text became my game set down director since I needed to know which menus had been processed. I hence extended it to display electrical flow marking values as well as to exhibit which thespian had won the game. Although I could convey seat a lot of fourth dimension into doing it the right way, the utilisation of this seek was to get something done. In futurity endeavors I programme to follow ameliorate OOP design.
The best business office of this projection is that I genuinely completed a working game! I am proud of the subtle but effective motility blur effect. The game doesn't convey all the bells as well as whistles (seriously, no sounds or music yet) but it is playable, implements Collision Detection as well as Artificial Intelligence, as well as has a clearly defined winner at the end. Some may fifty-fifty reckon it fun :)
0 Response to "Pong Postmortem: Completing A Game Inwards 24 Hours!"
Post a Comment