Posts

Showing posts from January, 2019

Concept for System for Generative Approach for Physics Based Games

January 31, 2019 Thesis - Generative System for Physics Based Games Concept Text Book Problem Generator My current thought on a system for developing generative processes for these games is somewhat like making a framework for problems in a physics text book. With the new system I’ve setup for directly tying physics concepts to these physics games (those lists of physics topics), I think I can relate a game’s parameters (those systematic game mechanic values) to the variables of the foundational equations corresponding to that same game’s potential learning concepts. Again, using Angry Birds as an example, let’s say “Impulse and Momentum” is a potential learning concept. A basic equation for momentum is (momentum) = (mass) * (velocity). Using this information, we can see that varying any parameters equivalent to or pertaining to the variables in this equation will require the player to “solve” the new “problem” presented to them by similarly varying their responses to the system.

Tower Defense Tutorial - Brackeys - Ep. 09

January 29, 2019 Tower Defense Tutorial Episode 09 – Missile Launcher Youtube - How to make a Tower Defense Game (E09 MISSILE LAUNCHER) - Unity Tutorial By: Brackeys Ep. 09 This tutorial covers making the Missile Launcher turret. A lot of it is the same as setting up the first turret, but it’s good practice to repeat the setup. It is extra useful for me because I am using Unity 2018.3 and there is a new way of working with prefabs so any practice with that is very useful. There is a keyboard shortcut for selecting a variable and changing its name across all instances within the script (and even other scripts). Use Ctrl + r + r, then just type the new name over the old one. SUMMARY VS Keyboard Shortcut: Ctrl + r + r : Lets you replace all instances of a variable (even across scripts) with a new name Just keep practicing with new Unity prefab setup Simple way of creating UI icon from last time worked well again here

Tower Defense Tutorial - Brackeys - Ep. 08

January 27, 2019 Tower Defense Tutorial Episode 08 - Shop Youtube - How to make a Tower Defense Game (E08 SHOP) - Unity Tutorial By: Brackeys Ep. 08 This tutorial begins to set up the shop UI for the tower defense game. Setting up the shop UI begins with adding a UI Panel to the Canvas. This was brought down to the bottom and set to stretch across horizontally with the anchors. Then a Horizontal Layout Group component was added, which helps deal with the organization/alignment of children UI objects within this UI object’s space. Those children UI objects are buttons, which are used to choose different turret options for purchase. Going along with the Horizontal Layout Group, all of the buttons had a Layout Element component added to them. This allows you to enter some information on things such as preferred dimension, min dimensions, etc. We used a quick and simple method to create a nice visual “button” so the player knows what tower is being selected to build. We went into

Tower Defense Tutorial - Brackeys - Ep. 06, 07

January 26, 2019 Tower Defense Tutorial Episode 06 - Turrets Youtube - How to make a Tower Defense Game (E06 BUILDING) - Unity Tutorial Youtube - How to make a Tower Defense Game (E07 CAMERA) - Unity Tutorial By: Brackeys Ep. 06 This tutorial covers the user interactions with the node spaces. We started with an OnMouseEnter and OnMouseExit methods. These simply changed the color of the node when hovering the mouse over the node object. A BuildManager script was created and added to the GameManager object in the game to help dealing with building turrets. We want to access this to handle the building of turrets. The BuildManager used a basic singleton pattern. To do this, we created a public static BuildManager variable called instance within the BuildManager script itself. This will effectively reference itself. In the Awake method, we just set instance equal to this. Building a turret just used the basic instantiation setup again. The only slight difference is that the nod

Tower Defense Tutorial - Brackeys - Ep. 05

January 25, 2019 Tower Defense Tutorial Episode 05 - Turrets Youtube - How to make a Tower Defense Game (E05 SHOOTING) - Unity Tutorial By: Brackeys Ep. 05 This tutorial starts adding the shooting logic to the turrets. It begins with a basic setup to have a fire rate/firing cooldown based on a timer subject to Time.deltaTime. It then gets into some variable organization where they are situated in a way that makes more sense and adds in headers for clarification in the Unity editor. Creating a header just requires this: [Header(“Header Name”)]. This really nicely separates the variables in the editor, as it sections them off along with the title at the top of that block of variables. The bullets for the turret are created with a basic Instantiation. However, since we want to reference the bullet instantiated in someway, we set it equal to a GameObject variable. This also requires “object casting”, so the instantiation has (GameObject) in front of it. I need to look into object c

Tower Defense Tutorial - Brackeys - Ep. 04

January 24, 2019 Tower Defense Tutorial Episode 04 - Turrets Youtube - How to make a Tower Defense Game (E04 TURRETS) - Unity Tutorial By: Brackeys Ep. 04 This starts the creation and implementation of the turret objects. Use OnDrawGizmosSelected to show important editor information when an object is selected. In this case, DrawWireSphere was used and it showed a wireframe of a sphere with a radius corresponding to the range of the turret. Wanted turret to update to find targets to fire at, so method UpdateTarget was created. This is going to be relatively expensive using distance checks so it was made as a separate “Update” method so we could run it much less than every single frame. This method was then called in Start with an InvokeRepeating call, which lets you set a time to start running, and a time interval to repeat the method. Rotating the turrets required usage of Quaternions. First, the direction was obtained with a simple Vector3 between the object and target. This

Tower Defense Tutorial - Brackeys - Ep. 01, 02, 03

January 23, 2019 Tower Defense Tutorial Episode 01 – 02 - 03 Youtube - How to make a Tower Defense Game (E01) - Unity Tutorial Youtube - How to make a Tower Defense Game (E02 Enemy AI) - Unity Tutorial Youtube - How to make a Tower Defense Game (E03 Wave Spawner) - Unity Tutorial By: Brackeys Ep. 01 Created all the nodes in grid that make up the map. Created the ground out of scaled cube objects as well. Added start and end location as simple cubes for now. Ep. 02 Creating the enemy AI with waypoints. A static transform array was created to contain all of the locations of the waypoints. There was an issue where we got an “index out of range” error because the enemy was looking for another waypoint to go to when it was supposed to be destroyed. It was being destroyed, but since that can take the computer some time to do, it was continuing into the next lines of code before the object was completely destroyed. To solve this, a return; line was added in the if statement for d

Field of View Tutorial with Mask Shaders

January 22, 2019 Field of View Tutorial – E03 Youtube -Field of view visualisation (E03) By: Sebastian Lague This tutorial ties the Field of View (FoV) series in with shaders. These shaders block everything from rendering except what is viewed by the player character. The shader scripts actually had barely anything added to them, and I’m not completely sure what they did. The shaders were both Standard Surface Shaders. A Stencil method was added into the SubShader section of both. In StencilMask, this method was just: Ref1 Pass replace In StencilObject, it was: Ref 1 Comp equal The only other additional code was in StencilMask, which was adding “Queue” = “Geometry-100” to the Tags, then ColorMask 0, and ZWrite off. SHADER PROGRAMMING TERMS ”Queue” = “Geometry-100” So these tags are terms that represent integer values that determine what is rendered first. Geometry has an integer value of 2000, and is the base for most opaque objects, so choosing “Geometry-100” will mak

List of Tower Defense Tutorials for Unity

January 21. 2019 List of Tower Defense Tutorials for Unity How to make a Tower Defense Game (E01) - Unity Tutorial By: Brackeys This is the start of a 28 episode series for creating a tower defense game from scratch. It is mostly 3D, although the game plays in a 2D environment. 0.0 Unity Tower defense tutorial - Introduction By: inScope Studios This is a 2D sprite tower defense game that uses tiles/grids to create its levels and environment. It also includes a lot of nice smaller tutorials along the way like creating a loading screen, some options screen elements, hovering for information boxes, etc. 1 Hour Programming: A Tower Defense game in Unity 3d [Tutorial] By: quill18creates This is a quick "speed run" of creating a basic tower defense game just to see if the creator could get one up and running in about an hour. This may not have the best practices, but can be good for finding some of the bare minimum requirements for getting a tower defense game off of th

Recap - Week of January 13 to January 20

January 20, 2019 Recap - Week of January 13 to January 20 Thesis Work Continue to search for some research on the general term of “game mechanics” to solidify the use of its definition as well as determine the components that make for interesting variable mechanics. Terminology to Look Into – Programming Structs Structs were a big part of the field of vision tutorials, and I still don’t fully understand how to utilize them. They are structured data containers that can hold many types of variables to use over and over, but I’m not sure if there’s more to them to help utilize them, especially for games. Could help to look into a tutorial where there are characters or enemies with stats (i.e. RPGs), or a pokemon-like tutorial (well, also under RPG). Field of Vision Recap Youtube - Field of view visualisation (E03: stencil shader) By: Sebastian Lague To start, I just wanted to include that there is a 3rd part to this tutorial series I would like to get to. The field of view (FoV)

Intro to Quadtree and Octree in Unity

January 19, 2019 Quadtree and Octrees Intro to Oct/Quadtree Data Structures These sources begin to explain what quadtree and octree systems are and their potential uses in a game environment. There are a few tutorials attached as well explaining how to set them up with programming. Searching for these topics did not turn up a lot, but these few sources seem to be good starts. Youtube - Lets Make an Octree in Unity By: World of Zero This is a basic approach to just setting up an Octree system in Unity in general. Youtube - Building the Quadtree - Lets Make 2D Voxel Terrain - Part 1 By: World of Zero This is the result of a challenge to the creator to make a Worms-style terrain destruction system. This would be approached by creating a 2D voxel system. Youtube - Coding Challenge #98.1: Quadtree - Part 1 By: The Coding Train This video gives a very good conceptual introduction to what a quadtree really is and the uses of it in programming. It then sets up how to create one in

Learning Foundations of Unity Shaders

January 18, 2019 Intro to Shaders in Unity Glitchy Man Material Unity3D - Live Training Session: Writing Your First Shader In Unity This tutorial was pulled from the tutorial list I created January, 17th ("Assorted Unity Tutorials - Structs, Shaders, and Unity Architecture"). IT not only introduced me to the core components that make up a shader in Unity, it also covered a lot of terminology and behind the scenes information to give me a better foundational understanding of how shaders operate. Types of shaders you can create in Unity: Surface Shaders: code generation approach that’s easier to write lit shaders than using low level vertexe/pixel shader programs Unlit Shaders: don’t interact with Unity lights, useful for special effects Image Effect Shaders: typically postprocessing effect that reads source image, does calculations, and renders result Compute Shaders: programs run on graphics card, outside normal rendering pipeline; used for massively parallel GPG

Assorted Unity Tutorials - Structs, Shaders, and Unity Architecture

January 17, 2019 Unity Tutorial Assortment Structs, Shaders, and Unity Architecture Youtube - HOW TO MAKE COOL SCENE TRANSITIONS IN UNITY - EASY TUTORIAL By: Blackthornprod Youtube - Beginning C# with Unity - Part 15 - Structs By: VegetarianZombie Youtube - Reduce Garbage Collection in Unity with Structs By: Unity3d College Youtube - Unity Architecture - Composition or Inheritance? By: Unity3d College Youtube - Shaders 101 - Intro to Shaders By: Makin' Stuff Look Good Unity3D - Live Training Session: Writing Your First Shader In Unity By: Unity This is juts a list of some useful resources of tutorials for some things I would like to get around to soon. They cover some basic functionalities of Unity, as well as some more in depth programming concepts to help aid in building my code.

Field of View Tutorial E02 - FoV Mesh - by Sebastian Lague

January 16, 2019 Field of View Tutorial – E02 Youtube -Field of view visualisation (E02) By: Sebastian Lague This is the second part of a tutorial creating a field of view (FoV) for a character in Unity. This focuses on an in-game visualization of the field of view that fills the entire viewing area. FoV visualization is a generated mesh. This will be built from tris made up by the character’s position and the end point of each ray cast within the FoV. A struct was created to hold all of the information for the raycasts. Used transform.InverseTransformPoint to convert a point (Vector3) from a global value to a local value. The FoV mesh initially had an issue dealing with the corners/edges of obstacles. A high resolution was needed (many rays cast) to reduce the visual jitter effect around obstacle corner/edges. This was addressed further in the tutorial. To solve this, approached the problem by determining when rays go from hitting obstacle to missing obstacle, and label these

level-design.org and a GDC Talk on Level Designers

January 15, 2019 Level Design - Resources Talks and Online Source Youtube - GDC 2015 - Level Design in a Day: Level Design Histories and Futures level-design.org site These have been helpful level design resources for games that were brought up in our class today for Architectural Approach to Level Design. While not particularly useful now, they could be good resources to go back to.

Field of View Tutorial E01 - by Sebastian Lague

January 14, 2019 Field of View Tutorial – E01 Youtube -Field of view visualisation (E01) By: Sebastian Lague This tutorial sets up a field of view (FoV) for a character. This FoV gives basic sight to a character. This sight has a radius and a viewing angle, and it is blocked by obstacles. This FoV also has a global setting that determines if it follows the character’s rotation or not. There are also editor elements that make it visually very clear what is happening by drawing out all of these factors. Unity angles: Normally we start with 0 degrees to the right of the circle, but Unity starts with 0 at the top of the circle (where you’d normally have 90 degrees) for its angular math calculations. Since sin (90 – x) = cos x, this just means we swap sin and cos in Unity math. PROBLEM I had an issue with GetAxisRaw command not working for mouse inputs with the axes being “Horizontal” and “Vertical”. It just constantly returned a value of 0. This was ok with keyboard inputs however

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 d

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 playe

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

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 p

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

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

Video Game Physics - Constrained Rigid Body Simulation by Nilson Souto

January 5, 2019 Video Game Physics - Constrained Rigid Body Simulation by Nilson Souto Toptal - Video Game Physics Tutorial - Part III: Constrained Rigid Body Simulation By: Nilson Souto Link to Erin Catto's box2d.org This appears to be a good follow up to the game physics GDC talk by Erin Catto I watched earlier. This serves as another listing of physics constraints and how they can apply in games, specifically when dealing with rigid body elements. I also learned the constraint type is "revolute", not "resolute". This article actually references Erin Catto and his Box2D site since it goes into his creation of the sequential impulse method.

Physics for Game Programmers: Understanding Constraints

January 5, 2019 Physics for Game Programmers: Understanding Constraints Constraints in Game Physics Youtube – GDC - Physics for Game Programmers: Understanding Constraints By: Erin Catto EDIT: Updated to correct "resolute" constraint to "revolute" (Jan 5, 2019) Erin goes over the importance of physics constraints in physics game programming and how to implement them to add diversity and creativity when designing physics for games. Erin explains that physics constraints are to physics programmers as shaders are to graphics programming. You can use the already existing recipes that will get the job done, but designing your own will allow you more flexibility and creativity. Shaders – lighting, shadows; Physics constraints – revolute, prismatic Position constraint: in example, it is a particle that is restricted to a surface. Appears the equation should be 0 if particle is on surface, than < 0 or > 0 depending on what side of the surface it is on if it m

Tactics Movement Tutorial (Cont.) - AI and A*

January 4, 2019 Tactics Movement - AI AI with A* (A Star) Youtube - Unity Tutorial - Tactics Movement - Part 6 By: Game Programming Academy This part of the tutorial implements A* for use as the AI for NPCs. Most tactics games would generally involve some type of action phase, but this tutorial finishes with just getting the movement setup. NOTES The tutorial’s breakdown of A*: processing the open list by finding the lowest f cost put it in the closed list checking for the target then process adjacency and see if tile is in open list, closed list, or neither (in which case it is added) Like in many tactics games, the NPCs will still show all of their selectable locations to move before actually selecting one. For checking distance, tutorial just uses “Vector3.Distance”, but they suggest using the squared magnitude value since it is easier computing because Distance uses square root. Used for setting up simple AI searching algorithm to find the closest thing. It is a sim

Tactics Movement Tutorial (Cont.) - Turn Manager

January 3rd, 2019 Turn Manager - Tactics Turn Management Youtube - Unity Tutorial - Tactics Movement - Part 5 By: Game Programming Academy This part of the tactics game tutorials focused on creating the turn manager. An NPC character was created to represent another team. Even though there are only two units, the tutorial design deals with entire teams. The turnManager used static variables and methods because it should be very accessible and will act as a sort of global since there should only ever be one. TERMINOLOGY Subscriber Pattern: the tutorial mentions using this method to add units to the turn manager queue. This was tied to the idea that when a unit comes "online", it should be able to add itself to the proper list in dictionary. Dictionary: more uses of this in turnManager system, so I still need to look into this to see how they work. NOTES Will need to add method to remove unit from queue when it is defeated, which will then also lead into another m