Saturday 23 May 2015

Developing a 4 player AI card game - Blackjack / Pontoon / 21

Assignment day one - 16/3/2015

The task for the next project is to develop a 4 player card game - Blackjack, Pontoon or 21. The emphasis for me as a games designer is to develop a script in game maker that will focus on randomly drawing cards from a deck for the players. The player must be able to see the cards on screen and choose whether to stick or twist - draw another card or keep what they have. There are a number of factors that I need to consider:

- Probability / Chance
- Mathematics
- The intelligence of the opposing players - varying intelligence
- A scripting system to mimic the rules of a card game
- Mouse over options for stick or twist


Other factors
- Artwork
- Setting
- Custom card decks
- Screen layout (the game is being designed for an Android phone)

A good place to start would be to look at the rules as I am unfamiliar with the card game:

Blackjack, also known as twenty-one, is the most widely played casino banking game in the world. Blackjack is a comparing card game between a player and dealer, meaning that players compete against the dealer but not against any other players. It is played with one or more decks of 52 cards. The object of the game is to beat the dealer, which can be done in a number of ways:
  • Get 21 points on the player's first two cards (called a blackjack), without a dealer blackjack;
  • Reach a final score higher than the dealer without exceeding 21; or
  • Let the dealer draw additional cards until his or her hand exceeds 21.
The player or players are dealt an initial two-card hand and add together the value of their cards. Face cards (kings, queens, and jacks) are counted as ten points. A player and the dealer can count his or her own ace as 1 point or 11 points. All other cards are counted as the numeric value shown on the card. After receiving their initial two cards, players have the option of getting a "hit", or taking an additional card. In a given round, the player or the dealer wins by having a score of 21 or by having the highest score that is less than 21. Scoring higher than 21 (called "busting" or "going bust") results in a loss. A player may win by having any final score equal to or less than 21 if the dealer busts. If a player holds an ace valued as 11, the hand is called "soft", meaning that the player cannot go bust by taking an additional card; 11 plus the value of any other card will always be less than or equal to 21. Otherwise, the hand is "hard".

(taken from http://en.wikipedia.org/wiki/Blackjack)


Each card is given a value, which is its face value. The picture cards Jack / Queen / King are all 10 points each and the ace is 1 or 11  (depending on variant of game rules you choose).

-----------------------------------------------------------------------------------------------------------------------
Probability

To begin with the basic laws of probability are as follows:
Coin - two sides
Say for example we toss a coin - there are two sides to a coin, meaning that there are two possible outcomes, heads or tails.

We say that the probability of the coin landing H is ½.

And the probability of the coin landing T is ½.Dice - six sides
When a single die is thrown, there are six possible outcomes: 1, 2, 3, 4, 5, 6.


The probability of any one of them is 1/6.
In general:
Probability of an event happening =

Number of ways it can happen
divided by
Total number of outcomes
Example: the chances of rolling a "4" with a dieNumber of ways it can happen: 1 (there is only 1 face with a "4" on it)Total number of outcomes: 6 (there are 6 faces altogether)
So the probability =  1
6


Example: there are 5 marbles in a bag. 1 is red, 4 are blue
What is the probability that a blue marble gets picked?

So the probability =  4  = 0.8
5

Number of ways it can happen: 4 (there are 4 blues)Total number of outcomes: 5 (there are 5 marbles in total)




The Probability Line
The probability line can be used to show how likely an event is to happen, However our estimation is not a certainty - it is just a guide. If we were toss a coin 100 times to try and get heads, we could probably estimate that we would get 50 times heads - each side, heads or tails has an equal chance of appearing. However in practice we would probably get heads around 50 times, say 48 or 55.

We can apply certain terminology to help us:
 
Experiment or trial: An action where the result is uncertain
Sample space: All the possible outcomes of an experiment
Sample point: Just one of the possible outcomes
Event: The result of our test or experiment.

In terms of applying these to my games project, a blackjack card game, we can use the following definitions:

A sample space - All 52 cards in a deck
A sample point - The 5 of clubs is a sample point. The King of Clubs is not, as there are 4 different Kings that are 4 different sample points.
Event - Choosing a King from a deck of cards, any King at all, is an event.



Example: the chances of picking any one number card from a set suitNumber of ways it can happen: 1 (there is only 1 card with a designated number / suit value on it)Total number of outcomes: 52 (there are 52 cards altogether)


So the probability =  A 1 in 52 chance of drawing the card


Example: the chances of picking a king
Number of ways it can happen: 4 (there are actually four cards which are King cards)Total number of outcomes: 52 (there are 52 cards altogether)

So the probability =  A 4 in 52 chance of drawing the card



----------------------------------------------------------------------------------------------------------------------
Rules Of Blackjack


http://www.bicyclecards.com/card-games/rule/blackjack
I found this article online which explains Blackjack rules in quite a simple manner.

As far as I can tell, this is how the game should work in terms of what I am aiming to create:


1) The dealer deals a card to each player, going clockwise.
2) The dealer deals himself one card which is face up.

3) The dealer deals a second card to each player.
4) The dealer deals himself a second card which is face down.
-----------------------------------------------------------------------------------------------------------------------
A second idea may be to make 52 objects in game maker and give each a variable value along with graphics. This would be easier to track in terms of card values, but possibly more difficult to randomize. Nonetheless, I recall in my last project that a list of objects could be randomized and displayed on screen. Possibly the two methods could be fused together?

Objects can also have animations applied to them - this will help bring the deck to life on screen: card back, card flip, etc.

I will begin by making a list of  52 cards. to work with in game maker.

I have initially used graphics found online to get started. I will replace these with my own graphics later on.


-----------------------------------------------------------------------------------------------------------------------


Assignment day two - 18/3/2015

The basic strategy for winning at Blackjack

Winning tactics in Blackjack require that the player play each hand in the optimum way, and such strategy always takes into account what the dealer's up card is.

When the dealer's up card is a good one, a 7, 8, 9, 10-card, or ace for example, the player should not stop drawing until a total of 17 or more is reached.

When the dealer's up card is a poor one, 4, 5, or 6, the player should stop drawing as soon as he gets a total of 12 or higher.

The strategy here is never to take a card if there is any chance of going bust. The desire with this poor holding is to let the dealer hit and hopefully go over 21.

Finally, when the dealer's up card is a fair one, 2 or 3, the player should stop with a total of 13 or higher.







Why is this exactly?

Let's look again:


If the dealer's card is a 
 good one, a 7, 8, 9, 10-card, or ace for example, we have to assume that the card face down is a good one that will take them to a maximum of 21 (10 here is the best card).

If the face up card is a 7, 8, 9 or 10 it is probably a good idea to assume that the face down card is an 11. This is the worst case scenario, so any scenario outside of that is a bonus. So with that in mind, each eventuality is as follows: 



Face up card
Face down card
Total
7
11
18
8
11
19
9
11
20
10
11
21

This is why the player should keep drawing until a total of 17 or more is reached, to at least compete with or beat the dealers hand. You can see from the table above that working to the logic that the face down card is 11, the minimum total for the player to beat is 18. That is why the player must reach 17 or more.



Now let's look at a poor hand:

When the dealer's up card is a poor one, 2, 3, 4, 5, or 6, the player should stop drawing as soon as he gets a total of 12 or higher.




Face up card
Face down card
Total
2
11
13
3
11
14
4
11
15
5
11
16
6
11
17



If the face up card is a 2, 3, 4, 5, or 6 it is probably a good idea to assume that the face down card is an 11. These are quite poor cards, so the player must keep drawing until they have reached a total of 12 or higher. This will guarantee that the player equals or exceeds the total of the dealers hand.

This in itself should determine when and why a player sticks or twists.



Assignment day three - 23/3/2015
With a soft hand, the general strategy is to keep hitting until a total of at least 18 is reached.
Thus, with a an ace and a six (7 or 17), the player would not stop at 17, but would hit.

The basic strategy for doubling down is as follows: With a total of 11, the player should always double down. With a total of 10, he should double down unless the dealer shows a ten-card or an ace. With a total of 9, he should double down only if the dealer's card is fair or poor (2 through 6).

For splitting, the player should always split a pair of aces or 8s; identical ten-cards should not be split, and neither should a pair of 5s, since two 5s are a total of 10, which can be used more effectively in doubling down. A pair of 4s should not be split either, as a total of 8 is a good number to draw to. Generally, 2s, 3s, or 7s can be split unless the dealer has an 8, 9, ten-card, or ace. Finally, 6s should not be split unless the dealer's card is poor (2 through 6).

Friday 22 May 2015

Unit 73 - Developing music and sound for one of my existing games.


Unit 73 - Developing music and sound for one of my existing games
By Dave Johnson

Initial plan
I have decided to create sounds, music and effects for my blackjack game. This is largely because the game is set on a pirate ship and involves villains, drama, the ocean and adventure. The game also has strong Celtic music influences and in terms of creating appropriate music and sound effects, this really appeals to me. As the whole game is set around a table on a ship, I think music that is dark, and dramatic would be really effective. I can imagine the various sound effects, voice acting and music echoing off the walls of the ship as the game progresses. All the characters are male, so I will providing any voice acting work myself.

In terms of a theme for the music, I will naturally be looking at Celtic, Irish and folk compositions and seeing how I can bring that kind of feeling into the game world.The other challenge will be to see how I can create music that is contemporary and mindful of trying to convey emotions in the game.



Producing music
Being a multi instrumentalist and having access to recording equipment, I plan to record original pieces of music for each element of the game. I will be using:

Acoustic guitar
Electric guitar
Mandolin
Keyboard
Drums / Percussion

I also have the added luxury of being part of a five piece band (Drums, Bass, Keys, Guitar and Vocals). It is highly likely that I will be able to employ the talents of my fellow musicians to create full, rich sounding music. The other advantage of this is of course that other musicians in the band specialize in particular instruments that I do not (Bass, Drums, Vocal). This should be really useful as they will be able to approach the sound from an angle that I would not have considered.

Game Synopsis
A blackjack game where the player must reach a certain amount of winning hands to complete the game. There will be four cpu players to compete against.


Genre
An puzzle or online card game.



Research and inspirations

In movie terms, the following films offer a huge mine of inspiration. Below are some excerpts from soundtracks that I found really relevant and interesting.

Cuthroat Island: https://www.youtube.com/watch?v=M-UMVKw46lk

Pirates of the Carribean: https://www.youtube.com/watch?v=waW6gnA2t-I


Black Sails Theme tune: https://www.youtube.com/watch?v=WMSoo4B2hFU


Treasure Island Theme: https://www.youtube.com/watch?v=sotU2s7HXFc






Sample rate
The sample rate of these recordings will be as high as possible. I want the sound to be crisp and clean with the fact that it may well be compressed taken into account.


Stereo/mono
As the game will be played on computer monitors it will be recorded in stereo.


Audio storyboard
I may well decide to sketch out the key visual points of the intro / game / end sequence. This would likely be similar to a film script or storyboard - a visual sequence of pictures annotated with audio cues, notes, etc.
The audio storyboard will be a sequence of images that have accompanying notes next to them describing where and why the music is introduced. In gaming terms this storyboard could give an indication of what will happen when the player is above ground, below ground, in an enemy base, in the wilderness, involved or boss fight,etc.The notes to the storyboard would probably cover ideas such as mood and atmosphere:

"eg:Game Intro - Calmly lilting theme tune accompanies an image of a boat on the ocean and reflects the open sea breeze and waves "

Other examples on the audio storyboard could be:

"Main game screen: Tense atmosphere from the music as all the men try to outdo each other in the card game."


If the storyboard is in a digital format such as an audio demo on a Garageband timeline, the timeline may well be annotated to show what happens when in the level. This gives the listener of how the narrative unfolds via the music throughout the level.


File storage
Music and sound effects are generally recorded on a portable device such as a multi or single track recorder or a computer application. These will be saved onto SD card as a high res sound files. These files are then transferred via USB cable, WiFi or card reader to the developer's working copy of the game.
The file storage for the music and sound will likely relate to a folder in the game's file structure. It is likely that music soundtracks will exist in one folder, while sound effects will exist in another. These may well be grouped into sub folders that relate to each level.
These folders will exist on the user hard drive if they have downloaded the game directly to their machine. If the game has been supplied on disc or cartridge, the files will exist on those storage mediums, again in a folder structure that can be read by the console.


Naming conventions
The naming conventions will likely be file names such as mp3, acc or ac3. These are all files that will be compressed to make them smaller but retain a degree of sound quality These will be referenced by the game's code.

Production planning
Planning the production of the music would involve making sure you have all of the necessary equipment and personnel to produce the piece. Ensuring that you have the relevant facilities to record sound as well as the relevant software to edit it afterwards is important to getting the piece right.


Quality assurance
Quality sound is essential to making sure the music or FX don't sound muffled or unclear. Quality assurance comes from using the right methods to record the sounds as well as saving it in the right file format.


Sound effects
The kind of noises I may need initially are:

WInd
Rain
Waves
Ships Bell
Cards being shuffled

Script and voice acting




Making the music

‘High Seas Blackjack’ - Opening title screen

As the theme playing in the background of the main game is quite dramatic and tense, I decided that I wanted a direct contrast on the title screen. I knew that I wanted an image of a ship at sea against a blue cloudy sky. The ocean would be vast and brilliant, stretching back to the horizon and hopefully conveying a sense of scale to the viewer. I also loved the idea of communicating to the viewer an idea of peace and calm on the sea, despite it being a pirate ship.
I was inspired to write a gentle piece of music depicting the calm of the air and splash of the waves against the bow of the ship. By this point in the production of the music, I had decided that the instruments themselves should be recognizable characters, and fitting to the time period. I imagined what these instruments might be and chose strings, woodwind, classical guitar and percussion instruments. Having some musical knowledge, I already had an idea of how to construct chords and melodies; I knew a little about the classical genre and decided a mixture of this and a celtic influence would be highly appropriate to a pirate theme. In my mind I was influenced by the thought of films such as ‘Pirates Of The Caribbean’ and ‘Cutthroat Island’. Musically I thought of bands like Clannad, an Irish group who famously wrote the music for the 80’s TV show ‘Robin Of Sherwood’.

When I was thinking about the melody, I thought it appropriate to insert a small phrase communicating the danger and drama of a pirate's life. This is why in the middle section, the melody switches to a more ominous minor key, before working it’s way back into more optimistic major phrasing.

In terms of software, I leant towards Garageband. This was largely because my method of composing sound involves recording small musical fragments and turning them into samples. Many of these samples will sit on a single layer, forming a melody from one instrument. These layers are then built up accordingly to create full, rich sounding music. I also like Garageband for the following reasons:

1) I can ‘see’ sound visually on the screen and get an idea of where it is quiet and needs building up and vice versa. I can track the development progression of a song and decide where to take it, what to add and what to subtract based on the flow of the waveforms on screen.
2) I have full control of reverb, echo, fade and where instruments are overall in the mix.
3) I can layer instruments and blend layers up to a max of 20 layers which is more than enough for my purposes.
4) It is a simple task in Garageband to edit sound by trimming the edges of the waveform, selecting a section and copy and pasting or deleting.
5) The fluidity and ease of use in Garageband means I can shift waveform samples to anywhere in the timeline, creating precise musical and rhythmic effects.
6) In terms of playing live instruments, I can plug my guitars directly into the mac. I am not a drummer, but can produce complex drum tracks by recording short rhythmic phrases and stringing them together. Over time I can build a rhythm that can sound like a full drum kit or multiple drummers playing at once.

In terms of output, Garageband can record for stereo and mono devices. With my aiming to produce a piece of music for a web based game, stereo would be my preferred option. Garageband produces high quality MP3 and AIFF files which means I can get crisp sound and quality audio output from my files. I had already done some research and experimentation in a previous assignment and discovered that MP3 is the most widely accepted format in browsers for online games. As I want all players to hear the sounds I have recorded to maximize their experience of the game, MP3 is what I will aim to record in. They are small compressed audio files that retain good quality at a condensed file size.
In terms of files, my naming conventions were based on where it will appear in the game - for example the fanfare that plays when the player wins is called ‘blackjack_victory.mp3’. Losing will trigger a file called ‘blackjack_game_over.mp3’. The point being is that relevant pieces of music should refer to the correct area of the game to avoid confusion.



Constructing the title theme
titles_1.jpg
As I mentioned above I wanted the game to open with a gentle lilting piece of sea inspired music. Using a plug in keyboard in conjunction with Garageband, I composed a classical guitar phrase to open up the piece of music. I was able to copy and paste a short phrase to repeat with the intention of it eventually flowing into a second phrase later in the song. These  copied and pasted guitar phrases were merged into a single layer.

titles_2.jpg
Deciding that it would be nice to ‘thicken’ the fragile guitar sound, I recorded a rhythm piece to sit under the original melody.

titles_3.jpg
Knowing that the song had to build and ‘go’ somewhere, I recorded a minor key phrase. At this stage, I was unsure where it would come in, I only knew that I wanted it to directly contrast with the major key opening. A major to minor progression is a good trick to use musically - it suggests a sense of ominous drama or a darker presence. This is always a good tool to use to stop the piece sounding too light or bland. I left it on a separate layer and went back to the opening major phrases, with the intention of fitting it in somewhere later.

titles_4.jpg
I decided that most good pirate themes use a string section to add a swell to the melody and a sense of scale and adventure. Therefore just after the opening classical guitar phrase I decided to introduce string under the guitar playing simple chords to support the melody and ‘thicken’ the sound.


titles_6.jpg
It seemed like a good time to bring in the minor key middle phrase, so used the strings to blend one part into another. At this point, I also had the idea of using a small piece of absolute silence to enhance the impact of the minor phrase entry. This also has the effect of providing a contrast to all the music.


titles_7.jpg
Another good trick to create tension and drama is a single repeated note. Under the complex sounding middle piece I just stabbed away at the ‘A’ key on the piano. This repeated tone creates a nice rhythmic counterpoint to the ascending Am phrase and is a nice audio surprise to the listener. It means yet another instrument has briefly entered the composition to create a feeling of layers, mystery and of course, contrast.

titles_8.jpg
I wanted the song to end on a high and compel the player to look further into the game. Games should be fun and I wanted the player to feel encouraged to continue and play on. There is a subtle psychological  art to using sound to create a welcoming environment for the player. Sound in games can be used to settle the player in as well as educate them as to how to play. This education can be carried out through the use of audio cues which the player consciously or unconsciously picks up on.
In the case of my piece of music, I decided to end on the major phrase that began the piece, making it simple, cyclical and able to repeat itself ad infinitum. I was happy with this as the song theory seemed to make sense, making it reach a natural ending.
I went back and looked over the piece and realised there were points where I wanted it to blend more seamlessly between instruments. For this reason, I recorded a small phrase using a flute and used it sparingly throughout the song to join pieces. It was intended as a subtle effect but also to link to the main piece in the blackjack game room. That piece is quite flute orientated, and I thought it would be nice to refer to it in this intro theme, albeit to a lesser degree. One of my intentions for the music collectively was to create a family of instruments that become familiar to the viewer. Rather than using lots of random sounds and instruments, I made the decision to stick with several well chosen ones and re use them. This would not only create a strong, cohesive audio identity for the game but also help the player to feel fully immersed in the pirate theme the game is aiming to create. You can see the flute in use on the light green layer above. As you can see from the notes on screen it is very short and only crops up occasionally to subtly join sections together.





‘High Seas Blackjack’ - Main game screen
For the atmosphere in the main game screen, I wanted it to sound tense, dramatic and suspenseful but also recognisably pirate like. I aimed to achieve this by producing a piece of music that was a little like an irish jig or celtic folk tune. I knew that this would involve the use of a flute and percussion instruments, both of which I could produce through Garageband. The drama in the piece would be produced by a writing in a minor key with a pounding rhythm behind the melody. Adding presence and reverb helps to create the sense of a large echoing environment such as a ship. I have watched a number of pirate movies in my time and have always been struck how certain instruments clearly communicate the time period and life of a high seas brigand.

Sticking with certain instruments and using the same ones from the title screen also helps to creative a cohesive audio identity.

I had a very precise picture in my head of how the sound would contribute to the images in the game. My thought was to try and paint a picture of shifty, mistrustful shipmates playing in a smoky atmosphere below decks. I wanted the music to describe tension in the room, but also a kind of spirited adventure.

I decided to use Garageband, not only because I could piece together a complex sounding rhythm track, but also for the tools and editing reasons named in the section above.

Constructing the main game background music

celtic_rhythm_a1.jpg
To begin with, I created a rhythmic track of pounding drums. I was fairly adamant to myself from the outset that I wanted the drums to build and be layered. Rather than trying to record a whole minutes worth of drums at once (this could lead to inconsistencies in the rhythm), I recorded small sections at a time and put them one after another on the timeline. In the picture above, you can see I have recorded the initial drum phrase and then duplicated it.



celtic_rhythm_a2.jpg
I could then extend, shorten or re use this phrase as much as I wanted to, knowing it will always fit. What you cannot see from the picture is that I used the in built metronome for rhythmic accuracy.
 

celtic_rhythm_a3.jpg
Underneath the initial rhythm I decided to bring a simple percussive noise to accent certain points in the rhythm and create a building, layered sound. The idea of building was important to the concept of the game as I the player to get a sense of tension building within the room.

celtic_rhythm_a4.jpg
After a few bars, a second accenting sound enters the song. This was a snare drum roll I found that seemed to fit perfectly with the idea of pirates at sea, as well as being slightly menacing. You can see in the picture above how it was arranged and applied underneath the top most rhythm layer. Incidentally, at this point I was still using the copy and paste technique to accurately arrange the sounds on the timeline.


celtic_rhythm_a5.jpg
I decided to work to a similar principle as the first piece of music I recorded - to have a section in the middle of the song where there is a little more quiet and a change in melody. Continuing to work on the drum parts before the melody, I again used the copy and paste technique to arrange a new drum phrase. You can see in the picture above that I have created two new layers and am arranging the new drums to follow neatly on from the initial intro section. This is done by sliding the recorded phrases left or rights on the timeline so they follow sequentially.


celtic_rhythm_a6.jpg
I wanted to create accents in the middle section using the pound of a low rumbling bass drum, which you can see me arranging here on the light green layer.


celtic_rhythm_a7.jpg
Again using accents, I wanted to create some in an upper sound range, not booming like the bass drum, just the simple tap of a snare. By now, all this layering was creating a full sounding and rich effect.


celtic_rhythm_a8.jpg
And from here, back into the phrases used in the  initial opening section. At this point, I was thinking of how I was going to end the piece. Making it end on the rhythm it began in made sense, since that would make cyclical and able to repeat ad infinitum in game.


celtic_rhythm_a9.jpg
From this point on, I began to think about melody, first putting a drone underneath everything. This lends itself to a menacing atmosphere and a sense of drama, a little like a brewing storm.





celtic_rhythm_a10.jpg
To make the piece characteristically celtic, I decided to incorporate a riff played on a flute that repeats at certain points throughout the song. I felt this would create a jaunty, nautical atmosphere and give the player something to break up the repetition of the drums. In the screenshot above, you can see me arranging the notes and melody to sync with the beat. The flute is used subtly and briefly on the title screen, so it already exists in the game’s musical language. Here I wanted to give it more prominence and a greater role. Woodwind, strings and percussion would have been used on a pirate ship so I thought these instruments had a great deal of relevance.


celtic_rhythm_a11.jpg
In hindsight, I felt the middle section needed something more. I originally recorded another flute part, but felt that a) it was becoming overused and b) what I recorded didn’t quite fit the rhythm. I decided to go simple and added some stabbing chords to create a musical contrast. I chose to use a string section and imagined an orchestra of violinists putting drama and energy into the quieter middle section. Sometimes I find that imagining scenes visually helps to clarify what it is I am trying to get out of the music - in this case a sense of the high seas and the waves.


After all this work recording the parts, I naturally wanted each one to sound the best it possibly could in the mix. I did this by playing with the volume, reverb and left-right pan of each instruments, to make some subtle and some key to pulling the song along.

In Garageband, the left-right pan and layer volume are the circular dials in the left hand layers column. The reverb is found by clicking the edit tab on the right. ‘Wet’ reverb is achieved by sliding the switch all the way to the right. This soaks the instrument in echo and atmosphere, as if being played in a great hall. ‘Dry’ reverb is achieved by sliding to the left, creating more of a flat, mono effect.




Victory and failure themes
As mentioned above, I felt it would be a good idea to have distinct audio cues that educate the player when they have succeeded or failed. These pieces of music are vital to the players learning and progress. Creating sounds that praise or commiserate them allow them to know exactly what they have to do to win at the game. In the case of this Blackjack game, I decided on the following:

1) A victory theme of around 8 - 10 secs when they get a winning hand.
2) A failure theme when they lose the game to another player
3)  A bust theme when they go over the 21 points limit.

The only brief I set myself for these pieces of music was that they should be fun to listen to, even when the player loses. I want them to have another go at the game, so it’s important that they feel they are being gently educated rather than reprimanded. Of course everything still had to have that high seas adventure feel to it in order to be consistent.

victory_a1.jpg
The victory theme brings together strings, drums and a horn to make a crashing ensemble. It is loud and deliberately bombastic to lift the players spirits and congratulate them. I did this on purpose as much of the in game theme is quite sombre sounding. I wanted a distinct audio cue that would let the player know that they have succeeded and more of this noise will win them the game.
.




game_over_a1.jpg
The game over theme is designed to be sad and optimistic sounding at the same time. Sad because the player has lost the game and I wanted to communicate the idea that all hope is lost. Optimistic because I used a musical trick at the end of switching from a minor chord key to a major chord in the same key (in this case A minor to A major). This has the effect on the player of commiserating them but optimistically spurring them on to have another go and hopefully win next time.

Both this and the victory theme were designed and written to be short, punchy and dramatic, and would not take up too much of the player’s time. My idea was that I wanted the flow of the game to keep moving, and long pieces of incidental music would break this flow. Although it is a short, small game I still want players to be entertained and intrigued by it and not bored, however short a time they spend.

There is also a bust theme that is just a deliberately discordant noise, indicating failure.






I used Audacity to mix sound effects such as wind and waves under the title screen theme. You can here this in the video below.


Incidental speech
As the aim of the game is bet against the dealer, I felt that the dealer should have a distinct personality. This also directly adds to the effect of the game communicating directly with the player and forming a relationship with them. I wanted to create a fairly stereotypical gruff pirate voice with a hint of a Cornish accent for some in game humour. The dealer will speak at the following times with the following quotes:

Beginning of game: ‘I’m dealing - are you in?’
Win: ‘Looks like lady luck is on your side!’
Lose: ‘Looks like it’s just not your day.’
Draw: ‘It would appear that we’re even.’
Overall win: ‘Ha, ha, congratulations!’




Incidental sound effects
I also recorded a number of sound effects to add to the illusion of being at sea / on a ship / in a card game. All sound effects were recorded by me vocally using Quicktime, then adding reverb and effects via Audacity. I recorded the following to loop under the main theme on the title screen:

Wind
Waves
I recorded the following to be played under the main track in the main game:

Creaking wooden boards
Shuffling cards (produced by flicking through the pages of a book close to the mic)

Using Audacity I was able to convert files to MP3 and bring them down to a small file size.





Evaluating my work
I really feel that  my initial plan of recording sounds for a pirate themed blackjack game was a genuine success. With regard to writing my own music for the two main themes, I was set on originality and not using anyone else material. I have watched movies and listened to traditional Celtic music and knew that there is a certain feel and genre to illustrate a pirate atmosphere.

I think in terms of how I used Garageband, and particularly how I recorded all the parts on a keyboard, I was very successful. Guitars are my main instrument and I was going to bring one in and recorded directly into the Mac. However I think that this process may have been more time consuming and would have left me more open to being sidetracked musically. By this I mean I am a largely improvisational player and and lucky in that I have the knowledge to have many ideas in any one given situation. My knowledge of the keyboard is lesser, but in a way this was an advantage. Lesser knowledge means I have limitations and can thus work quicker. This was certainly helpful when being tasked with 3 hours to start and complete one piece of music.

I would have liked to have maybe used other software such as Soundforge, Cubase or Adobe Audition. I think the reason I didn’t is largely to do with time limitations - I knew I had a lot of ground to cover and did not want to get tied up in figuring out problems and wasting my time. Garageband is software that I am extremely familiar with and I also happen to think it is very good.

If I were to try and improve on what I had done, and time was less of an issue, I would have given all of the individual computer opponents a voice and personality. I think this would have created a far more intriguing atmosphere and expanded the game world. What I have in mind is if all the pirates had a different personality; one could be quite severe, another humorous, another maybe a bit dim. Obviously that is a great deal more work required, and also a much larger overall file size for the game.

I would have liked to have recorded even more sound effects too. Maybe gulls overhead, the chime of a ship’s bell, crew working on the deck in the background. It would have created the illusion of a larger game world, but at the same time maybe would have led to competition with the music. Competition may have confused the player and lessened any emotional impact. I think the music is the strongest aspect of what I produced as it covers a range of emotion, from calm and solitude to tension and drama. The incidental music was also a success, clearly communicating key events to the player.      


Music and sound effects
Title screen theme with sound effects (sea, wind, creaking of planks)


Main game theme with speech and sound effects-
Please note this is a version of the game that represents a work in progress.







Title screen theme





Main game theme


Player wins



Player loses - Game over
 
Player goes bust - Loses



Here are most of the dealer character's spoken voice phrases (there are two others that can be heard in the above video - 'Looks like it's not your day', and 'It would appear we're even')

Dealer voice - 'Are you in.....?'


Dealer voice - 'Lady luck.....'


Dealer voice - 'Congratulations....'


Sound effect - shuffle


Sound effect - creaking planks



Sound effect - wind
Sound effect - waves