There is an interesting essay on The Game Design Forum about “Acceleration Flow” or the rate of leveling up in video games. The author spends a couple thousand words examining the psychology around leveling up a character or hunting down loot in a game. His points mimic others that I’ve read on keeping gamers at the controls by offering rewards at the perfect pace. Too many rewards too quick and the player is over powered and quickly bored.
Brokenness, especially the experience correction, can be a letdown after the thrill of acceleration. Following any acceleration will be the period of god-like ease. Especially in very hard games, this period is very entertaining, and in a sense it emulates the traditional feeling of flow, where a player is able to take on the hardest challenges without experiencing too much stress. Still, it won’t be long from the point the game gets easy that the player will become bored.
The most important take away from the essay is on the ideal S-curve for leveling. Basically summed up, level up fast in the beginning of the game to teach the mechanics of improving the character and also getting the player hooked on the anticipation of what is possible. Then the game should settle into a nice linear curve as the story progresses with a final acceleration towards the end. I can think of a lot of RPGs where the final hours of the story involve a dramatic exponential boost in the character’s levels, abilities, and power then a final challenge and a satisfying ending.
Here’s a quick tutorial in storing persistent information about your Unity Games.
PlayerPrefs is a class in UnityEngine that stores and accesses player preferences between game sessions.
- The class works like a dictionary by pairing keys and values
- There is no boolean variable type, so use an int with 0 = false and 1 = true (old school)
- The web player only stores 1 Megabyte, keep that in mind and always use a try catch block to avoid uncaught exceptions
- This class will throw a PlayerPrefsException
//Save and retrieve a high score stored as an integer:
GameManager.instance.highScore = PlayerPrefs.GetInt("HighScore");
//Save and retrieve the players name:
GameManager.instance.highScore = PlayerPrefs.GetString("player1Name");
//Clear just the stored high score
//Clear all the data:
//Check to see if we've previously stored something, like the
//last saved level. If the key exists then load the level, if
//it does not, then load the first level.
The following is from the Unity Script Reference on exactly where the data is stored:
On Mac OS X PlayerPrefs are stored in ~/Library/Preferences folder, in a file named unity.[company name].[product name].plist, where company and product names are the names set up in Project Settings. The same .plist file is used for both Projects run in the Editor and standalone players.
On Windows, PlayerPrefs are stored in the registry under HKCU\Software\[company name]\[product name] key, where company and product names are the names set up in Project Settings.
On Linux, PlayerPrefs can be found in ~/.config/unity3d/[CompanyName]/[ProductName] again using the company and product names specified in the Project Settings.
On Windows Store Apps, Player Prefs can be found in %userprofile%\AppData\Local\Packages\[ProductPackageId]>\LocalState\playerprefs.dat
On Windows Phone 8, Player Prefs can be found in application’s local folder, See Also: Directory.localFolder
On Web players, PlayerPrefs are stored in binary files in the following locations:
Mac OS X: ~/Library/Preferences/Unity/WebPlayerPrefs
I found a new marketplace today that I’m excited to explore. It looks like the prices are decent but any sprites will have to be hand cut in unity since this site sells engine-agnostic assets. I can’t believe how easy it is to fill in the gaps for an indie developer. I can focus on programming and pay to fill in the graphics, ui, and music gaps.
Game Dev Market
I’m starting this project for two important reasons. The first reason is that I’ve been a consumer most of the 31 years of my life. None of us are too long for this world and many of us get through it just consuming. I’m not vilifying consumption but I think there should be more of a balance. I want to produce more in order to even out my personal balance. I’ve had the occasional project and volunteer regularly but I want to do something that brings little moments of joy to a larger audience. Video game development seems like a likely choice in order to reach a huge audience. More people are playing games today than ever before. It’s not just the engrossed streamers, the professional MOBA players, and the lifelong gamers, now even the average person dinks around on their smart phone. Technological immigrants are playing addicting phone games. Geographically separated families connect online and pass the time with board games, word games, puzzles, and sims. Video games are my best chance and reaching the widest audience.
The second and more important reason for getting into game dev is that I want to make games for my kids and about my kids. I’ll churn out the occasional kid’s app to entertain them on car rides or teach them some basic colors, shapes or animals. But, I also want to make some adventure games that star my two sons. Right now they are two years old and five months. I’m hoping that they will pick up these games in a few years and see them is a good memento. Right now I’m thinking of a platformer series that would be fun to create.
Lastly, I’ll be documenting my journey as I learn to share with others that might want to get into game dev. I’ll link to the plethora of resources out there and maybe write a few of my own tutorials. I’m hoping that in doing this, I’ll be able to get feedback from the wide audience out there. The kind of feedback that can turn a quaint hobbyist game into something worth playing. Thanks for reading.