An Experiment in Teaching Level Design

I wanted to introduce some unconventional design approaching while teaching level design. I have had an idea to do a game with using a surrealist  approach. For that I designed a game stub and coded the base functionality on the top of Unity. The student are tasked to do level design using that design, code,Continue reading “An Experiment in Teaching Level Design”

Testing Public Variables in Unity

Edit 2012/12/08: A bug fix (End() did not show correct error count); change reporting: now EndCase() and End() use Debug.LogError() fuction in reporting if there were errors (otherwise Debug.Log() is used). It is easy to forget to set a public variable of a script in Inspector and it might take some time to figure out whereContinue reading “Testing Public Variables in Unity”

Introduction to Unity

  Unity 1 from Petri Lankoski The introduction tutorial uses accompanied Unity packages: http://www.mediafire.com/file/y5i38txo42fj8i3/escape.unitypackage.zip (requires Pro, as it uses Image Effects and Sound Effects). http://www.mediafire.com/file/2bdmrn5j4vcikpa/escape_stripped.unitypackage.zip (work in the free version of  Unity). Update 2013/01/07. file hosting changes and URLs changes to point to the new location. Update 2012/10/27: The slides and packages now include GameManager and MainScreenGUI prefabs. GameAgentsContinue reading “Introduction to Unity”

Unity Examples

EDIT 20130525: updated links to Escape package. I have created a small Unity package for teaching unity basics. You can download it at http://www.mediafire.com/download/y5i38txo42fj8i3/escape.unitypackage.zip (requires Pro, as it uses Image Effects and Sound Effects). http://www.mediafire.com/download/2bdmrn5j4vcikpa/escape_stripped.unitypackage.zip (work in free). To use this create new unity project (File->New Project…). Select  Toon Shading (and Image Effects if you have Pro) package(s) before creating theContinue reading “Unity Examples”

Perception System Explained

Here is a bit explanation how the perception system code works. Basic features of the code is as follows If the player object is behind some other object, it is not seen. This is tested with Physics.Linecast from the center of perceiving object to the center of the player object. If player object is reallyContinue reading “Perception System Explained”

Simple Perception System (Unity, C#)

Here is a very simple perception C# code that I used my lecture today for Unity. Function that can be added to the Enemy class to check if the enemy sees the player object or not (the code for other functionality can be found on the post /2011/10/29/intro-to-gameplay-programming-with-unity/). With this code, an enemy can perceiveContinue reading “Simple Perception System (Unity, C#)”

Intro to Gameplay Programming with Unity

This post contains an solutions  to my Unity programming exercises and classes I showed at the lectures. This post cover coding following game logic: a waypoint track an agent following a waypoint track display two meters  for energy and health collectable powerups for gaining health and power

Intro to Unity GUI

This post contains an solutions  to my Unity programming exercises and classes I showed at the lectures. This post cover coding some basic things about using Unity GUI system. StartScreenGUI (C#) This class creates simple re-sizable and skinnable start screen for a game with main screen, credits screen, and confirm screen for quitting. The mainContinue reading “Intro to Unity GUI”