Tag Archives: bad guy object design

Bad Guy Object Design: Evil Bats or Relay or Light the Lamps

IMG_5539 The evil bats in Light the Lamps have three states: moving, attacking, and frozen. The bats start the game moving randomly around the screen – their “moving” state is their default state. They transition into their attack phase – which consists of shooting “globs” of red at the lamps on either side of the screen – when the player crosses over one of three invisible “trigger” lines that I’ve placed equidistant from one another. They enter their frozen phase when the player manages to grab one of the floating blue circular power ups that appear at random points throughout the game. The patterns of these bats are very reliant on player choice, which will hopefully make the game more interesting and playable. IMG_5542 (1)

Bad Guy Object Design

1 2 3 4   The goal of my particle game’s bad guy was to have him be harder to defeat as you started to defeat him. So in these photos I have my bad guy stages, as well as a couple different screens that show what my bad guy is doing and how he is reacting to certain situations. In order to make the bad guy more difficult, I used his health as a marker to make the bad guy smarter/harder. So, as we see in these state charts, the bad guy gets faster as well as spawns more particles as his health gets lower, culminating in “apocalypse mode” where the bad guy spawns a large amount of extra particles to make his last bit of health very hard to get rid of.

Bad Guy Object Design

The enemy showcases three distinct states – dodging, advancing, and recharging. When it is not doing one of these three, its “idle” state is steadily moving back and forth and firing shots at a rhythmic pace. IMG_4644 The enemy’s total health in conjunction with its quantitative distance from the player act to determine the frequency of when its states are called. For example, if the enemy’s health is low, it will attempt to recharge and strafe more frequently, but its distance from the player has the final say in whether the state is even executable. IMG_4646 With both variables interacting with one another, the state probabilities are in constant flux, simulating spontaneous behavior. I’m still unsure of what my exact formula will be to determine frequency, but I’m pointing in the direction of either a modulo timer with a changing limit or a randomizer with a changing scale (or a combination of the two). IMG_4648 IMG_4643

Bad Guy Object Design: Rabid Squirrels


Our squirrels have three different phases of difficulty within the game: basic, acorn, and mega. At first we thought that this might make our behavioral chart intricate and complicated, until we realized that the squirrels have the same underlying pattern despite the increase in difficulty that occurs. These basic states are: seeking the player, attacking the player, and fleeing the player.

These behaviors are each triggered by a transition value, which we will alter as the squirrels enter different states of villainy.


The first transition, from seeking to attacking, is triggered as the squirrel reaches a certain distance to the player. This value will be initialized as being quite close to zero, so the squirrel will have to be nearly on top of the player to attack, and will increase as the game becomes more difficult, so the squirrel can do damage from further away. The second transition, from attacking to fleeing, is triggered when the squirrel is sprayed with water by the player. This will begin at one squirt, and as the game increases in difficulty the player will need to hit the squirrel multiple times in order to defeat it. Finally, the transition from fleeing to seeking will be triggered when the squirrel is a certain distance away from the player. This will begin as a high number, so the squirrel will flee nearly to the opposite side of the screen. The distance will shrink as the game increases in difficulty, to add additional challenges for the player.