Flash – Case 8

Adding bonus objects (power-ups, health, etc.)

Time for the next case in the line – adding bonus objects to my game. I haven’t really thought much about bonus objects for the concept of my game, I didn’t take it into consideration at all when making the game-design, which obviously is flawed from my side. I don’t want to do something outrageous and innovative in terms of bonus objects and mechanics surrounding these bonus objects, I simply don’t think it’s approperiate for my game, but also because I feel I don’t have the skills required to add a very intricate system.

Case 8: In this case you have to add objects that the player character (PC) should pick up and receive points for. The points should be summed up and showed in a counter (Heads-Up Display). You also have to create some objects that the PC needs to avoid, when the PC hits these objects it should be indicated in some way.

Game Design (specific for this case): I want to keep the design and functionality of my game quite simple. Mostly because I think it suits the design-idea in my head, but also because I do not feel I am capable to add much more tham this with my current knowledge in ActionScript and Flash.

  • PC encounters an enemy (NPC), the PC kills the NPC, enemy drops a bonus object (health), PC receives additional health (HP).
  • Counter should show total health (simple HUD with icon/text).
    • If health is 1 and the PC loses versus an enemy or falls “out of” the level -> Game Over.
    • If HP is 2 (or more) and the PC loses versus an enemy -> Looses one HP -> Knockback effect to allow the player time to rethink the situation.
    • If the player falls “out of” the level (misses a platform and drops into the void) and has 2 HP (or more) then the PC should respawn at the start of the level.

I may include a timer, showing max allowed time for completing the level – when the time runs out, the game ends. Either that, or using a timer as a way to indicate score – less time used on completing the level awards the player a higher score when completing the game. I might add a timer feature if I have enough time, right now I just want to finish what’s vitally needed to make the game a game.

I’ve played around with some more ideas for my game, I’m not sure if I will be able to include them – but I want to let them out either way. The first idea I had was to add a multiplayer function.

Multiplayer concept

  • Local, each player assigned to a set of three keys on the keyboard)
  • Two players will be able to choose an attack before a timer runs out  (Rock, Paper, or Scissor)
    • When the timer runs out, the players need to have set an attack -
    • An animation plays out (scissor cutting paper, paper wrapping up rock, rock smashing scissor
      • Draw (equal attacks (would do nothing, perhaps animate the sprites in a clash before they get knocked back)
    • Score is added to the winning player
  • Best out of three rounds wins

The second idea is a boss-encounter at the end of the level, specifically a “clone” of the player character.

Boss-encounter concept

  • Able to randomly attack with either rock, paper, or scissor
    • Needs to somewhat be identified, but not too obviously, so the player in a way knows what to “counter” the attack with – like some sort of “Block” function. If the boss chooses rock – the player could choose either paper (to damage) or rock (to block/draw) to counter that attack
  • “Mimics” the player character in some way
  • Has a total of three lives, meaning you need to get a correct hit on the boss three times before you beat it

Difficulties: I’ve had a lot of trouble finding the approperiate code I need for the features to function like I want them to. I’m not sure how I can solve this, currently I usually need to find an example of the functionality I want to include in my game – look it over – then I try to assimilate the code with my own code. I sometimes also look up how a specific syntax works in either Learning ActionScript 3.0, or in Adobe’s Help section for Flash. I am also getting a lot of help from my neighbour, which is very good to have if I am struggling for too long on my own. Specifically with this case I had some trouble getting the attacks versus specific enemies to work, solving this seemed to be easier than I first thought it would be, but I got help to achieve the final result.

I’m still having a hard time understanding how different .as classes communicate with each other as well, Object Oriented Programming is a pretty tough nut to crack, but once the nut is cracked it’s beautiful and very “obvious” I suppose. I’ve still not understood it, so to me it’s still quite messy, but I hope I’ll get there.

Solution:

<updating>

Result: Visual Result, I still need to add a respawn function if you fall out of the stage. I also need to fix a proximity where you can attack the enemy. The source code behind my game will be uploaded and released when I’ve fixed these two problems.


About this entry