So looking at the rock paper scissors game i designed i wanted to make this for my flash game, Its alot more simplier than my orginal idea but i find flash quite difficult to code and i do better at the design part. So hopefully I can design something that works with good graphics to get a attractive result.
Classic Rock Paper Scissors is hand shapes in either of those objects, one objects beats one and one another. For my game i changed the images from Rock Paper Scissors to something more personal to me, seeing as i was doing this at University and begin to learn flash i thought itd be more fitting to add a Uni theme to my game and so forth came up with these graphics for my objects.
Ive choosen to do a Student, Drink and Degree. Student being the middle man which overcomes a degree or fails to drink such as Paper beats a rock but loses to Scissors. These Images where created using Adobe Illustrator CS4. So with my Graphics read i could begin setting up my stage on flash again.
My 3 selected able graphics at the bottom, the top where it has win lose draw i plan on having 3 counters to keep record and the text back in the middle while be a feed telling the player what the computer choose in respone to what the player choose and more importantly if they won or not. In order for information to be displayed in text boxs while have to be dynamic inorder to present the required information from actionscript.
So to set up the game im going to have to set up the variables to how the player will win and use random math to get the computer to randomly pick an object against the players. Then finally i will have to string the results into counters to keep record of the players score.
Heres my code...
as you can see i have set up function as a choice in order to get the variables to work on if statements to if the play picks this the result will be this if the computer picks that. I have used an Array to work out the choices that can be made between Student, Degree and Drink. So using the if statements I can generate all the possible outcomes of the game when each obeject is picked and pitted against another. Following this i have strung together my output dynamic text boxs to display the result to the user on screen if they have won, lost or drawn.
Result of the code working. And the computer using random math to calculate its choice. With the basics working i wanted to add a counter at the top as the grey text illustrates. I have the code implmeneted to string the results together for each time there is a win or a lose or even a draw and display it the text boxs above
They are greyed out with double // to prevent them being part of the code has i had real trouble getting them to work with the rest of the code, they would not display the stringed totals so i had to take them out to allow the game to work.
When i take the // out and try to play the code this is the error codes i recieve. Ive tried changing the names of the class, instances and even the coding but it keeps throughing up the same error. Its not reconising my objects and games as wins, loses or draws.
Evaluation
Overall I found this a real challenge as i do struggle with flash coding quite abit, so it was nice to get an end result in a game that does function and work. It would of been nice to get the counter work but whatever I try to make the code function it just throws up more errors. I would like to be able to create flash games like the black knight. But as i said i do struggle with flash and this is something i want to overcome because there is so much potential with flash and and some games i have seen are real inspirations to whats possible.
Flash Game With a TWIST
Monday, 31 January 2011
Wednesday, 26 January 2011
Development
So after looking into my outside sources i had a basic idea of how i wanted my game to look and feel when the user interacted with it. To get use to the code of flash we made a demo came, a small racing demolition derby game in which we learnt fundmental basics of flash and the code to make an object move around a select path of our choice and cause to be effected by the environment of the game. Heres an Example of mine -
Graphical View of the track and cars i Created
The Code "using functions" allows the user to control the car using the keyboard using fucntions for example
if (Key.isDown(Key.UP) && this["speed"+who]<_root.maxSpeed) {
this["speed"+who] += _root.acceleration; <Determines how quick the car will moved>
if (Key.isDown(Key.LEFT) && this["speed"+who]>0.3) {
_root["car"+who]._rotation -= _root.rotationStep*(this["speed"+who]/_root.maxSpeed);
<Determines which way the car should rotate when the left key is held down, Hopefully to the left. it controls how quick it rotates so essientailly it controsl the turn of how quick or slow the car will turn on its left>
Variables of the car to allow the functions to know how quick it should accelerate, slow down, turn and its top speed and breaking speed.
This tell the game when on load display the car as neutral with no speed waiting for the players input to the game.
After the derby game I started to create coding for the game I intended to make for my final flash game, I need a piece of code that would generate objects on screen. I wanted to use the tower defense game as an example but i wanted my enemies/opponents to be randomly generated on screen ready to be shoot down by the player.
The idea was to get the opponent who was a student in my case to randomly appear on the screen up to ten times in random positions between the stage boundaries. Everytime one opponent was shoot down another would take its place. However i really struggeld to get the opponents to generated, it never seemed to display the student. I tried changing the class Id names, the instance names but no matter what i tried i could not get the code to related to the student image i had drawn for the game. With this set back I looked back at other games and came back to the Rock Paper Scissors game and explored it .
Graphical View of the track and cars i Created
The Code "using functions" allows the user to control the car using the keyboard using fucntions for example
if (Key.isDown(Key.UP) && this["speed"+who]<_root.maxSpeed) {
this["speed"+who] += _root.acceleration; <Determines how quick the car will moved>
if (Key.isDown(Key.LEFT) && this["speed"+who]>0.3) {
_root["car"+who]._rotation -= _root.rotationStep*(this["speed"+who]/_root.maxSpeed);
<Determines which way the car should rotate when the left key is held down, Hopefully to the left. it controls how quick it rotates so essientailly it controsl the turn of how quick or slow the car will turn on its left>
Variables of the car to allow the functions to know how quick it should accelerate, slow down, turn and its top speed and breaking speed.
This tell the game when on load display the car as neutral with no speed waiting for the players input to the game.
After the derby game I started to create coding for the game I intended to make for my final flash game, I need a piece of code that would generate objects on screen. I wanted to use the tower defense game as an example but i wanted my enemies/opponents to be randomly generated on screen ready to be shoot down by the player.
The idea was to get the opponent who was a student in my case to randomly appear on the screen up to ten times in random positions between the stage boundaries. Everytime one opponent was shoot down another would take its place. However i really struggeld to get the opponents to generated, it never seemed to display the student. I tried changing the class Id names, the instance names but no matter what i tried i could not get the code to related to the student image i had drawn for the game. With this set back I looked back at other games and came back to the Rock Paper Scissors game and explored it .
Research
When i started playing flash games, it was on sites such as miniclip, I have known about miniclip for a while now as I first started using it in secondary school where work should of been taking place but didnt seem so appealing as playing a flash game, main games I would play on sites such as this are fighting, shooting and action games. one of favourite was a game called the black knight "http://www.miniclip.com/games/black-knight/en/"which essientially involved a RPG style game play engine with hack and slash being the fundemental game play, you would hack your way through levels destroying every object you could and then being rewared with money for each object destroyed. You could then upgrade your character with the money such as better weapons and powerups. Overall a very addictive game!
Couple of screenshots of the game in play:
controls where restricted to just mouse click and no movement, the player would only be able to attack using a mouse click and then selected what upgrades they wanted.
Screen Shoot of the MiniClip Webiste
Scren Shoot of flash games 247
Screen Shoot of the Newgrounds page
Newsgrounds is a site I came acrossed through playing miniclip, another archive full of flash games, it was better presented than miniclip and look abit more professional. Newsgrounds was abit more of a sharing site rather than just flash game based, it allowed users to upload creations such art, movies, audio and there own games.
When asked to create a flash game i wanted to create a shooter that was mouse driven, you clicked, you shoot, the enemey dies to be replaced by more, everytime you kill an enemeey the game gets more progressively harder. It would be a good chance for me to use my graphical skills and upload them to my techinical skills. The kinda idea i want to base it on is an old game i use to play called "Tower Defense" an example of the game can be found here "http://www.newgrounds.com/portal/view/102905".
The game involves the player to place towers/in this case monkeys along the path to shoot at the incoming enemey that follow the path, killing them all before they reach the end. Everytime its a seuccesful round you are rewarded with ingame money to upgrade your defences and the quicker and tougher the enemies become to kill.
Back in School a game called Rock Paper Scissors was main way on deciding who got what, who sat where, who got dibs. It was a chance game for deciding a winner. Heres an example of the game "http://www.newgrounds.com/portal/view/379766" Each player would count to 3 and make a hand shape to resemble a weapon of choice to win the game "a rock, paper or scissors" rock->scissors->papper->rock"
A simple game yet effective i think personally
Subscribe to:
Posts (Atom)




















