Jump to content

  • Log In with Google      Sign In   
  • Create Account


How do games end up built like a house made out of glass


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
10 replies to this topic

#1 warnexus   Prime Members   -  Reputation: 1395

Like
0Likes
Like

Posted 08 July 2013 - 09:38 PM

By a house made out of glass, I mean the game will break very easily. For example, each time if you went to show a game built in this form, the system would break or crash. The program is completely unstable. 

 

Personally, I never ran into this problem teaching myself game programming for 5 months by using the gamedev member's feedback when I ran into a game logic problem.

 

I guess the more specific important question is would be why does a program break or crash leading to an unstable state of the problem? Is it necessarily a hardware compatibility issue? 

 

Another question I have is how much experience in game programming is considered beyond limited? I want to reach a point where my knowledge in game programming is sufficient. 

 

I am still updating my game for 5 months. I really wanted to focus on one project and keep adding new things as months go by rather than write a lot of unfinished games.

 

My game has a main menu, game controls, basic gameplay, basic ai, collision detection, game over and victory screen, animation in main menu and in sprites. 



Sponsor:

#2 Dragonsoulj   Crossbones+   -  Reputation: 2016

Like
1Likes
Like

Posted 08 July 2013 - 09:41 PM

I think this is more an issue as project size increases. Testing every possible scenario at every possible point to make sure you don't have some math error or memory access issue isn't always possible. People make mistakes.



#3 jbadams   Senior Staff   -  Reputation: 17681

Like
8Likes
Like

Posted 09 July 2013 - 12:06 AM

Large games are complicated, and developers often don't have access to all of the hardware the game will end up running on, nor time to test all possible configurations even if they did.  For smaller projects it's relatively easy to ensure your code is bug-free, and there are methods to help find and eliminate bugs, but as software gets larger and more complicated it becomes easier for small errors to slip in unnoticed.

 

In some cases errors may also come from outside your otherwise correct code -- perhaps a library you're using has a flawed implementation on some particular platform, or in certain situations requires some special handling that you weren't aware of.

 

Working with multiple developers -- especially as team sizes increase -- can also often increase the risk of problems occurring unless carefully managed with clear communication, good/clear division of responsibilities, accurate and up-to-date documentation, and appropriate use of tools such as source control.  If some code you write is confusing or does things in an unusual or unexpected way you may not have problems using it yourself, but when another developer has to use that same code there's suddenly the potential for mistakes to be made.

 

 

Some strategies include always initialising variables on creation, being vigilant with error checking and usage of assertions (or similar mechanism for your language), turning up your compiler's error level to the highest/harshest setting (and turning on "treat warnings as errors" if available as a separate option), and various forms of automated or semi-automated testing; a good starting point might be to research "unit testing" and "regression testing".

 

You should also take due care when selecting libraries or SDKs.  Ensure your target platforms are properly supported, be sure you understand correct usage, and try to always use a stable release whenever possible for any important code -- be sure to take extra care if this isn't possible.  More popular and well established APIs will (usually) be both better tested and better supported than something newly developed.

 

 

 

 


I want to reach a point where my knowledge in game programming is sufficient.

Sufficient for what?

 

Unless you have some specific end-goal in mind, as long as you're able to accomplish the next task on your to-do list you can consider your knowledge sufficient.  Ideally, you should be able to create a full game (including menus, audio, victory screens, etc.) without having to rely completely on tutorials or "cut & paste coding".  It's fine -- and perfectly normal -- to use reference materials and to occasionally check out a tutorial on some new technique or an area you want to improve, but you should be solving problems for yourself and using plenty of your own ideas.

 

You should have a solid grasp on your language of choice, be reasonably familiar with your chosen tools (including debugger, which is a very valuable tool!) and if applicable (i.e. if you're not using some non-extensible development package) be familiar with the use of additional libraries -- you will probably also have at least some level of familiarity with one or more chosen libraries, although more important than this is the ability to learn a new library if/when required.

 

 

If your game contains all of the things you listed then it sounds like you're doing just fine; if it doesn't already include it you might also consider adding audio, otherwise you've checked all of the main boxes for learning about development with your game.  If you want to learn more of the full process you may also consider releasing your game in some way -- even if it's just as freeware -- so that you can learn a bit about deployment, marketing, support, etc.  Other than that, just continue working on your game until you're happy that there are no more features you really want to add, and then move on to whatever your next idea is.

 

 

Hope that's helpful! smile.png



#4 SimonForsman   Crossbones+   -  Reputation: 5953

Like
3Likes
Like

Posted 09 July 2013 - 12:50 AM

By a house made out of glass, I mean the game will break very easily. For example, each time if you went to show a game built in this form, the system would break or crash. The program is completely unstable. 

 

Personally, I never ran into this problem teaching myself game programming for 5 months by using the gamedev member's feedback when I ran into a game logic problem.

 

I guess the more specific important question is would be why does a program break or crash leading to an unstable state of the problem? Is it necessarily a hardware compatibility issue? 

 

Another question I have is how much experience in game programming is considered beyond limited? I want to reach a point where my knowledge in game programming is sufficient. 

 

I am still updating my game for 5 months. I really wanted to focus on one project and keep adding new things as months go by rather than write a lot of unfinished games.

 

My game has a main menu, game controls, basic gameplay, basic ai, collision detection, game over and victory screen, animation in main menu and in sprites. 

 

From what i've seen crashes in AAA games are usually caused by multithreaded or low level code (custom memory allocators, DRM drivers, unsafe containers, etc), Things you are quite unlikely to deal with when you're starting out.

 

Its hard to say how much experience is considered beyond limited, personally i'd say your knowledge is sufficient when you can write the software you need/want to write.


I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#5 Sik_the_hedgehog   Crossbones+   -  Reputation: 1542

Like
0Likes
Like

Posted 09 July 2013 - 11:18 AM

It all boils down to very complex code coupled with tight deadlines mostly, but some reasons why games can be more affected than other big software projects:

 

1) Games are pretty much just entertainment by general rule, not something for productivity. A game crashing is at worst annoying to the player, but it won't result in things like an user losing important data which could completely screw him/her over. This means there isn't that heavy of an incentive to make a game more robust, as long as it "just works" most of the time.

 

2) Games need real-time performance (good is not enough), so the code usually ends up doing less checks (which makes it easier for a mistake to result in a spectacular crash) and also may end up using APIs in a rather unusual way in some cases (which can make some systems go bonkers, specially if it involves something that talks directly to the drivers like Direct3D and OpenGL do).

 

EDIT: typo.


Edited by Sik_the_hedgehog, 09 July 2013 - 11:19 AM.

Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.

#6 warnexus   Prime Members   -  Reputation: 1395

Like
0Likes
Like

Posted 09 July 2013 - 09:39 PM


If your game contains all of the things you listed then it sounds like you're doing just fine;

 

oh okay. I'm doing fine then. good to know. thanks jbadams biggrin.png



#7 warnexus   Prime Members   -  Reputation: 1395

Like
0Likes
Like

Posted 09 July 2013 - 09:40 PM


Games need real-time performance (good is not enough), so the code usually ends up doing less checks

 

interesting. i hope to remember when I do a complex project in the future.



#8 Sik_the_hedgehog   Crossbones+   -  Reputation: 1542

Like
0Likes
Like

Posted 10 July 2013 - 07:24 AM

Suggestion: unless you're in a place that is in real need for performance, I wouldn't remove checks. And even then, usually it's the overall algorithm the issue, not the checks. Of course being pressured by a tight deadline that directly affects the survival of the studio means many programmers will probably not even bother adding checks in the first place, which is where most of the issues happen.

 

If you want to avoid those issues in more complex projects the best options are to 1) try to reduce the chances for erroneous situations in the first place (easier said than done, and in many cases can't be avoided) and 2) use defensive programming, and maybe even consider trying to handle erroneous values gracefully rather than failing if suitable (e.g. null strings could be handled as empty strings, etc.), in an attempt to reduce the amount of checks needed in the code calling the functions.


Edited by Sik_the_hedgehog, 10 July 2013 - 07:24 AM.

Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.

#9 SimonForsman   Crossbones+   -  Reputation: 5953

Like
0Likes
Like

Posted 10 July 2013 - 08:57 AM

Suggestion: unless you're in a place that is in real need for performance, I wouldn't remove checks. And even then, usually it's the overall algorithm the issue, not the checks. Of course being pressured by a tight deadline that directly affects the survival of the studio means many programmers will probably not even bother adding checks in the first place, which is where most of the issues happen.

 

If you want to avoid those issues in more complex projects the best options are to 1) try to reduce the chances for erroneous situations in the first place (easier said than done, and in many cases can't be avoided) and 2) use defensive programming, and maybe even consider trying to handle erroneous values gracefully rather than failing if suitable (e.g. null strings could be handled as empty strings, etc.), in an attempt to reduce the amount of checks needed in the code calling the functions.

 

you can also replace many checks with assertions (Which tend to only be enabled in debug builds anyway)


I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#10 SiCrane   Moderators   -  Reputation: 9491

Like
0Likes
Like

Posted 10 July 2013 - 09:24 AM

Don't underestimate the value of a "release with assertions enabled" build. Some bugs will only show up when optimizations are performed or when the special debug checks are removed.



#11 MarekKnows.com   Members   -  Reputation: 446

Like
0Likes
Like

Posted 10 July 2013 - 10:55 AM

If you want to get fancy you could use http://valgrind.org/ to analyze your code.  Valgrind will tell you if you have issues brewing!


---
Free C++, OpenGL, and Game Development Video Tutorials @
www.MarekKnows.com
Play my free games: Ghost Toast, Zing, Jewel Thief





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS