Dev Blog

Thesis Terms: Game Mechanics and MDA

January 13, 2019

Defining Terms for Thesis Research

Focus on MDA Terms

Game – “Type of play activity, conducted in the context of a pretended reality, in which the participants try to achieve at least one arbitrary, nontrivial goal by acting in accordance with the rules” [4] p.1 Mechanics – describes the particular components of the game, at the level of data representation and algorithms [1] – various actions, behaviors, and control mechanisms afforded to the player within a game context [1] – the rules and procedures of the game [2] p. 40 – elements of the game; “rules of the game” [2] p. 138 – methods invoked by agents for interacting with the game world [3] p.1 – “the rules, processes, and data at the heart of a game” [4] p. 1 Dynamics – describes the run-time behavior of the mechanics acting on the player inputs and each others’ outputs over time [1] – “runtime behavior(s) of the game; when players interact with the rules, what happens?” [2] p. 138 Aesthetics – describes the desirable emotional responses evoked in the player, when she interacts with the game system [1] – emotional results generated from the game [2] p.138

References – [1] R. Hunicke, M. LeBlanc, and R. Zubek, “MDA: A Formal Approach to Game Design and Game Research,” p. 5. – [2] Z. Hiwiller, Players making decisions: game design essentials and the art of understanding your players. New York? New Riders/NRG, 2016. – [3] M. Sicart, “Defining Game Mechanics”, The International Journal of Computer Game Research, vol. 8, no. 2, pp. 15, December 2008. – [4] E. Adams and J. Dormans, Game mechanics: advanced game design. Berkeley, CA: New Riders, 2012.

Unity Basic Enemy AI Patrolling

January 12, 2019

Unity Basic AI

Patroling

Youtube – PATROL AI WITH UNITY AND C# – EASY TUTORIAL

This tutorial just sets up a basic patrolling AI where empty gameobject waypoints (called movespots in the tutorial) determine the enemy’s movement. It used an array of positions which contained all the possible waypoints, then randomly selected between them and moved the enemy there. This movement isn’t particularly useful for much, but it showcased a basic waypoint system well enough.

This tutorial actually attempted to correct the issue I brought up from the previous tutorials in my last blog where they were using if statements that ended when a position exactly equaled another position, which was very susceptible to math errors. They even used my quick (but still not great) work around of using distance and “less than” to set a small acceptable range to account for these small math errors.

Unity Basic Enemy AI Following and Spacing

January 11, 2019

Basic Unity AI Tutorials

Player Following and Spacing

Youtube – AI TUTORIALS WITH UNITY AND C#
Youtube – SHOOTING/FOLLOW/RETREAT ENEMY AI WITH UNITY AND C# – EASY TUTORIAL

By: Blackthornprod

This first video used the Unity command “MoveTowards” which I thought was giving me some issues so I just created my own follow AI using simple vector math (this was a good opportunity to brush up on vector math again). It turned out everything was fine and both ways worked, but I like really knowing the math behind what my objects are doing. The addition of a stopping distance so the enemy stopped moving towards you at a certain distance was a nice extra touch that’s very easy to add with a simple if statement tied to distance between player and enemy.

The second video was a bit more interesting by having the enemy have 3 ranges: vary far away, away, too close. At very far away, it moved closer. At away, it stayed in position. At too close, it would move away from the player. This could be a good setup to test setting up a small state machine to get practice using those with AI. I could have each of those be a state and use an enum switch case setup to decide which action the enemy should use.

This was also a nice little refresher on instantiating projectiles, although the logic for them was strange and bad. The projectileScript class would get the position of the player and then end at that position. This was then “remedied” in the tutorial by having it destroy itself when the projectile position was equal to that original target position, but math errors were preventing them from EXACTLY matching the value for me, which kept them from being destroyed. As a quick solution, I just changed the if statement to occur when the distance between the projectile’s position and the target position was less than 0.1, so it just had to be pretty close, which allows for some math errors. I imagine this is not a great solution either though as calculating distance in Update for a projectile constantly sounds too aggressive computationaly.

Compiling List of Physical Phenomena for Game Analysis

January 10, 2019

Physical Properties to Observe in Games for Thesis

List of Physical Properties/Phenomena/Measures

I am compiling a list of physical factors that could be considered as the system or parameters to control/set for my thesis project. This will help me determine what factors I should be looking for in the games I am analyzing, as well as helping me develop a concept for the game to showcase the thesis design.

What are physical properties that could be coded as systems in games? Look for equations for general physical properties:

  • Force: Wikipedia – Force
    • F = dp/dt = d(mv)/dt
    • If mass remains constant (which it generally does in most normal physical instances), this can be changed to the more well known F = ma (because dv/dt = a) [1]
    • F = ma
    • Gravity
    • Magnetism
    • Thrust – increases velocity of object
    • Torque – produces changes in rotational speed
    • Mechanical Stress – distribution of forces through extended body where each part applies force to adjacent parts
      • Causes no acceleration of body because forces within body balance each other
      • i.e. Polybridge games
    • Friction
    • Equilibrium
    • Continuum Mechanics
      • Pressure – distribution of many small forces applied over an area of a body
      • Stress(?) – usually causes deformation of solid materials or flow in fluids
      • Drag – decreases velocity of objects
    • Elastic Force
      • Elasticity
      • Hooke’s Law = F = kx
    • Four fundamental Forces of Natures:
      • Gravitation
      • Electromagnetic
      • Strong Nuclear
      • Weak Nuclear

Energy: Wikipedia – Energy

  • “In physics, energy is the quantitative property that must be transferred to an object in order to perform work on, or to heat, the object”
  • Work = Force * Distance
  • W= ∫_C▒〖F∙ds〗(Equation from Word is a bit messed up)
    • Work is equal to the line integral of the force along a path C
  • Potential energy – stored by an object’s position in a force field
    • Potential gravitational energy
    • Electrical
    • Magnetic
  • Kinetic Energy – for moving objects
  • Elastic Energy
  • Chemical energy – caused by fuel burning
  • Radiant Energy – carried by light
  • Thermal energy – due to object’s temperature

Defining Game Mechanic

January 9, 2019

Resources for Defining Game Mechanics

Thesis Related

Citations
  • R. Hunicke, M. LeBlanc, and R. Zubek, “MDA: A Formal Approach to Game Design and Game Research,” p. 5.
  • E. Adams and J. Dormans, Game mechanics: advanced game design. Berkeley, CA: New Riders, 2012.
  • M. Sicart, “Defining Game Mechanics”, The International Journal of Computer Game Research, vol. 8, no. 2, pp. 15, December 2008.
  • Z. Hiwiller, Players making decisions: game design essentials and the art of understanding your players. New York? New Riders/NRG, 2016.

These are a few various resources that provide in depth descriptions of what makes a game mechanic. Defining this properly will be important for developing my game design methodology for my thesis.

AI Project Research – Looking for Inspiration

January 9, 2019

AI Project Research

GDC 2018 – AI Wish List: What Do Designers Want out of AI?

By: Raph Koster, Dave Mark, Richard Lemarchand, Laralyn McWilliams, Noah Falstein, and Robin Hunicke

GDC 2018 – AI Wish List: What Do Designers Want out of AI?

I’m bringing back a video for reference to try to come up with an AI intensive project. There are lots of quotes and the notation is very note-y, just using it to keep track of points of inspiration.

Laralyn mentions that she wants AI to be able to acknowledge that what the player is doing is unique. The way they are playing is differentiating from what is expected, and it should be noted by surrounding characters. Could we apply a type of “physical constraint” concept to this to help accomplish this goal? Physical constraints mathematically map out what an equilibrium should be, and then apply forces/actions to bring things out of line back to equilibrium. Could we use this concept to perform AI actions when it acknowledges a player diverges from what is expected, the “equilibrium” of the player experience?

From Raph Koster, “…building characters as props that are primarily reactive, and if we want to exploit AI, they need to have their own inner lives, out of which this stuff rises organically.”

”Heartificial Intelligence” – giving NPC’s empathy; Have deeper version of Sim system. Users more interested in “broken” characters with flaws. A dog that is scared of people now and is harder to train. Problem with Sim system was that every object had to echo out how it should affect an NPC, and they all needed to interact with each other so adding things to the system was very difficult(?).

Time Stamps: (0:49:40 – 0:51:18) : AI can be recursive and add detail. “…Can you do that but in a way that is data rich, instead of just going for ‘no let’s plot thousands of trees’, how about when I go look at that tree it’s way more detailed. Now there’s an ecosystem in that tree. Now there’s a burrow in this one and the gophers live under that, and there’s a woodpecker in that one. That’s the kind of detail we will never ever be manually able to do. We just can’t afford it, it’s ridiculous. And it’s exactly the kind of intelligently constructed, realistic, responsive environment. You want the woodpecker to know there’s a gopher. I’m not talking just shallowly, again, it’s not just splatting the textures. Can we actually create a data rich environment? … it’s a fractal or segmented thing. We don’t need each tree to know about each tree. But we could do something really interesting within the tree… each one could have variations.”

Solaris example – it builds things from your memory; makes you miss being on earth

”…go to a foreign planet and you find an object, and when you look inside that object there’s more objects, and you look inside those objects; and then come up with a design of mechanics that are interesting from the exploratory perspective that’s very similar to when you’re a child. When you wander into your backyard, and then the woods there and you find a stream then you look in the stream and you see the tadpoles and then you poke the tadpoles. Think of it from a mechanical perspective, not an aesthetics perspective, and then you get the dynamics that are so interesting.

Decentralize player, other things go on without the player. Make the player feel proud of something else. Have an AI do something the player didn’t expect it to do. Going off of this: Have an AI that the player needs to “teach” it how to do something with their actions. Similar to “Clumsy Ninja”.

Various Video Tutorials – Tactics Programming and Game Design, Tilemaps with Hexagons, C# Enum, Sharing Between Classes

January 8, 2019

Video Tutorials – Programming and Game Design

Youtube – Unity 5 Tutorial Tactical Turn Based Game Part 1 Basic Grid Movement

More turn based tactics game programming to learn another way to approach them, as well as get further into actions and combat.

Youtube – MAKING ISOMETRIC TILEMAPS in Unity 2018 | Beginner’s Guide (Tutorial)

This is just a simple tutorial showing how to use some new Unity features for dealing with hexagonal tile setups and isometric tile maps.

Youtube – Final Fantasy Tactics & Combat Initiative Systems | Game Design Guide

This video goes over some terminology and game design pros/cons for different ways to approach tactics combat systems.

Youtube – The Key to Making Turn Based Games! – C# Enum Tutorial

This video explains the basic concept of using a simple enum for setting up states for a turn based game. There are more links to all of the code included as well.

Youtube – Easiest Way to Share Behavior Between Classes in Unity – C# Interfaces Tutorial

This is a general programming tutorial for a way of sharing behaviors between classes in Unity.

Pawel Margacz – Generalist to VFX Artist – Learning VFX

January 7, 2019

Good Sources to Learn About VFX

80.lv – Link to Description

A quick write up by Pawel Margacz on how they got into VFX and how to learn the art. This included a few good youtube channels to follow to get helpful tutorials.

Youtube Channel – Mirza VFX
Youtube Channel – Sirhaian’Arts
Youtube Channel – ErbGameArt

These three channels offer great tutorials and showings for VFX. Mirza in particular has Unity specific examples with all of the work needed in multiple softwares (such as creating images in Photoshop to use as base for VFX in Unity).

Procedural Generation in Game Design by Tanya X. Short and Tarn Adams

January 7, 2019

Procedural Generation in Game Design

By: Tanya X. Short and Tarn Adams

80.lv – Link to Book Cover

From the link: “Basically, it is a wonderful exploration of the thinking and practice behind procedural generation in games and the way it relates to game design.” This could be a good source to look into for exactly what the title says, procedural generation in games.

Recap – Week of December 30 to January 6

January 6, 2019

Recap – Week of December 30 to January 6

Terminology from Tactics Tutorials

Physics Constraints

Write Up on Physics Constraints by Hubert Eichner

A nice description of equality constraints, impulse and force based constraints, and other physics constraints used in games.

Priority Queue

Youtube – Priority Queue Introduction

Quick video by WilliamFiset on concept of Priority Queues and Heaps.

Heaps

Youtube – Heap Explanation

Quick video on concept of data structure of heaps, which was a follow up to the priority queue information above.

Subscriber Pattern (Observer Pattern?)

Wikipedia – Observer Pattern

Searching for subscriber pattern resulted in a lot of information on observer patterns, which may be another term for the same thing described in the tutorials. This will require further investigation.

Dictionary

C# Corner – Using Dictionary in C#

Nice, simple write up on basic functionalities of the dictionary type in C#. “A dictionary type represents a collection of keys and values pair of data.”

Youtube – Create a Dictionary Using Collections in C#

This is a basic video tutorial for setting up dictionaries and using them in C#.

Stacks

Tutorials Teacher – Stacks

Tutorial on setting up stacks in C# and some of their functionalities.

Microsoft Documentation – Stacks

This is the Microsoft documentation on everything about the stack class in C# with examples.

Queues

Microsoft Documentation – Queues

This is the Microsoft documentation on everything about the Queue class in C# with examples.

Youtube – How to Work with C# Queues

Simple tutorial initially from Lynda.com about using queues.