Search Results

Search found 2 results on 1 pages for 'lorancou'.

Page 1/1 | 1 

  • How to avoid the GameManager god object?

    - by lorancou
    I just read an answer to a question about structuring game code. It made me wonder about the ubiquitous GameManager class, and how it often becomes an issue in a production environment. Let me describe this. First, there's prototyping. Nobody cares about writing great code, we just try to get something running to see if the gameplay adds up. Then there's a greenlight, and in an effort to clean things up, somebody writes a GameManager. Probably to hold a bunch of GameStates, maybe to store a few GameObjects, nothing big, really. A cute, little, manager. In the peaceful realm of pre-production, the game is shaping up nicely. Coders have proper nights of sleep and plenty of ideas to architecture the thing with Great Design Patterns. Then production starts and soon, of course, there is crunch time. Balanced diet is long gone, the bug tracker is cracking with issues, people are stressed and the game has to be released yesterday. At that point, usually, the GameManager is a real big mess (to stay polite). The reason for that is simple. After all, when writing a game, well... all the source code is actually here to manage the game. It's easy to just add this little extra feature or bugfix in the GameManager, where everything else is already stored anyway. When time becomes an issue, no way to write a separate class, or to split this giant manager into sub-managers. Of course this is a classical anti-pattern: the god object. It's a bad thing, a pain to merge, a pain to maintain, a pain to understand, a pain to transform. What would you suggest to prevent this from happening?

    Read the article

  • Extract archive here, autodetect subfolder

    - by lorancou
    I use 7-Zip under Windows 7 to extract all kind of archives. The ever-running problem is that there is not a single way to handle subfolders. Some people create their archives like this (let's call it type A): . +-- subfolder ¦   +-- file 1 ¦   +-- file 2 ¦   +-- ... "Extract Here" will extract everything to subfolder/, which is fine; "Extract to <Folder>" will create an extra subfolder level, which is annoying. And other people create them like that (let's call it type B): . +-- file1 +-- file 2 +-- ... "Extract Here" will populate the current folder, which can bring a lot of mess if this folder already contains tons of other files, and which is very annoying; "Extract to <Folder>" will create a subfolder and conveniently stuff it with the archive content, which is fine. So this leaves two options: always choose to "Extract to <Folder>" and live with the extra subfolder for type A archives. Or open the archive before extracting it to check if this is a type A or B, and then appropriately select "Extract Here" or "Extract to <Folder>". I usually do the latter, but I just discovered that KDE is offering a very handy Extract Archive Here, Autodetect Subfolder feature that automates that. It'll "Extract Here" if there's only one subfolder in the archive, otherwise it'll "Extract to <Folder>". I love this idea. Is there a Windows 7 tool offering this option? Preferably integrated in the explorer context menu? Maybe it's hidden somewhere in 7-Zip and I just didn't find it?

    Read the article

1