I’ve posted on Gamasutra the full story of creating Coops & Dragons, a board game on platform cooperativism which is free and available on Github.
I also published a “how to play “video:
I’ve posted on Gamasutra the full story of creating Coops & Dragons, a board game on platform cooperativism which is free and available on Github.
I also published a “how to play “video:
We just created a web page which lists the main applied games we created in the last four years. These are all playable, either as direct link in the page or by requesting a link, for games unreleased or still in private beta.
We learned about game design, development and domain modelling from each project. Each game has been effective in some application, and we thank all the people we worked with that made this possible. Learning from many and always new mistakes, we refined our process along the way.
We now cover all aspects of creating applied games, from creating a concept, to domain modelling with the field experts, to mechanics and multi platform release.
We worked with museums, research centres, private companies, NGOs – always with people with specific, refined knowledge and expertise, focusing the game design process on their core knowledge. This process generates original, unique game play experiences.
I hope you will work with us to create more games, using this wonderful medium for making learning complex topics a more accessible and universal experience.
I was looking for a way to have a build number in Unity so that:
The idea is simply to have an editor script that changes a prefab (so that you can place it in every scene, but has a global state) each time you run. Here is my code, which you can fit to your needs (this also does the life-saving “save scene before run” which you may pick too):
// Author: Pietro Polsinelli - http://designAGame.eu // Twitter https://twitter.com/ppolsinelli // All free as in free beer using TMPro; using UnityEditor; using UnityEditor.SceneManagement; using UnityEngine; using UnityEngine.SceneManagement; namespace OL { [InitializeOnLoad] public class AutoSaveOnRun { static AutoSaveOnRun() { //Thanks https://twitter.com/andrewlukasik for the "+=" fix. EditorApplication.playmodeStateChanged += () => { if (EditorApplication.isPlayingOrWillChangePlaymode && !EditorApplication.isPlaying) { GameObject build = AssetDatabase.LoadAssetAtPath("Assets/__Scripts/Tools/Components/Build/Build.prefab", typeof(GameObject)) as GameObject; if (build != null) { TextMeshProUGUI bn = build.GetComponent<TextMeshProUGUI>(); if (string.IsNullOrEmpty(bn.text)) bn.text = "1"; else { bn.text = (int.Parse(bn.text)+1).ToString(); } } EditorSceneManager.SaveScene(SceneManager.GetActiveScene()); AssetDatabase.SaveAssets(); } }; } } }
In order to change the build on compile and not on save, I now use this code in the (also very useful) stop-play-on-compile class:
// Copyright Cape Guy Ltd. 2015. http://capeguy.co.uk. // Provided under the terms of the MIT license - // http://opensource.org/licenses/MIT. Cape Guy accepts // no responsibility for any damages, financial or otherwise, // incurred as a result of using this code. // Modified by Pietro Polsinelli. 2017. https://twitter.com/ppolsinelli public class ExitPlayModeOnScriptCompile { static bool increasedBuildForThisCompile; // Static initialiser called by Unity Editor whenever scripts are loaded (editor or play mode) static ExitPlayModeOnScriptCompile() { Unused(_instance); _instance = new ExitPlayModeOnScriptCompile(); } ExitPlayModeOnScriptCompile() { EditorApplication.update += OnEditorUpdate; } ~ExitPlayModeOnScriptCompile() { EditorApplication.update -= OnEditorUpdate; // Silence the unused variable warning with an if. _instance = null; } // Called each time the editor updates. static void OnEditorUpdate() { if (EditorApplication.isCompiling && !increasedBuildForThisCompile) { increasedBuildForThisCompile = true; GameObject build = AssetDatabase.LoadAssetAtPath("Assets/__Scripts/Tools/Components/Build/Build.prefab", typeof(GameObject)) as GameObject; if (build != null) { TextMeshProUGUI bn = build.GetComponent<TextMeshProUGUI>(); if (string.IsNullOrEmpty(bn.text)) bn.text = "1"; else { bn.text = (int.Parse(bn.text) + 1).ToString(); } } } if (!EditorApplication.isCompiling) { increasedBuildForThisCompile = false; } if (EditorApplication.isPlaying && EditorApplication.isCompiling) { Debug.Log("Exiting play mode due to script compilation."); EditorApplication.isPlaying = false; } } // Used to silence the 'is assigned by its value is never used' warning for _instance. static void Unused<T>(T unusedVariable) { } static ExitPlayModeOnScriptCompile _instance = null; } }
Yet another approach is to identify the build number with a platform build (I don’t use that because I want density): https://gist.github.com/andrew-raphael-lukasik/36a30f0955d7cdc758e394dc4e7266bf.
Follow me on Twitter where I post about game design, game development, Unity3d 2D, HTML5, applied / serious games.
I just posted on Gamasutra a curated list of recent and less recent posts / videos on writing for games – here
I just published a post on Gamasutra Videogame Dialogues: Writing Tools And Design Ideas, written with the voltairesque Daniele Giardini. We write about our current experiments with writing tools and dialogue user interface design. Hope you’ll find something useful there!
Modelling character traits can be tricky: an example problem has been presented by Jon Ingold in this GDC talk. I discuss the problem below and present a sample model that solves it. I provide an implementation in a C# class.
For character trait one may think of say the character happiness, or a relationship-with-X trait.
The problem is presented from minute 36 of the talk: the first idea that comes to mind in modelling a character trait is by using a number. Greater the number, better the state of the trait. This doesn’t work very well.
Then Ingold quickly jumps to a proposed solution, which consists in tracking two numbers, positive and negative experiences:
Apart from the fact that changes are modelled more appropriately using two variables, what was exactly the problem with using one number?
Here is how I understood the problem: suppose you want to model the happiness of a character in a gameplay. You say that the variable HappinessLevel determines HappinessState according to these values:
HappinessLevel >= 5 = VERY_HAPPY
0 < HappinessLevel < 5 = HAPPY
-5 < HappinessLevel <= 0 = SAD
HappinessLevel <= -5 = SUICIDAL
The character goes through many episodes in two different game-plays: in one the character has 2 positive episodes, and 8 negative ones, and so goes SUICIDAL: 80% of the episodes were negative.
In another gameplay, the character has 20 positive episodes and 25 negative ones. Character is still SUICIDAL, but actually only 55% of episodes were negative! Something clearly does not work
Taking the hint from the talk above, I’ve implemented a generic class model for Character Trait that considers the whole set of the episodes. The set of states and their level can be injected; moreover you can have a “decay %” so that for each new episode, all previous ones have a decay, so older the episode less relevant it gets (by default decay is 1 so its turned off).
You find the class and a test (for Unity) in this zip. It can clearly be refined ad infinitum in function of specific needs, e.g. having episodes that are both positive and negative and so on.
A couple tests:
Thanks to Daniele Giardini for campaigning for LINQ removal from the code.
Follow me on Twitter where I post about game design, game development, Unity3d 2D, HTML5, applied / serious games.
I recently gave a workshop and talk at the Museum Digital Transformation conference.Thank you for all who came, it was great fun. [Read more…]
An attempt at visualizing Liz England’s useful operational explanation of what a game designer does: The Door Problem.
Design A Game is a site on game design and development. It is curated by Pietro Polsinelli, who is a game designer and developer. See all his works here.
Here you find the site dedicated to Pietro's book on applied games: Explaining With Games.
Copyright © 2024 Pietro Polsinelli