Three Hundred :: Mechanic #144 Sites:     Webcomics   |   Three Hundred Mechanics   |   Three Hundred Prototypes
 Three Hundred
   - Index Page
   - About...
   - By Year

   - Comp-Grid
   - Procedural
   - Tactics
   - Tiny Crawl
   - Misc

PreviousMechanic #144Next

  Mechanic #144 - Linear Card World 4 - Slasher Movie
Posted: 01/28/12

Stalk card AI-driven campers and murder them with a machete in isolation.

  Experiment 4/5




I'm doing a little experiment over the next few entries. I'm going to take a single structural mechanic and I'm going to build five different game concepts around it. For this experiment, the mechanic I have chosen is: A world map based on a series of cards laid end to end in a linear manner. Each card represents a room, which can contain pawns, chits, or markers representing game objects. There is no y-axis, at least in the typical concept of two-dimensional maps, making this a more restrictive mechanic than something like [#124 - Card Metroidvania].

  Slasher Movie

There's a live action game called "Assassin" (among many others) that is usually played in schools and on college campuses. Put briefly, all the players are given another player to assassinate. You can only kill your target, which you accomplish by being alone in the same room with them - usually there's nerf involved. Then you adopt his target as your next one.

There's a video game called "The Ship" which adds a cool twist to it. All the players have needs that they must fulfill. Like the sims, your character gets hungry and tired and has to use the bathroom. This forces you to leave the crowded areas and move into more secluded, more vulnerable, areas. You assassinations must occur outside the sight of the many security cameras and security personnel. (Unfortunately, the game isn't nearly as fun as this idea sounds).

While coming up with the previous entry, [#143 - Murder Train], I came up with a novel way of implementing NPC AI using cards. The idea was that it would be used to emulate the murder and to control the passengers during investigation. However, it is somewhat too clumsy to do something that complicated, but I thought to apply it to NPCs in a game of assassin. Unfortunately, assassin is somewhat dependent on hidden information, which you can't really have if you are controlling everyone simultaneously. However, you can play single player assassin, killing targets which aren't trying to kill you.

The end result is sort of a simplified version on [#140 - Vampire]. The game itself isn't really the focus of this entry, so much as the card-driven AI that makes it possible as a solitaire game.

  Camp Happy Time



Fig 144.1 - Summer camp is where dreams and nightmares are made.


This is a slasher movie, and you play the big bad slasher who wants nothing more than to cut up a bunch of promiscuous teenagers. The game takes place at a summer camp, and the game world is a bunch of cabins, woods, lakes, and locations like that. Similar to assassin, you are given target to kill, which you may only kill when you are alone in the same room with them. Once you kill your target, you draw another one, and continue on until the entire summer camp is filled with bloody, mutilated corpses.

Ultimately, this is a stealth game with a bit of predictive planning. The teenagers will wander around according to their AI commands, and it will be up to you to avoid them, stalk them, and ultimately find yourself alone in a room with them (and your trusty machete). Their AI is driven by needs, so you can manipulate their needs to draw them away from the pack. For instance, you can leave an open beer can around, which will cause their urge to use a bathroom to rise. Hide out in the bathroom and wait for them to come to you.

One particular need is of particular importance - their fear meter. As it grows, the campers become increasingly paranoid, fearful, or aggressive (each camper will respond differently). Each additional target you have to kill requires their fear meter to be slightly higher. So you can kill the first camper without problem. The second camper, you have to creep out a little. By the last camper, you'll need to terrify him well past the point of sanity before you can murder him. Satan loves his playthings.

  Autonomous Agents



Fig 144.2 - Rotation Card.


The backbone to this entire system is a card which is broken down into quarters, that you rotate. Each segment of the card above becomes "active" when it is at the top of the card's current rotation. There are four major states, and, in this example, two minor states 5 and 6. Each of the minor states are active for two rotations, and depending o the bisecting line's slope, you can control it.

In each of these boxes, game rules can be written. These rules can affect the card, by telling the player to rotate it clockwise or counterclockwise. Similarly, the cards are stacked on top of each other, and can push down a new card on top of it, or pop the current card off the stack (the card underneath resets to state 1 when it becomes active).

To give you a brief example, imagine an AI card dedicated to the goal of using the bathroom - an action that takes two turns. Here are the four states:

  • State 1 - Move one space towards the nearest bathroom. If in the bathroom, rotate CW.

  • State 2 - Using toilet. Rotate CW.

  • State 3 - Flushing and washing hands. Reduce PEE need to 1. Rotate CW.

  • State 4 - Exit bathroom. Pop.

    It is a very simple sequence of events. The first state could take several turns, as the camper moves towards the nearest bathroom. Once it is in the bathroom, it spends two turns waiting around, and finally, it exits the bathroom and pops the current goal AI card off the stack. If there was a card under it, like Get Laid, it is reset to state one and continues on the next turn.

    Goal cards can be a little more complicated by using rotations to do simple branching. For instance, the first state may simple choose between three possibilities and then rotate CW, CCW, or 180 to reach the other states. Similarly, sub states, like 5 and 6, are also active with the current state, so you may have two actions that you perform each turn (I picture substates being used largely to mark state change conditions). And finally, states can call for additional cards to be pushed down, causing some behaviors to be multi-goal, multi-state processes. For instance, Get Laid may have goal cards that involve finding a randy female, moving to a secluded location, getting busy, and then the walk of shame.



    Fig 144.3 - AI Needs.


    The AI cards are driven by the various needs the camper feels at any one time. These needs are driven both by environmental things and through a global state AI card that is activated at the beginning of each round. On this card, various needs will increment at various states. For instance, in states 1 and 3, the PEE need will raise by one, while in state 4, CLEAN will increase by one.

    Similarly, each camper will have a global AI card stack which represents the state of mind. It may do things like increase the HORNY stat or cause specific goal states to be pushed to the goal stack. Like if the goal stack is empty, the mind state may push a goal causing the camper to wander around, looking for beer. Like the goal stack, additional mental state cards may be pushed and popped on and off the stack.

    The needs themselves cause goal states to be pushed to the stack. If you'll notice on illustration 144.3, each need has three differently colored areas. These areas represent the intensity of the need and what you'll do about it. In the dark area, no goal cards are pushed at all. In the dark green area, the goal cards are only pushed if the goal stack is empty. And in the light green area, the goal cards are pushed, overriding only those goals from the needs above it. So, if hunger gets to the light green while the "find toilet" goal state is active, it will override it. However, if a goal state relating to Fear is active, it will not.

    And finally, every camper is different and will thus have different goal and mental state cards, giving them different behavior. For instance, the frat boy may have a "find toilet" goal state that just finds a place outside and pees on the floor, while the dainty girl will spend multiple turns in the girl's bathroom. More importantly, their fear states will be wildly different, as some campers try to fight back while others run for safety.



  • Copyright 2007-2014 Sean Howard. All rights reserved.