Posts

Showing posts from April, 2020

Architecture AI Cost Calculation Class for AStar

April 27, 2020 Architecture AI Project Building Architecture Value to A* Cost Class Math for Calculating A* Cost with Architecture Value and Agent Affinity Integration I needed to translate agent affinities for architectural elements and their interaction with the architectural values themselves found in the nodes throughout the A* grid into cost values to integrate them with A*'s pathfinding logic. With this I wanted to create a class that is constantly available to contain all the math and constraints for dealing with this cost translation. Class MathArchCost The class MathArchCost was created to fulfill this purpose. It is a public class with a public static instance to make it readily available for other classes to acces it to perform calculations or check for minimum and maximum values. I decided to go this route instead of a directly public static class overall because I wanted to make an instance of this object that I could edit in the inspector during building tim...

Personal Game Jam 1 - Getting Started

Image
April 24, 2020 Personal Game Jam Getting Started Finalizing Concept Selection I had reduced the number of concepts from 6 to 3 after creating the initial concept lists by removing all the options from pair B. I really liked most of these concepts, but they were a bit more involved than I was looking for for such a short term project. The main issue with the first two for me was that they involved drawing objects into existence with the mouse, which is a type of input I am completely unfamiliar with. This would have made them a perfect candidate for an experimental game project with 2 weeks of effort, but since I wanted to make significant progress in just two days, this would have set me behind too much. The last concept was more puzzle related, which is difficult to make effectively in this amount of time since they are so level design focused. To help me decide between the 3 remaining concepts from my pair, pair A, I made really simple concept sketches to get an idea of how...

Personal Game Jam 1 - Concept Creation

Image
April 23, 2020 Personal Game Jam Concept Creation Meetup Game Jame Idea I wanted to work on a smaller scale project personally to practice some programming techniques and systems I have picked up recently in a more practical sense, as well as focusing less on long term and large scale scaling of projects. This way I could focus more on trying to find solutions that work as opposed to the best solution, so I could continually progress and try out some new skills I have learned. This led to this idea of creating a personal game jam for myself following similar rules that I used in an experimental games class to create projects. The game jam approach makes sure I don't spend too many days on it. I am planning on spending about 5 - 6 hours on it for 2 days and seeing where I get with it. Initial Concept Generation The approach we used to come up with inspiration for a small scale project in experimental games was as follows in pairs of 2: Start with a single key word: I cho...

Updating A* to Incorporate Various Architectural Elements Influencing Pathfinding

March 21, 2020 Updating A* Different Agent Types and Different Architectural Elements Adding Architectural Elements of Influence to A* Pathfinding We want to be able to add various architectural elements to an environment and use them to influence the pathing of AI agents using A* pathfinding. Along with this, we want various agents to respond differently to the same architectural stimulus (i.e. some agents should like moving near windows more, while others should prefer to stay away from windows). This required the addition of some architectural data to both the agents and the nodes within the A* grid. Implementing Architectural Elements I have started to implement my approach outlined in my blog post from yesterday to create the foundation for this architectural pathing addition. I have started with just a single data point to work out the feature by adding a "window" value to both the agents and the nodes of the grid. The Agent window measures their affinity for...

Updating A* for Multiple Agent Types of Pathfinding

March 20, 2020 Updating A* Different Pathfinding Logic for Different Agent Types A* Current System The A* Pathfinding currently performs the same calculations for every agent in order to determine its path. Every unit then takes the same path assuming they have the same starting and target positions. We are looking to adjust this so there are various types of agents which with different affinities to certain objects in the environment. This then needs to be incorporated in the path determination so different types of agents will takes different paths, even when using the same starting position and same target position. Differentiating Pathfinding for Different Types of Agents We want to add more parameters to the grid nodes besides flat cost that influence the agents' paths. These parameters also need to be able to influence different agents' paths differently (i.e. the parameters may give a node a cost of 10 for one agent, but 20 for another). Approach The init...

HFFWS Thesis: Hand Built Lever Puzzles to Learn From

Image
April 16, 2020 Hand Building Puzzles Thesis Project Intro Following hand building the ramp puzzles to learn from for my thesis project, I have built lever puzzles to continue the process. Current Hand Made Ramp Puzzles As stated previously, this section was about creating the lever puzzles this time around. The main ideas behind them in order are: testing ramps, lift heavy object, build a lever system, launch a projectile, jam lever, and cantilever. Puzzle 1: Testing Just as a place holder, I kept a puzzle testing scenario in my Unity project scene just to test physics objects and keep references for ramp angles that work and platform sizes for different scenarios. Puzzle 2: Lift Heavy Object This scenario uses a premade seesaw in the scene to allow the player to access new locations. This is the base lever interaction as it gives a really simple environment for the player to focus on playing with a large lever object with their player character and get a base feel for...

Completed Prototype Model of a Shark for Dark Shark Project

Image
April 14, 2020 Model Shark for Dark Shark Modeling in Maya 2019 Modeling a Shark - Pt 4 Youtube - Tutorial #1 By: Dan Pejril Summary I followed parts 4 and 5 of this tutorial series on Youtube to guide my process for making my shark model for the Dark Shark project. Part 4 helped me with finding a way to mirror objects in Maya to create the pectoral fins for the model. The approach they used was to delete half the faces of the model to then duplicate the remaining half with "Duplicate Special" and scale -1.0 in the x. This way anything done on the one half of the model was duplicated on the other side. Part 5 got more into creating the mirrored objects and merging it back together. After creating the pectoral fins, they then needed to combine the two halves back into a single mesh. This was done with "Combine". This unites the individual meshes into one, this however does not really modify the verts and edges. To complete the combination, they used a ...

Modeling a Shark Player for Dark Shark Project

April 13, 2020 Model Shark for Dark Shark Modeling in Maya 2019 Modeling a Shark - Pt 1 Youtube - Tutorial #1 By: Dan Pejril Summary I am looking to convert my original Dark Shark small game project from a 2D game to a 3D game as I progress with it, so I am using this as an opportunity to practice using Maya as a 3D modeling software and the pipeline of migrating models from there into Unity, since I haven't done either in a while. My main focus is the gameplay and designing the underlying game systems, so I do not need an amazing model for now. This will just be practice so I'm making a simple, low-poly shark just to act as a place holder for now, and I can always upgrade it and make it nicer later if I want. The video tutorial I have linked is a simple tutorial for modeling a simple shark, so I am using it as a rough reference as I brush up on the basics of using Maya as well as helping me design the shark a bit. As I mentioned, I'm just looking for a simple...

UnityLearn - AI For Beginners - Finite State Machines - Pt.02 - Finite State Machine Challenge

April 6, 2020 AI For Beginners Finite State Machines Finite State Machines Beginner Programming: Unity Game Dev Courses Unity Learn Course - AI For Beginners Finite State Machine Challenge This tutorial provided a challenge to complete and then provided a solution. The challenge was to create a state where the npc would retreat to an object tagged as "Safe" when the player approached the NPC closely from behind. My Approach Since they had a State enum named Sleep already that we had not worked with yet, I used that as the name of this new state (I started with Retreat, but then found the extra Sleep enum so I changed to that since I assumed it would be more consistent with the tutorial). Similar to the CanSeePlayer bool method added to the base State class for detecting when the player is in front of the NPC, I added an IsFlanked bool method here that worked similarly, but just detected if the player was very close behind instead of in front. I used this ...

HFFWS Thesis: Hand Built Ramp Puzzles to Learn From

Image
April 2, 2020 Hand Building Puzzles Thesis Project Intro I have started crafting some small puzzle scenarios by hand to get a better idea of what types of concepts and parameters to take into consideration when creating a system to generate these types of scenarios. Researching them has only done so much, so I am helping to understand the relationships between objects within a scenario better by actively thinking through how to put them together. Tracking Manual Puzzle Building As I create each puzzle scenario, I have a list of data to keep track of that will hopefully help me better understand how to systematically put these scenarios together. These core ideas are: description, objects, position relations, parameter relations, skills, and concepts. Description: General idea of what the puzzle scenario is and the main objective throughout Objects: a list of all the objects used to make the puzzle scenario Position Relations: information on how the different objects in ...

UnityLearn - AI For Beginners - Finite State Machines - Pt.01 - Finite State Machines

April 1, 2020 AI For Beginners Finite State Machines Finite State Machines Beginner Programming: Unity Game Dev Courses Unity Learn Course - AI For Beginners Finite State Machines Finite State Machine (FSM): conceptual machine that can be in exactly one of any number of states at any given time. Represented by a graph where nodes are the states, and the paths between them are the transitions from one state to another. An NPC will stay in one state until a condition is met which changes it to another state. Each state has 3 core methods: Enter, Update, Exit Enter: runs as soon as the state is transitioned to Update: is the continuous logic run while in this state Exit: run at the moment before the NPC moves on to the next state State Machine Template Code (Can use core of this for each individual state): public class State { public enum STATE { IDLE, PATROL, PURSUE, ATTACK, SLEEP }; public enum EVENT { ENTER, UPDATE, EXIT }; public STA...