• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
  • entries
    5
  • comments
    5
  • views
    7862

Using Geographic Information Systems (GIS) as a game analysis tool

Sign in to follow this  
Followers 0
mipmap

1676 views

[color=#ff0000]Public Draft[/color]

In this entry I will argue that Geographic Information Systems can be useful in

game development.

I'm a hobbyist game developer and hobbyist GIS hacker. Please take my opinions with a grain of salt.






What is a Geographic Information System (GIS)?


A GIS consists of a database that supports spatiotemporal data and some form of interface that can make use of it. Somewhere in the tool chain you might find some analysis tools.

  • Examples of [color=#696969]rendering tools[/color] are are Open Streetmap (open source), Bing Maps and Google Maps.
  • Examples of [color=#696969]analysis tools[/color] are Grass (open source), ArcGis and MapInfo.
  • Examples of [color=#696969]database systems[/color] that can handle spatiotemporal data are PostGis (open source), MySQL with spatial extentions and Oracle Spatial and Graph.

    There are of course many more on the market, but I think these are the biggest ones. The analysis tools can of course render data, and the renderings tools usually comes with some API:s which you can use for data analysis.

    A GIS database have extra features to manage spatial data.

    • Extended native datatypes: point, path, polygon, raster.
    • Extended comparisions: contains, inside, length, area, volume etc.
    • Examples on spatial SQL

      ~




      Relevance to game development: stacking gameplay data


      If you run many tests you will pile up a large quantity of data. Drawing conclusions from one game at a time can be useful, especially if you have player reactions on record. But in order to analyse patterns in larger sets of games; traditional replay features are not enough. You need to stack data and render it all at once. A GIS is very good at this as it can store large quantities of data and is optimized to query it using geometric and traditional attributes.



      As a side-note: a game that actually has this feature is SuperMeatBoy, where you can see all your previous failures once you complete the level.

      ~


      Relevance to game development: analysis


      Many 2D and 3D games generate spatiotemporal data and a GIS is built to manage them. Gis analysis tools are used to analyse data.

      [color=#696969]Descriptive analysis[/color]

      • How many times does unit type A kill unit type B in the valleys and creeks outside the castle?
      • In a set of 1000 games, how does the players behaviors affecting the random enemy-wave generation?
      • How far into enemy territory are players generally able to make it before they die, on this asymmetric multiplayer map?
      • How many "predefined incidents" occurred in the first 3 minutes of gameplay where the server was X, players were from countries A,B,E and how long did they continue to play after that.

        [color=#696969]Predictive analysis[/color]

        • [color=#696969]W[/color]here will players most likely diverge from the game-designers intended path?
        • Where will the hardest battles take place? How will the AI move NPCs across the map?

          [color=#696969]Data mining [/color]

          • Where in the levels are players getting lost?
          • Where does big battles take place?

            [color=#696969]Player event logging[/color]

            • Gather data on special events that can be considered bad manners.

              I think the descriptive analysis, data mining and event logging are the most useful analysis forms. Predictions can be hard since games are in their essence models and predictive analysis are models, which would mean you are modeling model behavior.

              ~


              Generating data


              [color=#696969]GIS tools are built to import/export industry standard file formats. [/color]If you make your game export data in one of these formats you won't have to do any processing before importing it into your database.

              [color=#696969]Data[/color]
              The data is points, lines, polygons, timestamps, game-event-ids and such.The data that games produced is "perfect" compared to real-world data which is full of imperfections. As a result y

              ou don't need the most advanced tools on the market because a large part of their features are there to manage these imperfections.



              [color=#696969]Metadata[/color]
              A very important aspect of any professional GIS is to [color=rgb(105,105,105)]use proper metadata[/color], which are xml files containing information on how and when the data was created. If you follow industry standards in this aspect as well, the GIS software will help you stay organized as the project moves forward. In a game development setting the metadata can be build version, players, purpose and level/mission information.

              [color=#696969]Rasters[/color]
              A raster in a GIS environment are pre-rendered background maps, satellite photographs etc. They can also be heatmaps, where each pixel represents a aggregated value of that particular spatial "square".

              [color=#696969]File formats[/color]
              I'm not good enough at GIS to give recommendations on file-formats but here are some starting points:

              • Wikipedia - GIS file formats
              • [color=rgb(0,0,0)][font=sans-serif]

                GML and GeoJSON GeoTIFF are my favorites and can be a good starting point.

                [/font][/color]


                ~



                Overkill?


                One might argue that military grade mapping tools are overkill for a indie or any studio who has some xyzt coordinates to be rendered. However, if you stick to the standard formats you will be able to take advantage of already existing tools. [color=#696969]Very clever persons have already done all the thinking.[/color] These tools are mature, free (in some cases), can handle large quantities of data and support very sophisticated analysis. Furthermore:

                • [color=#696969]Instead[/color] of spending developer time on in-game analysis tools you spend it on building export capability to these industry standard formats.
                • Industry standard file formats are likely to have [color=#696969]ready-made export libraries[/color] already written in your favorite language.
                • The skills of the involved programmers are not a limitation to how complex analysis you can make.

                  ~



                  Use case 1: 2D Tennis game


                  I have been building a Pong clone for a contest in the beginners forum. The game contains some random events: cars (AI-controlled pads) and the ball are launched at random velocities at random times. How does this play out in larger sets of games? Will the random elements really be random within the bounds I intend it to be?

                  One way of finding out is to let the game run for a long time with and without player input. The starting velocities, positions and time-to-death/loss would be logged into an array with simple (time,x,y,eventClass) coordinates. This data could be copied into a spreadsheet such as Excel or LibreOffice Calc.

                  In here, make a diagram. Set its background to be a screenshot of the game-board. Add the data to the board as a scatter-plot and filter out the classes you don't want. You might have to edit the x,y-axis span so that the points will be mapped to the correct parts of the screen.

                  [sharedmedia=gallery:images:4368]
                  An example where I did this in a StarCraft II map. I'ts a simple heatmap of unit-death events from one game.


                  ~


                  Use case 2: StarCraft II - advanced


                  << Logging game events, store them in PostGis database, run queries and render with OpenLayers. >>
                  [color=#696969]Why doing it[/color]

                  [color=#696969]How I did it[/color]

                  [color=#696969]Post-mortem [/color]

                  [color=rgb(105,105,105)]Summary[/color]
                  This adventure was mostly an experiment to see if it was possible, and it was. However the project grew out of scope so I never finished. The questions I wanted to have answered could be answered using Excel.


                  ~



                  Use case 3: MMO super project


                  <>


                  ~


                  Career


                  The gaming industry can be quite stressful. If you at some point want to change career into something more stable, skills in GIS can be useful since government agencies and business worldwide use GIS quite a bit.

                  Summary

                  1. It is a good way to organize player data
                  2. I'ts made to handle large data-sets
                  3. Products on market are mature
                  4. Alternative career path

                  The tools for analysis are there, they are mature and there are plenty of experts in the field.


                  Further reading

                  • Cartesian coordinate systems
                  • Mercator projection to translate round earth to flat map projections are used. Cylindrical projections such as the mercator projection have simple x,y coordinates and is thus useful as a projection for game data.
                  • Albert K.W. Yeung, G. Brent Hall (2007) Spatial Database Systems - Design, Implementation and Project Management.

2
Sign in to follow this  
Followers 0


1 Comment


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now