The First Prototype

As planned, I have been working on my first prototype for my persistence layer. This prototype will be integrated into a current project with a deadline so it needs to be simple.

I have chosen the most promising methods for dealing with each sub-problem which I have identified in my earlier preliminary research.

Extraction

By extraction I mean the method by which the relevant data is collected and extracted from the current state of the game. I found three candidate solutions to solving this:

  1. Domain model: Have all game objects contain references to separate data objects.
  2. Reflection: Have all game objects use annotations to mark data they want serialized, and extract using reflection.
  3. Manifest: Keep all data separate in a single object graph, commonly called a manifest

I decided that reflection is the most promising candidate for the first prototype, since it would enable a lot of flexibility and not require a major restructuring of the already existing code base. It results in a slightly more complicated persistence layer but is offset by the ease of development for the user. It was inspired by the way object relational mapping is commonly used in Java and to a lesser extend .NET systems.

The domain model and manifest solutions would result in a simpler persistence layer, but would require a lot of changes in the existing code base to supply the relevant data.

Serialization

I am working in Unity, which means I have access to most functionality in .NET implemented by Mono, including serialization.

  1. XmlWriter/XmlSerializer: serialize to XML
  2. BinaryFormatter: serialize to binary stream

The choice of serialization method to use is sometimes very dependent on the situation, but usually comes down to preference. In this case I was given to understand that the data would be sent to a server later, so encoding to text was recommended. Xml was the logical solution to use in this case.

Storage

During testing, storing data on the filesystem makes analyzing it and debugging easier, but later the data should be sent to a web server connected to a database. I decided to make the system flexible by creating interchangeable modules to change the behavior when needed. I made one module to save to the filesystem using a FileStream and another to interface with a different system handling the remote server.

Reconstruction

To prepare for reconstruction, I made sure to structure the serialized data in such a way as to be able to keep it apart later and still know where everything belongs. This is why I gave every entity a unique identifier. This allows the system to restore all the data to where it belongs. The actual restoring of the scene can by a combination of the following methods:

  1. Automatically save and restore entire scene hierarchy related to the entity
  2. Save entity and use custom methods per entity for restoration after loading the data.
  3. For dynamic entities that should be instantiated, the factory pattern is a good approach.

I decided to go for the second option for two reasons. The most important reason is that option one would make the persistence layer very complex, and I do not have the time right now to implement such a solution, while the sacrifice in usability is very small. Each entity can easily handle its own initialization after being loaded with data by implementing OnAfterLoad and other methods. The other reason is that the first option might lead to a lot of redundant data, which might create storage issues and would introduce a lot of places where things could go horribly wrong.

To summarize

I have chosen the best solutions for the sub-problems identified and started implementing the first prototype. Initial results seem very promising. The prototype has already been integrated into the main project to have actual data to save and it is performing nicely. There are still a few kinks to work out, and a few glaring shortcomings, but it will serve for the current purposes.

Research on Persistence

The past week I have been doing preliminary research on persistence in the context of game development in preparation to developing a standard system to handle this.

I have scoured the web and found quite a few sources on this topic, though most of them have not been very useful. Most questions and responses in the Unity community focus on the smaller problems like serialization. There is very little deeper discussion on the design of systems that should handle this. The same goes for most game development forums. It is commonly said that every game has different needs and thus persistence should be custom-built for every game. I am not satisfied with that, because I feel that most of them deal with fundamentally the same problems, just in different situations. In my opinion, a lot of this could be generalized.

The problem of persistence has been largely solved in enterprise software. There are advanced databases and other data stores available, with abstraction layers to ease development. Application functionality is divided into domain models for persistence and other parts for the rest of the functionality. This makes persistence a trivial problem for most software engineers.

This is usually not the case in game development. In my experience a lot of games are developed more in an ad-hock fashion than most  applications. For reasons of performance and ease of use, the data we want to save is often embedded in the scene in ways that make it difficult to get it out if persistence was an afterthought. Any Unity developer who has ever tried to save and restore entire game object hierarchies at run-time will know the difficulties I am talking about. Whether these designs are wise is another matter I will not go into here. In addition to this, there is the fact that different games use different storage methods. Some might use a save file on a local hard disk while others will save state to a web service or database. All these circumstances make persistence for games a touchy subject.

I took another close look at all the resources I had gathered and noted that the entire problem of persistence in game design can be summarized in a few sub-problems:

  1. Extraction: Separating the data you want to persist from the rest of the game
  2. Serialization: Encoding the data into a sequential format suitable for storage and back
  3. Storage: Actually storing and retrieving the serialized data
  4. Reconstruction: Reconstructing the scene or game state from loaded data

In a lot of situations, these problems might overlap or even blur as to be almost indistinguishable from each other. At all times every one of these problems is present in some way. Most resources I have found focused on serialization and storage. The more difficult problems are actually extraction and reconstruction, but often overlooked, which often causes problems in serialization.

For each of these problems I have found a number of ways to deal with the problem. I will choose the most promising solutions I have found and integrate these into my first prototype.

Internship at Little Chicken

Soon after the jam I started on my last semester of my studies and my planned internship at Little Chicken Game Company in Amsterdam. Among other work, I will be doing research on and developing a standard, flexible, and easy to use system to handle persistence in games, in the Unity environment in particular.

Goals of this project:

  1. Standard system: Take care of all the little details and make the game developer’s life easier when dealing with persistence in games.
  2. Generic: Relevant and usable in as wide variety of use cases and types of games as practically possible, though there will always be exceptions.
  3. Simplicity: Adding extra types of persistent game elements should be intuitive and involve minimal effort, and minimal intrusion into the rest of a project’s code base.
  4. Flexibility: Easily adapted to situations requiring different forms of serialization or data storage.

The past weeks I have mostly been getting acquainted with the environment, setting up my workstation, and writing my project initiation document. I have also poked around at the existing code base to get familiar with the current project my solution will be integrated with.

I plan to do some preliminary research on my topic of persistence in games, after which I will develop a number of prototypes. For each prototype I will evaluate its strong points and shortcomings. This way I can iterate towards the final solution.

Global Game Jam

A lot has been going on these past few months for me. I am sad to say this blog has been neglected a bit, though that will change.

In Januari I participated in the Global Game Jam, in location Hilversum. Me and my team made a very nice and simple game which was received very well by the audience and which won third prize in the popularity contest and first prize by the jury. Me and my team are now looking at options to develop this further. Jamming is a great experience and I recommend it to every game developer.

Download

Good and Bad news

I’ve given up. I was originally planning to look at game reviews and marks at Metacritic, but I can’t think of any good method to collect some sensible results and conclusions using this source. So I have decided to take a different direction.

In my revenue analysis and the Google trends post I believe I have already answered my main research questions.

Conclusion: The rise of social and casual games does not seem to have any effect on the success of the core games market.

The two markets are very different, with two different types of audiences. Core games will keep gaming like they are used to. They might play mobile games on the road and stuff, but at the end of the day, the pc or console is their home. Most casual gamers will probably never be interested in core gaming if they weren’t already.

I’ve decided to take a look at another topic which is tangentially related to what I have covered until now though I’m not going to research this in-depth.

What effect will the growing casual and social games markets have on those casual and social gamers?

To get why I asked this question, some background story might be in order.

About a year ago. In school we had a course about the development of social games. Among other tasks, me and other students were required to play various social games and analyse them. One game that I clearly remember was Bejeweled Blitz. It was boring… and then it was fun. Students were joking at each other about playing bejeweled while  supposed to do other stuff. Most people stopped playing pretty soon after the course, but some kept going, clearing screens and screens of brightly colored gems, over and over. I joked it was like a slot machine in that the act of pulling the rod was all that was needed for some fleeting satisfaction. I wasn’t far from the truth. The game actually had a slot machine which you could use for free once every day to get bonus points you could use to buy aids in the game. Of course this slot machine could also be filled with facebook credit…

Bejeweled Blitz: Free Spin

Do you think this is a game?

The point being, the game was addicting. Frighteningly so. Now there are also core games which can be quite addicting and suck huge amounts of time, but those games do not have micro transactions. Another anecdote would be a friend of mine, who quite some ago, complained to me about how he was tricked into buying smurfberries in a mobile game. This game might not have been very addictive, but it was arguably way too easy to spend a fortune on those smurfberries without realising it.

It seems I am not the only one to have noticed this:

Apparently a lot of people struggle with the lack of ethics the newcomers to the gaming market seem to have. My personal favourite is the piece by Insertcredit, which I believe is a very good description of some casual and social games developers groups’ thought process.

Using a variety of psychological tricks. The game developers try to milk gamers for all their worth. I wouldn’t be so bothered by this if not for the fact that it happens on an unconscious level. Some gamers will not realise how much they spend, at the end of the day. They will not be able to make rational decisions based on how much they spent or are willing to spend and how much entertainment is worth to them. It’s sneaky. It seems like something invented by people purely in the business for profit, but without passion for games.

Is this really where we want to be going? To a world where the gullible are so easily parted with their money just to continue their addiction to an otherwise pretty boring game?

Food for thought. And if you’re ever playing a game and being tempted to buy some small item or other thingy, think back on this and say to yourself: ‘Do I really want to buy this?’


Previous posts in this series:

  1. A Research Project: The rise of casual games and it’s effect on gaming.
  2. A question of definitions
  3. Analysing game industry revenue: A frustrating endeavour
  4. A ‘Trendy’ topic

A ‘Trendy’ topic

Right now I’m figuring out in what other ways I can expand this research. I’m considering doing something with review sites like metacritic, but I’m having trouble deciding on a good method to determine something useful out of the huge amount of marks and reviews. It’s quite the opposite problem of what I did with the revenue analysis. While that was very objective, but hard to find numbers, this is very subjective but also easy to find.

In the meantime I try to do other things. Today I took a little bit of time to see what google trends is saying about users’ search results about a few topics.

Click through to go the the actual google trends page.

In google trends I entered a query for the following topics:

  • pc games
  • console games
  • casual games
  • social games
  • mobile games

I Decided to separate both categories into the most commonly used terms. PC games seems to be the most often used search term, followed by mobile games. The others seem insignificant in comparison.

I believe the console games trend is lower for two reasons. First is very likely the fact that the console market is very fragmented, with various different devices and platforms. Gamers are more likely to search for games on their specific console than the general category. This is not the case for the PC category, where almost all games are developed exclusively for Windows, though this is slowly changing. The second reason might be that console gamers are perhaps more likely to walk into a store and buy games on impulse, though that is only my personal guess.

On the other end of the spectrum, mobile is doing very well while casual games and social games receive almost no hits at all. This is again probably an issue of fragmentation. Casual gamers these days can search for a mobile game and in a lot of cases discover it is available on both the iOS and Android app stores. There is some fragmentation but it is nowhere near the social gaming market, which has to deal with exclusives and lock-in caused by the fact that it is hard for users to switch social networks because all their friends would have to switch with them.

Another interesting trend is the yearly spike around the winter season for PC games. This is obviously the holiday season. Game publishers take special care to try and release their games in this period to maximise exposure and revenue in a period where a lot of people are looking to buy presents for themselves or others. This is also visible on mobile to a lesser extend.

Perhaps the most interesting trend that jumps out at me is the permanent jump of mobile games around winter 2009. I immediately got a hunch about this one. After double checking it seems that my suspicions were probably right. December 11, 2009 was the release that of what is probably the most popular mobile game to date: Angry Birds. I remember there was a lot of hype about this game both online and offline. This probably introduced a lot of new people to mobile games for the first time. Since then it has been steadily growing. At the time of this writing it has reached almost half the amount of queries for pc games. Mobile gaming at least, is here to stay.

Next post in this series: Good news and bad news

Analysing game industry revenue: A frustrating endeavour

I should warn the reader that what follows is a wall of text and a somewhat (but not very) interesting  line chart.

So I thought I would be smart and tackle part of my research from the economic angle. Money makes the world go round, after all. I thought this would be useful because it consists of hard numbers and quantifiable results that can be compared to form trends and stuff.

I could not be more wrong.

Gathering comprehensive, accurate statistics of the gaming industries revenue over a period of just ten years is Hard, with capital H! After scouring all over the web I had dozens of sources consisting of news articles, blog posts, and press releases. All of them containing little tidbits of information and conflicting with each other half the time. Of course the actual reports are safely locked behind paywalls. And that is not even considering that some companies, like Valve with their Steam platform, refuse to give anyone information about their revenue.

Another great difficulty was the absence of revenues for different sub industries. I was able to get decent data for the global total revenue over time, but not for either Core games or Casual games. Part of this is the fact that these things are normally divided into console and pc gaming revenue, with casual games a distant extra. This information also gradually get less easy to find as you go back in time.

Results and methodology

Nevertheless, I managed to create a spreadsheet with data which is hopefully somewhat accurate. Wherever I wasn’t sure because of conflicting sources, I took a guestimate putting it somewhere in the middle. For ease of analysis I considered core games to be pc and console games. I made a chart to visualise the data and any trends. It’s interesting but also incomplete so there is very little to be concluded from it.

Game industry revenue chart

The most obvious conclusions that can be drawn from this graph are the following:

  • Core gaming is more than half of the total gaming industry. (This is probably an understatement)
  • Casual gaming is still very small compared to core gaming in revenue.
  • The global gaming industry is steadily increasing and projected to continue this way. This goes for both core gaming and casual gaming.

Conclusion

My preliminary conclusion from this is that the rise of casual gaming does not have any significant effect on the rest of the game industry in terms of revenue. Of course this might change with all the buzz that goes around about casual gaming these days, or it might not. People can be fickle.

Now that I’ve given this more thought, I believe the results actually make sense. The social and core gaming markets are probably two different beasts. What follows is mostly conjecture by me. Even though they are both considered part of the games industry, they are really quite isolated. The two markets are very separate.

A console gamer might decide to play some casual or social games during his commute or similar situation, but at home he will probably go back to his console or pc quite fast. He will not reduce his regular amount of core gaming. Similarly a casual gamer attracted to mobile/social games will not easily make the transition to core games any more than he normally would because he is not interested in that. If he did have an interest in that, he would already be a core gamer. So it is a moot point.

Based on this theory and the numbers I believe both markets will continue to run parallel to each other for the foreseeable future. It also looks like both of them are still on the rise, so we will be able to look forward to both a lot of casual and core games.

Sources: [1], [2], [3], [4], [5], [6], [7], [8], [9]

Next post in this series: A ‘trendy’ topic

A question of definitions

Parabolic throw: We all know it's real use. (Angry Birds)

Casual or something else?

For a little while now to aid me in researching this topic I have been searching for information in the form of articles, post, statistics and other resources. It was not long before I realised something that made my task very difficult initially.

The field of games is, quite frankly, absolutely huge. This is a very good thing. We all like to be able to choose from a wealth of games to pick and choose the ones that suit our preferences, and to have some variation every now and then. Unfortunately this also made it very difficult for me to see the forest from the trees.

To be able to draw some sensible conclusions, I really needed to be able to divide all those games into two big categories to analyse the differences. Thus I had to create some definitions. Of course there are issues with this approach. There’s a ton of different games and almost as many genres, and it can sometimes be difficult to say which of these categories a game belongs to because of overlap.

Casual Games

These games are developed for the general public, people who do not generally consider themselves gamers. They might encounter the game by chance or they might just be looking to pass the time for a short while. As such this audience naturally has a short attention span given their situation. If the game doesn’t spark their interest they will stop playing quickly. Thus it needs to be easy to play and give rewards quickly. To target the widest possible audience they are often non-violent arcade games. The prime examples would probably be Bejeweled and Angry Birds.

To summarize, casual games are mainly characterized by these characteristics:

  • Wide audience
  • Short learning curve and quick rewards
  • Short play sessions (eg. 15 min.)
  • Non-violent
  • Arcade or Board games

Core Games

Games like these is what most people thing of when they hear the word video games. It is the foundation of current gaming culture. This historically mainly referred to modern games with high-end technologies, such as the latest Call of Duty, or strategy games and simulators with great depth. But it also includes the recent trend of indie games such as for example Minecraft and the Humble Indie Bundles. These games are meant for an audience familiar with gaming, who are looking to challenge themselves and spend more time on games. There is also a huge variation in genres.

I had a lot of difficulty finding a good term for this category. I didn’t like the word traditional because it has some negative connotations and I also did not like hardcore because it would imply a smaller audience than it deserves. Core seems just right.

Core games mainly have the following characteristics:

  • Core or niche audience, depending on the genre
  • Steeper learning curves
  • Longer play sessions (eg. 30 min. +)
  • From non-violent to blood and gore
  • Harder Arcade, Fast paced shooters, Skill and strategy

Of course these categories are not set in stone. There are undoubtedly exceptions to rules and anomalies which don’t quite fit, but I believe this to be accurate for my purposes.

Next post in this series: Analysing game industry revenue

A Research Project: The rise of casual games and it’s effect on gaming.

In my previous post I explained that I am starting this blog to share the results of my research project, among other reasons. The subject of my research project will be the rise of casual games and the effect they may have on the more ‘traditional’ gaming market.

Why this topic?

When our assignment was first explained, we had a discussion on the subjects each of us was irritated or concerned about related to gaming. Some moment during the discussion I vented my frustration that both in the news and in school, there was an awful lot of focus on casual and social games. I had a sneaking suspicion that this might be bad for me and other gamers who prefer to play ‘traditional’ or ‘hardcore’ games.

My suspicion is that more developers will focus on casual games which means there will be less developers working on bigger games. Of course I might be completely wrong on this. Maybe these developers will later go on to make hardcore games. Maybe there is no significant effect. There’s a lot of factors that might play a role. This is why I think it might be interesting to investigate this trend and it’s effects. Thus my research will be as follows.

Abstract

In recent years the gaming industry has increasingly noticed and catered to the growing market of casual gamers, reached through new platforms like social media mobile devices. These days a huge number of  people play casual games, be it on the train or the bus, on their smart phone or on their social network.

These simple, short games are much more accessible to people who would not normally consider themselves gamers which is why they represent a new market. Traditional video games or ‘hardcore’ games as I like to call them focused on a demographic of people already familiar with video games and who were expecting to invest time and effort into the game to enjoy its fullest potential. These demands are in direct contrast  to the demands of casual gamers.

This study intends to examine the hypothesis that ‘The rise of casual gaming has a negative effect on new games for hardcore gamers’ using the questions ‘What are the sizes of both the hardcore gaming and casual gaming industries, now and in the past?’, ‘Has the supply of hardcore games changed in the recent years?’ and ‘How are these related?’. I will examine these questions using revenue statistics and games reviews.

Next post in this series: A question of definitions

The birth of a game developer’s blog

Lo and behold. Welcome to my new blog about game development musings, research, snippets and other stuff. Here’s your achievement for reading the first post!

Achievement get! Read first post!

With that out-of-the-way, now for the important part of this post.

Why create this blog?

Recently, during my Game Design course, we got the assignment of doing a small research project on a subject related to game development or the games industry. For my own research subject I decided to investigate a recent and very specific trend in the game industry, which I will describe in my next post.

One of my tasks was determining how I intend to do my manifest. How should I present the results of my research to the outside world? The obvious choice for research results is usually a scientific paper. But that’s boring. Me and my classmates were encouraged to use alternative forms of media appropriate to our research subject. Finally I settled on a weblog for two reasons.

  1. I know my target audience will be mostly game developers, and to a lesser extend, gamers themselves. Developers will be interested because it might influence how they think about the game industry and how they make games. Some gamers might be interested because the trend I’m investigating is likely to have an effect on their gaming. A blog is very accessible to both groups and might encourage discussion in the comments on each post.
  2. For a few years I have been gathering experience in game design and development and occasionally, I felt the need to share my findings with others. At the same time I was reluctant to create a blog for fear of losing interest and neglecting it after a while. Maybe this will provide a kickstart to get me going and keep me blogging even after this project.

In summary:

I will use this blog to share the findings of my research project as it progresses and later on, I will use it to share other stuff related to game development. Stay tuned, and don’t hesitate to comment on my ramblings!