Posts

Showing posts from 2020

7 Steps for Starting Every Game Project - from Jason Weimann

December 21, 2020 Setup for Every Game Dev Project Unity Setup Title: Do these 7 things for EVERY game! By: Jason Weimann Youtube - Information Description: 7 major steps to do for any non-minimal game development project, with a focus on Unity development. Overview This quick video is seven good steps to take when setting up a new game project assuming it is something you will be working on for any length of time. These tips range from general good practices that really should just be done on any project to helpful actions for keeping you organized and moving forward.

Architecture AI Pathing Project: Revit Data Applying Helper Class

December 9, 2020 File Reader Architecture AI Project Enhancing the Extendability of the Revit Parameter Data Application Class through Helper Class I got the basics of reading in a specified set of parameter data from Revit to apply to the model in Unity, but we would need to have options for possibly using many sets of data from there. To handle this I wanted to make it easy to add ways to handle all the differents types of logic with these sets of data. This started by creating a foundational interface that any class utilizing the data would implement, but I also needed a way to tie these specific classes to their corresponding data sets. I ended up doing this mostly with a helper class, named RevitModelDataHandlerManager, to the CSVReaderRevitModel class. Connecting Specific Data Handler Classes with Specific Data Sets Using a Dictionary Because of the nature of this data, we know that we will be searching for several different specific strings somewhere along the way,...

Architecture AI Pathing Project: Applying Revit Parameter Data to Model in Unity

December 8, 2020 File Reader Architecture AI Project Applying Revit Parameter Data to Model in Unity After reading the Revit parameter data into Unity, it could now be used to modify the model within Unity itself. The original goal was to read the data to determine which objects within the model should be placed on which Unity layer, specifically the "Unwalkable" layer in most cases. It should then be extended to be able to add components to specific objects as well, meaning it needs to have a diverse functionality set available when modifying these individual objects. Building Data Arrays as Dictionaries for Flexibility Since the full extent of the use of this data is not fully known yet, having a flexible and extendable option for organizing and searching through the data made sense here. As the data is read in one sheet at a time and placed into separate 2D string arrays, I decided to organize those 2D arrays within a dictionary. The key of these dictionaries...

Architecture AI Pathing Project: Another File Reader for Revit Model Data

December 3, 2020 File Reader Architecture AI Project Another File Reader: Revit Model Data After reconstructing the file reader to read in various coordinate data to be passed on to the A* pathing node grid, we also needed a file reader to read in data from the Revit model itself to reapply that data to the models in Unity. Revit allows the user to apply many parameters and lots of data to the models contained within it, and that data can be exported as a large Excel file. That data however is not being passed into Unity when exported as an .fbx file, so we needed a way to reapply that data using the exported data. Goal While this is a flexible enough concept to apply many parameters, the main problem this system is being created to solve was automating the process of labeling what parts of the model are "walkable" or "unwalkable". I had created a system to somewhat help do that in Unity, but this system will allow the user to do that work on the Revit...

Architecture AI Pathing Project: File Reader and Different Resolutions of Data and A* Pathing Grid

December 1, 2020 File Reader Architecture AI Project File Reader Data Array Creation The file reader for this projects starts with the CSVReader class. This class is responsible for reading data in from .csv files generated by Revit to pass it on to the underlying A* pathing node grid for use by the agents when pathing. These .csv files have 2D coordinate values to locate the data, the actual data value, and a reference ID. The coordinate data and the data values themselves are separated and saved into many data objects within Unity (in a class named DataWithPosition). This prepares the data to be used to pass on to the A* pathing node grid. While the .csv data is generally consistently spaced based on coordinates, it can have many gaps as it does not assign a value somewhere where there is a gap in the model. This results in data that is not perfectly rectangular. To make the process of tying this data array in with the pathing grid more consistent, I manually make a recta...

Aseprite Beginners Guide

November 30, 2020 Pixel Art Aseprite Tutorial Title: Aseprite Guide for Beginners (Pixelart Tutorial) By: MortMort Youtube - Tutorial Description: Intro to using Aesprite as well as some pixel art basics. Overview With Aesprite being on sale as well as finding that it was open source and possible to compile on its own, I wanted to look into finally using Aseprite to do some 2D pixel art. This tutorial looks like a reliable source for introducing you to a lot of the basics of using the software, which is all I should need to get going. Some extra tips on pixel art in general would be nice as well.

Architecture AI Pathing Project: Selecting Spawn and Target Positions from Objects in the Model

Image
November 23, 2020 Spawning and Pathing System Architecture AI Project Updated Spawning System to Use Objects within Model as List of Options We wanted to update the spawning system so that instead of being arbitrary points, both the spawn location and target location were tied to objects that could be found throughout the entire model. The system is already creating a list of all the objects within the model for applying colliders and various other components, so that could be accessed for this purpose as well. This list of objects was then put into a UI dropdown for selecting both the spawn position and the target position. The transform of the selected object was then used for that respective part of the pathing. Highlighting the Spawn and Target Locations I wanted to highlight both the spawn and target objects to make it more apparent where the agents would be aiming to path. The first implementation I went with for now changes the material of the object. The spawn obj...

Architecture AI Pathing Project: Automating the Sizing of the Node Grid

Image
November 17, 2020 Automated Node Grid Size Architecture AI Project Title: Unity Bounds Documentation By: Unity Unity - Informational Description: Unity's documentation on their Bounds class and its methods. Automating Process of Sizing the Node Grid The A* pathing uses an underlying grid of nodes to inform the agents how to move through an area. A value must be input to tell the grid how large of an area to cover with these nodes. Originally these values, which are two dimensions of a rectangular area, had to be input manually. Since this grid will always be covering a full architectural model, it made sense to be able to access the model and automate the sizing process through the size of the model. Encapsulate Bounds of All Children Objects Since we are dealing with models in Unity, I looked to the Bounds class to help with automating this grid creation process. Immediately, Bounds can be used to find the bounding volume of a single mesh/renderer/c...

Unity Component-Based Design: Breaking Up Code with Lost Relic Games

November 10, 2020 Component-Based Design Unity Title: Breaking up Code in Unity (Important game dev tips for beginners) By: Lost Relic Games Youtube - Informational Description: Introductory explanation of using component-based design in Unity and breaking your scripts down into smaller more manageable pieces. Overview As I work on larger and more complex projects, I want to explore ways to better organize and structure my code so this seemed like a good option to look into. Unity's components are the foundation for a majority of it's inner working, and as such component-based design is a popular way to handle meatier projects within Unity. It has a focus of breaking scripts down into very small and manageable pieces that focus more on a specific functionality, and then having those pieces interact with each other in a controlled and organized way. I have been working on breaking up my code into more unique pieces, but I am looking for more ways to h...

Self-documenting Code with InfallibleCode

November 4, 2020 Self-documenting Code Programming Principles Title: How to Write CODE That Documents Itself By: Infallible Code Youtube - Informational Description: Quick rundown of how to make your code more self-documenting and reduce the need for comments. Overview Removing Old Commented Out "Zombie Code" They suggest continually removing old code that has been commented out to save for later possible use. They call this type of code zombie code, and say it is generally not worth saving and if anything can cause issues. It can be confusing extra amounts of information, or someone may be more likely to reactivate it when unnecessary in a group project setting. Some Cons of Extensive Comment Usage They suggest keeping comment usage to a minimum and having the actual code itself better describe what it does. This starts with the basics of effectively naming variables, but also leads into all around more readable code. One quick example they...

Architecture AI Pathing Project - System Manager and Automating Component Application to Imported Models

October 29, 2020 Automating Component Application and System Manager Architecture AI Pathing Project System Manager and Initialization The integration of several classes and adding more has started to create a lot of necessary references becoming difficult to time properly. To make sure a certain class has already initialized or some other class has performed its Awake() method I end up making extra references and method calls within other classes so the proper references are set before peroforming those methods. In an effort to organize this better and make the timing more understandable, I am looking at making a SystemManager gameobject to replace the DemoManager, and either add an Initialization class to this or make it its own class if it does not require being a monobehaviour. This Initialization class will be responsible for calling all the major system classes initialization methods in the proper order to ensure references are met. This will also require moving som...

Unity Input Action Assets Intro with InfallibleCode

October 26, 2020 Input Action Assets Unity Title: Unity Input System | How to Use Input Action Assets By: Infallible Code Youtube - Tutorial Description: One of the better tutorials covering all the basics of utilizing Unity's new Input Action Asset for their new input system. Tutorial - Part 1 - Reference by String Initially there are already some issues since they are using an older version of the new Unity input system. GetActionMap and GetAction are no longer methods associated with the InputActionAsset object and the InputActionMap object. To get around this I just used the FindActionMap and FindAction methods and they appeared to work fine here. There are to callbacks tied to the movement action we created: movement.performed and movement.canceled. According to the Unity documentation, performed means "An Interaction with the Action has been completed" and canceled means "An Interaction with the Action has been canceled". The...

Gridzzly Printable Graph Paper

October 21, 2020 Graph Paper Design Resources Title: Gridzzly Graph Paper Layout Gridzzly - Main Page Description: Site that gives several graph paper-like options that can be accurately printed. Overview This site provides a quick and accurate way to make several different graph paper-like designs that can be printed onto paper to sketch ideas and concepts. Along with the general graph paper square pattern, it has a few dot patterns, several other shape patterns such as triangles and hexes, and even a music bar option. These various options can be good for quickly working on some ideas or building out paper prototypes for testing phases.

Open Closed Principle

October 20, 2020 Open Closed Principle Programming Title: SOLID Principles in C# – Open Closed Principle By: Marinko Spasojevic CodeMaze - Information Description: Quick coverage of the open closed principle for programming with C# examples. Overview "The Open Closed Principle (OCP) is the SOLID principle which states that the software entities (classes or methods) should be open for extension but closed for modification." This basically means it is preferable to write code in such a way that when a change or extension is suggested for that original class that it can be done through addition instead of modifying the existing class itself. Many of the examples shown do this by adding new classes to handle the additional functionality required instead of modifying the original classes created. Example #1 - Salary Calculator The first example they cover somewhat resemebles the factory pattern tutorial I was checking out recently that introduced m...

Factory Pattern Basics for Creating Objects

October 20, 2020 Factory Pattern Unity Title: Creating Objects in Unity3D using the Factory Pattern By: Jason Weimann Youtube - Tutorial Description: Introductory tutorial to the concept of fatories and the factory pattern in OOP using Unity. Overview This tutorial quickly covers the basic idea behind using factories and the factory pattern in OOP through an example in Unity. The overall concept is pretty simple in that it focuses on using an object to create other objects, but they explore putting this idea to use as well as some of the pros and cons of its use. Notes Factory: in OOP, an object for creating other objects; a function or method that returns objects of a varying prototype or class (from Wikipedia) Some of the benefits noted are that this allows you to put all of your object creation into a single place and that you can extend it quite a bit without modifying the underlying logic (following the Open Closed Principle). You do not even need...

Basics of Dependencies in Unity

October 19, 2020 Dependencies Unity Title: Dependencies in Unity By: Infallible Code Youtube - Tutorial Description: Covers the basics of dependencies in programming, with a focus on them within Unity and how they deal with expensive method calls. Overview This tutorial nicely breaks down dependencies in programming in general in a very basic and understandable way. This is good for defining it well at the foundational level. It also covers some of Unity's more expensive method calls and the different ways to cache these results, as well as the different ways to organize and manage dependencies within Unity specifically. Notes Dependency: When one object relies on another to function. The initial example in this tutorial nicely shows how improper code can also hide dependencies. Since they were using FindObjectOfType in the Update method (an extremely expensive and inefficient process), it could be lost that that class was dependent on the Inventor...

Adding Details to Enhance the Player Character

October 16, 2020 Detailing and Enhancing Player Character Title: 6 DETAILS TO MAKE A GREAT PLAYER CHARACTER - UNITY TUTORIAL By: Blackthornprod Youtube - Tutorial Description: Tutorial on adding a few small details to enhance the feel of the player character. Overview I came across this tutorial that covers a few quick ways to add some details to a player character to make them feel much more fun and interactive to use. They used Hollow Knight as a base for the types of details they were looking to add. The key details they created were: landing animation, jumping/landing vfx, moving vfx, background interaction while moving, and jumping/landing sound effects. While on the simpler side, these are all very nice features to add that can quickly make your character much more enjoyable to use. As an important side note they mention, this can actually be beneficial to the developer because it can make them for motivated to work with the character.

Exploring Unity's New Input System Further

October 15, 2020 Input System Unity Title: How to use the new Input System in Unity3D By: Coding With Unity Youtube - Tutorial #1 Description: Indepth tutorial on implementing Unity's new input system along with programming its use. Title: New Unity INPUT SYSTEM - Getting Started By: Dapper Dino Youtube - Tutorial #2 Description: Quick tutorial using Unity's new input system and using it with programming. UPDATE Title: Unity Input System | How to Use Input Action Assets By: Infallible Code Youtube - Tutorial #3 Description: Good all around tutorial for getting started using Unity's new input system. Title: Unity Input System Quick Start Guide By: Unity Unity - Input System Documentation v.1.0 Description: Unity's documentation on the new input system. Overview I have already tested using the new Unity input system a bit and it seems promising so I wanted to explore it further. These tutori...

Resetting Keybindings with New Unity Input System

October 14, 2020 Rebinding Keys Unity - New Input System Overview I have been trying out the new Unity input system to see if it is worth using instead of the older method of building out everything yourself. In this process I wanted to make sure it had a way to rebind keys since this is a gigantic feature to have in almost all games. I was able to find that there are several different ways to change keybindings with the methods found in Unity's documentation on the new input system found here: Unity Editing Keybindings for New Input System Version 1.0 The two main methods I am focused on currently are ApplyBindingOverride and PerformInteractiveRebinding. PerformInteractiveRebinding allows for keybinding modification by the player at runtime, and is a quick way to implement a feature commonly found in many games where the player selects an action to change the keybinding for and the game awaits their input to set the new keybinding to that input. I do not think th...

Creating an Input Buffer System for an Action Game

October 13, 2020 Input Buffer System Game Development Title: Character Action Game Development Tutorial 8-- Input Buffer By: Tyra Doak Youtube - Tutorial Description: Small segment of a tutorial list that focuses on creating an input buffer system in a 3D action game. Overview Having input buffering in a game can help a game feel much more responsive and smoother to a player, especially in hectic, fast paced gameplay such as fighting games or action games. This tutorial has a large emphasis on building out their input buffering system for their 3D action game so this is right in the prime territory for the type of game I am interested in building an input buffering system for as well. They also show a decent visual display of the frame data at the top of the screen during play mode that could be an ok starting point to help with starting to build frame data focused systems.

6 Design Patterns for Game Devs by Jason Weimann

October 8, 2020 Design Patterns Game Development Title: The 6 Design Patterns game devs need? By: Jason Weimann Youtube - Tutorial Description: Quick coverage on 6 general design patterns often used for game development. Overview This video quickly covers a lot of design patterns or design pattern-like architecture that are often used in game development. These include: singleton pattern, observer pattern, command pattern, component pattern, flyweight pattern, and state pattern. I have experience with most of these so this seems like a good video to cover all of them quickly to give me another view on them on how they might be utilized, as well as seeing if there are any I haven't used that could be good to keep in mind.

Workflow from Aseprite and Photoshop to Unity for Sprite Art

October 7, 2020 Aseprite & Photoshop Unity Workflow Title: Improve your WORKFLOW using Aseprite/PS with UNITY By: Dev!Bird Youtube - Tutorial Description: Tutorial showing workflow of creating sprites in Aesprite and Photoshop and importing them to Unity. Overview I initially looked into this because Aesprite is a software I have been interested in but haven't looked to far into it yet. Seeing how easy it is to work with and import your work into Unity here definitely makes me interested in looking to get it if I want to do some more focused sprite work again in the future. Aesprite's focus on sprite work making it rather simple to use but effective for both still images as well as animation make it a very appealing tool if you do not need the sophistication of Photoshop.

Unity Movement Basics Tutorial

October 6, 2020 Unity Movement Title: Move in Unity3D - Ultimate Unity Tutorial By: Jason Weimann Youtube - Tutorial Description: Tutorial for covering the basics of all the different ways to move objects in Unity. Overview Movement is something I have worked with a lot in Unity as it is part of basically every project in some way or another. Being such a prevalent topic, I just wanted to make sure I had a good understanding of all the different ways to apply movement so I could pick the best options for specific projects. This tutorial is very basic on every front, but inclusive so I figured it was a good point to make sure I knew all the options. There was not a lot to learn from this tutorial for me, but it did help support some of the approaches I already use. Tutorial Notes Transform Based Movement These approaches to movement deal with directly altering the transform values of an object, such as position and rotation, mathematically through gener...

Newer Unity Input System

October 5, 2020 Unity Input Systems Title: NEW INPUT SYSTEM in Unity By: Brackeys Youtube - Tutorial Description: Tutorial for using Unity's newer input system. Overview This setup uses Unity's improved new input setup system. It provides a nice way to setup your inputs more specifically without directly going into the Project Settings -> Input Manager window. The user starts with a blank slate and adds actions to this input manager asset to match up with all the actions they will want in the game. From this tutorial they obtained the tools to use this new input system through a project on github, but now it is available as a standard package within Unity simply named Input System. It however mentions that the backend has been modified (I am using Unity version 2020.1.5f1 currently when testing this) so I am keeping an eye out for any problems it may cause. Tutorial Notes There are three major sections to this input system: Action Maps, Ac...

Unity Create Your Own Keybindings Manager

October 5, 2020 Unity Input Systems Title: How to Create a Custom Keybinding Handler for your Unity Game - *Improved* By: Dapper Dino Youtube - Tutorial Description: Tutorial for creating your own basic input manager within Unity. Overview The idea behind creating an input manager is to have a flexible and easily accessible tool for both setting up your input system within a game as well as modifying it. This manager should help keep programming associated with the player input more organized and consistent, as well as providing pathways to allowing both the designer and eventually the players options to easily change the inputs to their liking. Tutorial Notes Setup Immediately they create an InputManager class that follows a singleton pattern, but also includes a DontDestroyOnLoad method. This is ok to start, but may be worth looking into editing that if using a more sophisticated multi-scene project setup later on. Within the InputManager, they cr...

Brackeys 2D Movement and Melee Combat Tutorials - 2D Movement

September 30, 2020 Unity 2D Movement Title: 2D Movement in Unity (Tutorial) By: Brackeys Youtube - Tutorial #1 Description: Tutorial for using a simple Unity player controller. Title: MELEE COMBAT in Unity By: Brackeys Youtube - Tutorial #2 Description: Tutorial for setting up basic melee combat with a 2D player controller. Overview I started with the Melee combat tutorial but it referenced the movement tutorial for how they setup the starting movement and animation so I wanted to move back to them just to make sure I was starting in a similar spot. The player controller made in the 2D movement tutorial is actually pretty bad unfortunately, but I still wanted to use this melee combat tutorial as a base point for something that is workable but not amazing just to get an idea of how to approach combat. 2D Player Movement - Tutorial #1 While overall not a great tutorial, it did support some concepts I have come across. They separated the pl...

Unity Custom Keybinding Manager

September 29, 2020 Unity Keybinding Manager Title: How to Create a Custom Keybinding Handler for your Unity Game - *Improved* By: Dapper Dino Youtube - Tutorial Description: Tutorial for setting up an input manager scriptable object in Unity. Overview I was looking for a nicer way to control inputs and controls when setting up a Unity project other than the very basic way of listing out all the specific key codes in the user scripts themselves or using fragile string references when tying it to Unity's natural input manager. Initially I came across this creator's first attempt at setting up a keybinding handler (hence the *Improved* tag on the title of this tutorial) but was not as interested in it since they still used strings and I thought an enum implementation would be better, but lo and behold, the same creator had actually improved their system a year later with an enum system like I was imagining. While maybe not perfect, I do still like th...

TEST - Connection to Wordpress Site

TEST TO SEE IF CONNECTION TO WORDPRESS SITE IS ENABLED

Unity Fixed Update Purpose

September 25, 2020 Unity Fixed Update Title: GameDev Stream — What is FixedUpdate For? By: Infallible Code Youtube - Information Description: Quick rundown of the main purpose of using fixed update in Unity. Overview This video quickly covers the main purpose of using FixedUpdate in Unity. As most Unity users know this is commonly used for containing physics calculations, but they better describe why that is here. They explain that FixedUpdate is much more consistent as it is inherently time based, whereas Update is tied directly to frame rate, which can vary drastically from computer to computer or user to user. This consistency however is what also makes FixedUpdate bad for uses such as user input because they could basically be entering inputs between the FixedUpdates and they will not be picked up at all, which is obviously extremely bad.

Unity Scriptable Objects Tutorial Updated

September 24, 2020 Unity Scriptable Objects Title: Better Data with Scriptable Objects in Unity! (Tutorial) By: Unity Youtube - Tutorial Description: Quick updated rundown by Unity themselves on using Scriptable Objects. Title: Scriptable Object Unity Documentation By: Unity Unity - Documentation Description: One of the suggested links to follow from the tutorial video that is just the official documentation on scriptable objects. Title: Making cool stuff with ScriptableObjects By: Matt Schell Unity - Blog Description: Another suggested link to follow from the tutorial video showing some more examples of using scriptable objects. Overview I wanted to make a quick reference to this new video as it was just released yesterday (Sep 23, 2020) and I have wanted to explore scriptable objects in Unity and getting recently updated information is always useful. Scriptable Objects as Data Containers Scriptable Objects can be useful...

Reference List for Creating State Machines in Unity with Focus on Character Controllers

September 23, 2020 State Machines Unity and Character Controller Focus Title: The State Pattern (C# and Unity) - Finite State Machine By: One Wheel Studio Youtube - Tutorial #1 Title: How to Code a Simple State Machine (Unity Tutorial) By: Infallible Code Youtube - Tutorial #2 Title: Complex Enemy Behavior using Finite State Machines - 2D Platformer - Part 13 [unity] By: Bardent Youtube - Tutorial #3 Title: State Machine Setup - 2D Platformer Player Controller - Part 21 By: Bardent Youtube - Tutorial #4 Title: Movement State Machine - Free download By: Epitome Youtube - Tutorial #5 Title: Unite 2015 - Applied Mecanim : Character Animation and Combat State Machines By: Unity - Aaron Horne Youtube - Tutorial #6 Overview I have dealt with using state machines before, but mostly for creating AI systems. I wanted to investigate using a state machine specifically for a player controller, focused on 2D player c...