• 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
buumchakalaka

Good habits for game development

35 posts in this topic

Even when you are the single developer of a project write code as if it is intended for other people to use. You will be the other people when you look back at your code in 6 months time.

 

 

Side note:

For C++, I'd recommend reading C++ Coding Standards by Sutter and Alexandrescu. The table of contents
by itself is helpful, but the full book contains discussion like
reasoning and exceptions to the general rules. The only problem is that
it predates C++11.

 

I like this quote on the amazon link: "Short is better than long: Huge coding standards tend to be
ignored; short ones get read and used. Long Items tend to be skimmed;
short ones get read and used."

And then you release a 240 page counting book as a coding standards that's a brilliant way of contradicting yourself :)
 

0

Share this post


Link to post
Share on other sites

And in general, what I should consider for become a better game developer and make better games?

 

Finish what you start ... when you start a game, finish it.

 

This leads to a natural corollary, Don't start things that are too big for you to finish.

To add to the "too big for you to finish, " I hope your big project reuses code structure from previous projects to increase familiarity and speed to finish.

1

Share this post


Link to post
Share on other sites

the free online repository site I'm using has a built-in issue tracker

 

Which free online repository site are you using?

Didn't want to sound like I was advertising, nor stir up a Git vs. Hg firestorm, so I didn't name names, but I suppose there's no harm in saying Bitbucket. Github probably has similar features, but the deciding factor for me was Bitbucket's unlimited free account for those with a .edu email address. As a broke grad student, I couldn't turn that down.

Just to add to this for the benefit of other people reading this thread, I use unfuddle,com for source control on my personal projects. It allows totally free svn repositories to anyone but with the free account you can't have multiple users on projects. I don't know if they provide source control using software besides subversion.

Edited by jwezorek
0

Share this post


Link to post
Share on other sites

Stick to a singleton if you need something like a global.

 

Sorry, but if you've been using singleton's "instead of" globals then you have still been using globals during the past 8 years.  A singleton isn't better than a global just because it's wrapped up in a fancy class, and using a singleton because "you need something like a global" is a terrible reason to use the pattern.  You should use a singleton if you need a singleton; that is:

  • If there must only ever be one instance created.  Note that this is different from only wanting or needing one instance -- if you only want or only need one instance then don't bother with additional code to enforce it and instead only create one -- the singleton is appropriate when it would be an error for there to be more than one instance.
  • If you need global access.

 

Unless you need both of those requirements the singleton is not the right pattern for your situation, and it's exceedingly rare to genuinely require that there must only be a single instance.  

 

There is one other bullet:

 - deferred allocation.

 

I also dont think single instance classes are all that rare.  Of course you could design around the requirement.

 

 

It is also worth pointing out a few pro's about singletons.  First off, the most nasty evil horrible stuff about singletons is mostly only applicable to C++.  Singletons in Java or C# are nowhere near the landmine they are in C++.

 

Second, they are easy to grok.  That's why you see them in use in a number of very successful game libraries.  They may not make for the purest design, but they make for one that is generally easily comprehended.  This is why you see singletons used in Moai, Cocos2D, Ogre3D, PlayStation Mobile, etc... etc... etc...  

0

Share this post


Link to post
Share on other sites
There's nothing about deferred allocation that requires a single instance or global access. You can have deferred allocation with a class that you can have multiple instances of. You can have deferred allocation with local or member variables.
0

Share this post


Link to post
Share on other sites

There's nothing about deferred allocation that requires a single instance or global access. You can have deferred allocation with a class that you can have multiple instances of. You can have deferred allocation with local or member variables.

 

Yes, but it is a trait of the singleton.  I am not saying there aren't other ways to accomplish the same thing, but it is one thing a singleton gives you.

0

Share this post


Link to post
Share on other sites

Yes, but it is a trait of the singleton.

No, it's not. Singleton is two things: single instance and global access. That's the definition. If you have those two things it's a singleton. If you don't then it's not. Some common implementations have deferred allocation, but you don't need a singleton to do it and a singleton doesn't require it. If you want deferred allocation there's no reason to go and restrict your deferred allocated class to a single instance and force it to have global access, which is exactly what you are saying to do if you're saying reach for a singleton when you need deferred allocation. Deferred allocation is orthogonal to both number of instances a class can have and scope of access. That's saying every time you need to use [tt]new[/tt] (a deferred creation mechanism) you should have a singleton.
1

Share this post


Link to post
Share on other sites

That's saying every time you need to use [tt]new[/tt] (a deferred creation mechanism) you should have a singleton.

 

No, its not.  Allocation and access are coupled with a singleton.  If new was smart enough to not new an existing object, I would agree with you.

 

I am also not saying that if you want deferred allocation, use a singleton.  I am saying a singleton provides that trait, nothing more.  So, if you have a global object, that requires a single instance and you want to defer it's allocation until first access, a singleton provides this.  I am not saying other data structures don't, nor that there aren't other ways to accomplish this.

0

Share this post


Link to post
Share on other sites

Allocation and access are coupled with a singleton.

Not part of the singleton definition. Allocation can happen before a singleton is first accessed and it would still be a singleton. And you can couple allocation and access for an object without bringing in either global access or single instances of the class.

I am also not saying that if you want deferred allocation, use a singleton.

Yes, you did! You added deferred allocation to jbadams list of times when you need a singleton.

I am saying a singleton provides that trait, nothing more.

No, it doesn't! A singleton is defined by two traits: single instance of a class and global access. Common implementation often have deferred allocation, but it's not a requirement. Ex: a Meyer's singleton can be constructed before first use.

So, if you have a global object, that requires a single instance and you want to defer it's allocation until first access, a singleton provides this.

Which is saying that if you want a singleton with deferred allocation, then you want any old singleton! You're confusing a common implementation detail of a pattern for part of that pattern.
0

Share this post


Link to post
Share on other sites

 

I am also not saying that if you want deferred allocation, use a singleton.

Yes, you did! You added deferred allocation to jbadams list of times when you need a singleton.

Well that would be the crux of the disagreement between us.  I read jbadams post as times you could use a singleton, not when you need one.  In re-reading his post, I will admit outright, this was a mistake on my behalf.

Edited by Serapth
0

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0