1 / 18

A Fighting Game of Sorts

A Fighting Game of Sorts. CS470 Project Presentation By Mark Blum. Background. I made a graphically driven game. The “clients” for my project are myself, my brother Luke, and my friends. Java was used to create the game. Project Goals.

maxim
Download Presentation

A Fighting Game of Sorts

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Fighting Game of Sorts CS470 Project Presentation By Mark Blum

  2. Background • I made a graphically driven game. • The “clients” for my project are myself, my brother Luke, and my friends. • Java was used to create the game.

  3. Project Goals • Make a new game that is better than any previous game I have created. • Accomplish this by incorporating the best features of the previous games I have created (story, graphics, and AI) and adding any features that may still be missing (sound and save feature).

  4. Requirements • The system must have a save game feature, a character creation module, a cheat code, 10 stages, an ending sequence, and a high score ranking system. • My game fulfills all the listed requirements.

  5. Sample High Score Ranking System Having completed stage X before ending the game, you have achieved the fighting rank of: • Wimp • Lucky Punk • Thug • Novice • Initiate • Adept • Expert • Specialist • Master • Grand Master • Supreme Grand Master

  6. Interface Mock Up

  7. Data Structures • I used a couple of stacks to implement the High Score system. • To store the information about the hero and the various bosses I used a simple file format.

  8. Data Structures, cont. • An example of a typical boss file is: Dan|110|37|0|3|2|2|2|2|3|1|5|8|6|2|0|40|5|5|5|0|0|0|24|EMC|40 • An example of a typical hero file is: true|1|Goku|112|45|0|3|2|2|2|2|3|2|true|true|true

  9. Data Structures, cont. • For input validation I used a special data structure that was capable of only holding whole numbers. • This was used extensively in the character creation module. It is also used when the player is prompted to enter the number of additional EP to sink into an attack.

  10. AI • Random/Rule-based hybrid. • Each character has a random percentage chance to do any particular move that they possess. • Percentage chances are modified based on certain “rules”. • Examples: if enemy is defending: then increase probability of powering up by probability to defend and set probability to defend to 0 • if enemies action equals Energy Maximum Charge attack: then defend with a 8 times current stage probability

  11. Biggest Hurdle • The biggest hurdle I encountered during the course of my project involved threading and thread “safeness” or lack thereof. • During the players turn, I needed to “pause” the program until the player had made a selection. • Added an extra thread to take care of the fighting. Unfortunately, Swing is not thread safe.

  12. Solution • I made a special class that I used to sync my threads with, and I made all my accessor and mutator methods synchronized. • I also declared many of my variables to be volatile, and I made use of repaint(0) instead of repaint() where it mattered. • Where possible, I used the results of a change before making the change.

  13. What I’ve Learned • I learned that making a graphically driven game is extremely time consuming, and that making/editing the graphics can take just as much time as the coding. • In addition, I learned how to make programs that utilize Swing thread safe.

More Related