Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "A Fighting Game of Sorts CS470 Project Presentation By Mark Blum."— 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

8

9

10

11

12 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.

13 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|tru e|true

14 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.

15 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

16 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.

17 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.

18 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.


Download ppt "A Fighting Game of Sorts CS470 Project Presentation By Mark Blum."

Similar presentations


Ads by Google