• 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
  • entry
    1
  • comments
    0
  • views
    3060

About this blog

My thoughts on software, games, development, troubles, solutions, etc.

Entries in this blog

MrSkullz
[color=rgb(0,0,0)][font=Arial]

[background=transparent]When interviewing new programmers I often ask "How would you model Age in years for a Person?" At first blush most will usually respond with "an integer!" and they are correct, but not correct enough. Actually there is no wrong or right answer (event saying "I wouldn't" because an Age may not be part of the requirements but lets leave that aside for the moment and assume that Age is required and you must model it).[/background]

[/font][/color]

[color=rgb(0,0,0)][font=Arial]

[background=transparent]Okay, so an integer:[/background]

[/font][/color]
age = 1
[color=rgb(0,0,0)][font=Arial]

[background=transparent]How about negative ages? Can someone be -3 years old? Not usually. Maybe in Dr. Who but you would need a Tardis class as well. You need to wrap the integer in an object to handle negatives:[/background]

[/font][/color] class Age: myAge = 1 def setAge(self, newAge): if newAge >= 0: self.myAge = newAge else: self.myAge = 0
[color=rgb(0,0,0)][font=Arial]

[background=transparent]You now have an Age class which is an integer with special logic. You have modeled the concept of age in a very simplistic form.[/background]

[/font][/color]

[color=rgb(0,0,0)][font=Arial]

[background=transparent]The importance of wrapping the myAge in a class should not be understated. This has a lot of cascading effects in the rest of the program logic. For example, every Person has an Age so you can see if one Person is "older" than another. You write your logical statements around the concepts you are working with, not around integers, floats, or functions.[/background]

[/font][/color]

[color=rgb(0,0,0)][font=Arial]

[background=transparent]If we define Person thus:[/background]

[/font][/color]
class Person: myAge = Age() myName = 'My name here!'
[color=rgb(0,0,0)][font=Arial]

[background=transparent]we then have two data models: Age and Person. The only things we are about with a Person is its age and name so our model is fairly sparse but could be sufficient. The fact that Person (model) has an Age (another model) makes it a data structure, meaning that one model is dependent on another. Data structures usually end up being trees or hierarchies with some kind of weird mesh of interrelated objects thrown on top. Generally speaking, a well defined and well maintained data structure is essential to a quality product because it clearly represents what is being modeled and how individual components interact with one another. Logic becomes clear, data pumps in and out, rivers flow with wine.[/background]

[/font][/color]

[color=rgb(0,0,0)][font=Arial]

[background=transparent]What does this have to do with game development? Everything. And I would argue that good data structures and OO design matter more for game developers than for developers working in normal industry. Game developers are making up logic about made up stuff for people who don't know the program logic. Unless you have a very VERY detailed design document your code will be the "right" answer because it is the only one. So you modeled Age as an int, stuffed it into a database as an uint, shipped it to the client as a hex, then displayed it as purple text. Six months later you get told "players are mad because their characters are dying of old age after only a month of game play!". Which int is wrong? Was it a problem unpacking the UDP packet? Was it the database upgrade? Is it a display issue? Who knows, fire up the debugger and try to reproduce. My experience has been that when I cut corners and don't try to push things to the data structure I end up paying for it. And usually don't save any development time.[/background]

[/font][/color]

[color=rgb(0,0,0)][font=Arial]

[background=transparent]Good data structures don't spring into existence after a whisky fueled brainstorming session, they evolve over time and through constant refactoring of the code. Very painfully they are expanded and then fixed, expanded and fixed. Stuff you thought you would need is superseded by a more elegant structure somewhere else and stuff you thought you wouldn't need anymore is re-added later. You know you have a good data structure when you bring a new developer on board and he or she looks at your structure and says "that's it? I could have done that in an hour!". What you have left is the simple solution that works. But you won't get there until you try many wrong paths.[/background]

[/font][/color]
Sign in to follow this  
Followers 0