Friday 7 December 2012

Arms Dealer Game

As part of my software development 3 module we were tasked with writing the Java code for a space game using design patterns, threads and a GUI. We also had the option to design our own game however and i choose to do this instead.

Game Design 


The player plays as an arms dealer who has to buy and sell weapons and ammunition to other dealers in the game. The player will specify the number of turns they wish to play for and must try and get as much money as they can before they run out of turns.

Each turn the player will be asked by another dealer if they would like to deal with them and they can either refuse or accept this offer. If they refuse they will continue to be asked by other dealers until they accept an offer. If the accept they will be taken to the deal screen.

In the deal screen they will have the option to buy and sell items and to commit or undo the deal. When a player buys or sells an item that item will be added to a separate list box and there money will be amended. When the player presses commit the player and dealer’s inventories will be updated accordingly. When they press undo they will go back to the start of the deal. 

Dealers(including player) can have arms embargoes placed upon them which will effect players who choose to deal with them as there is a risk they could be fined  and lose money.
Dealers can also change their behaviour from willing to deal or does not want to deal and this will decide if they are an option for the player to deal with. 

The actual game

Start Screen 


The start screen is the first GUI that the player is presented with, it has 4 buttons which the player can select from. They can either load a previous game, start a new game, close the game or display the instruction screen.

Instruction Screen


If the player presses the instruction button they are presented with the instructions for the game. They can then close this screen and choose another operation.

 Player Home Screen


If the player selects new game or load game they will be taken to the player home screen where they can view their current stats such as the items they have in their inventory and how much money they have. From this screen they can either choose to undo a turn or go to the next turn.

New Deal Screen


When the player selects next turn they will be presented with a proposal from a dealer who is willing to deal with them. They can either except or refuse this proposal. If they refuse a new dealer will make an offer. This will continue until an offer is accepted.  

Buy and Sell Screen


When the player accepts a dealers offer they will be taken to the buy and sell screen where they will be presented with the dealer’s inventory and their own inventory. They are then able to select items from their inventory which they would like to sell and press the sell option, this will move the item from their inventory to the sell list box. If they try and sell an item which the dealer can’t afford they will be presented with the option to continue and lose money or cancel the transaction.


The player is also able to select items from the dealer’s inventory they wish to buy and press the buy option, this will remove the item from the dealer inventory and place it in the buy list box. If the player does not have required funds they will be shown an error message and will not be able to buy the item.


If the player selects undo the sell and buy list boxes will be wiped and the player’s money will be set back to what it was at the start of the turn and the items added back to their inventories. When the player presses commit the deal is committed and the sold items removed permanently from the inventory and their bought items added. If the game still has remaining turns they will be taken back to the player home screen and will continue to play through again until no turns remain.

Leader board


Once there are no more turns remaining in the game the player is shown the leader board for the game which shows how much money each dealer made and how well they done in comparison. The player’s only option at this point is to close the window which will also end the game. It is at this point that the game is serialized and can be reloaded again from the start screen. 

Thanks for reading! Any questions or feedback i would love to hear from you. If any one would like to try and play the game feel free to email and i will send you a copy, be warned though the game is still being worked on and has a few bugs still to be fixed. 

Email: 10004794@napier.ac.uk - Please put blog in the subject.
Xbox Gamertag: craigmcmillan01
Twitter: 
steam: craigmcmillan01
add or follow and we can game!

No comments:

Post a Comment