Pseudoku: Tool Chain

By Shamus
on Mar 14, 2017
Filed under:
Programming

Last week I did an informal poll to see how many people could run the game. The failure rate hovered around 4%, which is pretty bad. Bad enough that I don’t think it would be a good idea to put the game up for sale. If 1,000 people bought it, I’d end up with 40 people who paid for a game that didn’t work. And when they emailed me asking for help, I wouldn’t be able to do anything but shrug.

In the old days, Windows would give you quasi-helpful error messages like, “Unable to load foo.dll”. It wouldn’t tell you why. Is foo.dll missing? Or corrupted? Or does it depend on some other thing that the user doesn’t have? Is it for a newer / older version of Windows? You don’t know. But at least you know the problem is with foo.dll, so when the user sends you the bug report you know where to look.

But these newer versions of Windows don’t like to confuse the peasants with things like information, and so now Windows spits out a generic “This program can’t do the thing.” message. Great. Now the user enters the useless error message into Google and gets back a million different possible causes. They don’t know what the problem is or where to look. More importantly, neither does the developer.

All I know is that for some people, one of the many DLL files I depend on isn’t available. Or it is available, but it’s the wrong version. I included all the DLLs I know about with the program, but for some reason some things appear to be missing or incompatible. What I have figured out:

  1. Windows version doesn’t have anything to do with it.
  2. 32bit vs. 64bit seems to be irrelevant.

One of my problems is that I have no experience with deployment. In all the years I spent writing software professionally, I never had to package the software up for the end user. I was either writing in-house tools for myself and my colleagues, or I was adding to an existing codebase where someone else was in charge of deployment. (Also, most of my professional work was a decade ago, and I think deployment has gotten more complex since then.)

Let’s look at the parts of this game…

Dependencies

I program at a pretty raw level. I write stuff in C++ and I don’t use big fancy game engines. In programming, we call this “working close to the metal”. Well, it depends on who you’re talking to. It’s all a mater of degrees. To some people, C++ and a bunch of libraries isn’t anywhere NEAR the metal. The guy who wrote Rollercoaster Tycoon in assembly? Yeah. THAT guy was close to the metal. In any case, if you’re close to the metal then you’re down in the guts of the machine, managing memory and manually handling tasks that would be automated in more robust systems.

But even down here close to the metal, there are still things I don’t want to do manually. And so I depend on external tools. I depend on software written by other people to get things done, because some problems are tedious and the solution fits nicely into a black box. For example:

SDL2

I use SDL for talking to the operating system. It lets me create a window, get keyboard and mouse input, and figure out what joysticks might be connected. This would normally take thousands of lines of messy code, all of which would be linked to just one specific operating system. (Windows, OSX, or Linux.) If I wanted to support other operating systems, I’d need to write alternate versions of those thousands of lines of code.

But SDL puts all of this interface crap into a black box. In my program, it takes just 300 lines of code to get the job done, and that code will talk to any of the big 3 operating systems.

OpenGL

This is where I get really close to the metal. The vast majority of developers out there have some sort of graphics engine (or even a game engine) for talking to the graphics hardware. For example, you might use Unity or Unreal Engine to talk to OpenGL, which talks to the graphics card. But I prefer to talk to OpenGL directly.

DevIL

Normally loading PNG images is this enormous task. It’s a complex format and it normally would require thousands of lines of code to properly support all the different types of PNGs out there. But DevILDEVeloper Image Library. The author wanted to call it OpenIL but the OpenGL folks complained because they were worried people would think that OpenIL was part of OpenGL. lets me reduce that to a single line of code.

“Here is a PNG file loaded into memory. Figure it out, and give me back the raw rectangle of pixels.”

OpenAL

Open Audio Library. It loads .wav files, plays sound effects, and can even handle things like positional audio and such.

FreeType

Font loading is an insanely complex task. Fonts themselves are a really complex file format. Turning a font into a series of readable characters of the desired size is even worse. Without Freetype, I wouldn’t be able to load fonts and so I’d be stuck making text-less games.

Well, I could also use bitmap fonts, where you just stick a bunch of letters onto a single image. That’s a very hack-y solution that doesn’t scale well to different displays. You can use bitmap fonts if you’re going to a retro feel with giant chunky pixels, but if readability is important then you need to use proper fonts.

Visual C++ Redistrubutable

If you develop using Visual C, then the user will need some redistributable file. I’m sure you remember hitting “install” on a Steam game and it sits there downloading (even though the game package is already downloaded) and installing “Visual C++ Redistributable Package xxxxx”. There are a million of these stupid things, and I’ve never figured out how you’re supposed to figure out which ones your program needs.

The Problem

One of these tools is broken. Sometimes. For some people. On some versions of Windows. For unknown reasons. Something is missing.

My first suspect is the Visual C stuff. Maybe there’s some redistributable package that some people have and other people don’t.

My second suspect is the audio Library. I’m using a SUPER old version of it. Everyone tells you that you MUST upgrade the old version because it’s terrible and it sucks and you’re a bad person for using it. But the new version doesn’t have a tool to load WAV files. And without the ability to load WAV files, what’s the point? I really need that and I really don’t have the time or desire to figure out how that worksOr to shop around for an existing solution that won’t add yet ANOTHER library to my project, or bloat the project with a dozen WAV-loading source files, or be encumbered by some stupid licensing, or require yet another library, etc.. Doing that properly would be a big job, just to get back to where I am right now. And since the audio works, I don’t have a lot of incentive to go to all that trouble.

Shamus, Why Don’t You…

I know how you are, internet. You want me to use that one tool that will solve all my problems. Which just so happens to be your favorite tool.

C# people think I should drop what I’m doing, learn C#, then translate my entire game to that.

Unity fans think I should drop what I’m doing, learn Unity, then translate my entire game to that.

Python people think I should drop what I’m doing, learn Python, then translate my entire game to that.

And so on.

But I’ve been doing this long enough to know just how insanely expensive it is to learn a new system. I have ten people all promising me that my life will improve if I abandon my years of experience and spend weeks or months painstakingly crawling up a new learning curve. Maybe one of those people is right. There’s no way to know which one. I could spend weeks teaching myself something new (and thus not getting anything useful done) only to discover some awful restriction or limitation that I just can’t tolerate. Or maybe I’ll discover a different problem, just as big and as annoying as the distribution problems I was running away from in C++.

This is an interesting project. I’m glad I’m doing this with something simple. Hopefully I can figure out this deployment stuff and get the game up for sale. I’m thinking of doing a short Early Access period just to catch all the bugs, basically using you folks as my playtesters.

Enjoyed this post? Please share!

Footnotes:

[1] DEVeloper Image Library. The author wanted to call it OpenIL but the OpenGL folks complained because they were worried people would think that OpenIL was part of OpenGL.

[2] Or to shop around for an existing solution that won’t add yet ANOTHER library to my project, or bloat the project with a dozen WAV-loading source files, or be encumbered by some stupid licensing, or require yet another library, etc.


2020201575 comments? This post wasn't even all that interesting.

From the Archives:

  1. Blake says:

    For figuring out all the things your machine is running (and maybe comparing to someone else), something like depends.exe http://www.dependencywalker.com/ might do the trick.

    It’s a super light-weight little utility that’ll just show you all the modules you’re loading.
    Worth taking a look.

    Also: If you haven’t looked at these before: https://github.com/nothings/stb they’re a heap of single file libraries that tend to be easy to use and work well. There’s one in there for loading images, another for true type fonts, one for vorbis audio if that’s ever of use. I’ve used the DXT compression header from here before on some console titles. Worked fine.

  2. Steven Taylor says:

    Are you in direct contact with someone who can’t run the game? Can you compile versions of the game without each of the suspect libraries (disable sound entirely, for example) so that person can tell you what doesn’t work?

    • baud001 says:

      I could not run the game, if you need another guinea pig, I would have time to try to run different versions. But I won’t be able to provide much feedback on the game, sudoku is not my cup of tea. Also I can’t remember which version I tried.
      (I’m on windows 10, even if it does not seem to matter in your case).

      Anyway good luck!

  3. psivamp says:

    To be that guy: WAV files are really easy. I’ve had to roll my own reader/writer for them a couple of times working in the DSP field. It’s why we only load WAV and our own binary files, WAV is easy.

    Having said that, don’t bother to roll your own. There are a bunch of suitable header-only or two-file libraries that will do it just fine — or keep using what you have (probably the best idea, upgrade on your terms).

    • Hugues Ross says:

      Came to the comments to say this. I’ve written my own WAV loader a few times, since the format is uncompressed it just boils down to reading ~40 bytes and throwing the rest at OpenAL. Writing it yourself wouldn’t take more than a couple hours, and with a library I doubt it would take more than 30 minutes.

    • Scerro says:

      I thought IBM or Microsoft had some sort of stupid licensing that made larger profile projects shy away from the format. Hence why Shamus is probably using an ancient version of OpenAL in the first place.

      Figuring out a workable way to upgrade versions from the old audio library is probably worth it. Mostly because converting .wav to a supported file format is fairly easy to do, and it lowers the overall filesize of your end program.

  4. It’s been a while since I did it, but I feel like there was a way to make visual studios tell you version of the VC++ runtime you needed. I agree that that’s the most likely cause. It would help explain how it’s only broken for random users with no commonly related features: They just haven’t run an application that installs that VC++ library yet.

    I reformat my computer on the weekend and could try it if you want. Is there a link? All I’ve installed is steam, b.net, overwatch and heroes of the storm. I won’t have nearly any of them.

    • A good rule of thumb is to plop the MSVCRT dlls you depend on in your app folder somewhere.

      Or static compile the whole thing. The program does not bloat nearly as much as people think. And when you static link you only include the stuff you use (instead of the entire dll).

      Myself I don’t use Visual Studio. Instead I downloaded the compiler toolset (build tools) which gives you the latest compiler and SDK files. This does mean you have to use your own IDE/text editor but I prefer that anyway. And you have to compile on the command line (another thing I prefer)

      • Richard says:

        No.

        Never drop the MSVC redist DLLs in the application folder. This is a Windows XP technique that shouldn’t be used for modern programs (except in specific cases)

        Microsoft provide an installer for the MSVC redists, and you simply run that installer on the target PC.
        It check the versions that the user already has, and either installs the one they need, updates the one they have – or does nothing and quits if they’ve already got it.

        Windows Update is then able to keep it up-to-date with security fixes, and your application manifest specifies exactly which set of versions will be valid.

        For a default install of Visual Studio 2015 (VC140 toolchain), you will find the installers in C:/Program Files (x86)/Microsoft Visual Studio 14.0/VCredist/1033

        There may be two or three, pick the one that matches the /MACHINE you built with.

        There are some cleverer ways to do this if you know that the end user has fast Internet access, but my users don’t so I’ve never really looked into them.

  5. Matt Downie says:

    As someone who stuck doggedly to C++ for a long time and then recently had to learn C# and Javascript: the learning curve is way easier than I though it would be. A few reasons:

    They use basically the same grammar as C so you don’t have to learn over again how to write ‘if’ statements, you just have to learn about the specific differences.

    The differences between C# and C++ are often things like “you no longer have to worry about allocating and deleting stuff, it’s all automatic” and “you no longer need .h files, that’s all taken care of”. The time saved compensates for the time spent learning it.

    Over the last few years, the internet has become Useful. Any question I have about C#, I can now google and expect a well-written answer.

    • silver Harloe says:

      This model is overly simplistic, but imagine you have to use a particular code snippet X times before you just remember it. You’ll wear through the basic syntax of the language in a couple or three days. But it’ll be years before you “just remember” all the things like rounding numbers, reading/writing files to disk, getting the time of day (getting it in another time zone), etc etc.

      Thus for experienced programmers, syntax is never even factored into the learning curve for a new language. The steep slope is always libraries, libraries, libraries. There’s an incredibly huge productivity difference between the programmer who has to look up the name of each function and the one who knows them already.

      • James Schend says:

        The nice thing about C# is that the default libraries (the .net framework itself) are really, really well-designed. Everything’s named well, everything’s laid-out logically, a *ton* of work is done on your behalf. You can guarantee it’s on every machine that can run C#-compiled code (well, with .net Core that’s not longer 100% true, but let’s pretend).

        And since it’s huge and expansive, it dramatically reduces your dependence on shoddy third-party open source libraries. Which, from my experience, are usually the weak point in any complex application. C++’s standard library is well-designed (by C++ standards), but it’s only data structures. Nothing in there will help you load a .png or download a file from a web server, or gzip your XML file as you save it.

        • Ahiya says:

          Seconding this. It makes sense for Shamus to stick with what he knows since he’s not a professional programmer anymore, but for current programmers learning C# makes a lot of sense.

          • Rack says:

            And thirded. Jumping from C++ to C# was relatively painless but would have been harder if I wasn’t using it every day.

            On the other hand this is partly a programming blog and I at least would be interested in posts about jumping to C# or Unity.

    • Jamey says:

      I will also chime in and second (or whatever count) this. If and when you do decide you feel like learning “something new” C# isn’t a big leap. This is coming from a career developer (I came in from IT/Hardware/Support as opposed to Art) that did all of my early work in C and C++ (in the 90s to the 00s), and eventually was pulled into the C# world and have been here for about 8 years now. The similarity of the syntax is obviously something you’ll like, as stated above, and I think you will find a lot of “things that are different” overlap heavily with “things you don’t like,” often related to dependencies or other areas that often cause stress in C++ that have been greatly improved.

  6. Ilseroth says:

    I would never suggest you take a mostly finished project and convert it to unity for no real reason other then trying to reduce crash numbers when you can just figure it out. While unity *is* good on that end, since you can export it to like, every platform and you usually don’t gotta worry,; it also uses C# scripts to run everything do you’d have the joy of learning C# as well.

    Learning a new engine to remake a project you are already mostly done with is madness

    On the other hand, if you were to start a new project? Starting with a pre-established game engine (not just unity, if you want to avoid the fiddly stuff, there are a lot of options out there) does make things a hell of a lot easier on the user end, but based on all the dev posts you have done on all the other little projects, the nitty gritty work is what you seem to really wanna do, so I’d just say you do you, GL figuring out the dependency issue!

  7. Misamoto says:

    Learning a new language could probably become a pretty interesting cycle of posts for you.

  8. Mephane says:

    I know how you are, internet.

    Why do am I suddenly reminded of Clippy?

    It looks like you’re writing software. Would you like help?
    * Download a library and try to make it work.
    * Write the code yourself.

    • galacticplumber says:

      Kill it! Kill it WITH FIRE!

      • CoyoteSans says:

        What are Siri, Cortana, Alexa, or Google Assistant (how boring, Google) if not Clippys that can actually intuit what specific task you want to accomplish, are less intrusive to the user’s experience, and can parse human speech?

        Oh, and ship boatloads of metric data off to their mothership companies, that too I guess.

        • galacticplumber says:

          I don’t like any of those things either, but at least they have the decency to not take up constant screen space, and have shut up buttons in easy locations if I remember right.

        • Sunshine says:

          On assistant names: did you hear that there’s a woman named Alexa Seary who is deeply sick of people making the same two “jokes”?

  9. Echo Tango says:

    Shamus,

    Instead of learning an entire new engine / library / language, maybe you could get some good mileage out of just swapping one or two small things? Keep your game in C++, but try to get rid of the pieces that are tying you to Visual Studio (so you can use something more generic like GCC)? Upgrade the audio library, and just batch convert all your WAV files to MP3 or whatever the new version says it supports?

    • James Schend says:

      If he could refactor his code to not require any kind of C++ runtime, that could also help (if the problem is the VC++ runtime install). There are tons of “portable” applications out there, some of them open source, so you could download and examine their code to see how they’re getting away with not installing any kind of C++ runtime. It might be as simple as just building the C++ STL as part of your application. (I’m not sure exactly what’s in the runtime…)

      Note also that including a VC++ redist is a Visual Studio *default*. It’s not some kind of holy law writ from above, that’s just what the default “Make Me A C++ Project” button does. It’s certainly possible to write C++ in Visual Studio without the resulting application requiring the VC++ runtime. Switching away from Visual Studio won’t really change anything unless you also rebuild the entire project/solution structure. Shamus seems to suggest that any VS C++ project would require one.

      • Echo Tango says:

        OK, that’s the even easier first-slice, then – find the button, that makes Visual Studio compile the game into something that’s not tied to VS runtimes. :)

      • MichaelG says:

        Yes, for an old fart like me, I just don’t use the standard runtime.

        For someone more modern, like Shamus, I think you can staticly link it? No more relying on DLLs on the machine. Your exe will be larger, but so what?

  10. neminem says:

    Does it not at least throw anything into the machine’s event viewer when it crashes? I know it’s not guaranteed, but a lot of times, if the user-displayed error is unhelpfully vague, you’ll at least get a bit more information in the Application section of the Event Viewer – have you checked?

    • Echo Tango says:

      Actually…can’t the game dump a crash log to a text file? Yup, looks like there is. Shamus, maybe stick this into your game, so we can help you debug?

      • Kian says:

        From what he described, it doesn’t look like the application is crashing, but rather the OS is unable to find the libraries it needs to launch it. His code never even had a chance to run.

        • Echo Tango says:

          I don’t think dynamic libraries are checked until the actual function calls are made though, right? Or am I mis-remembering how DLLs work, from my olde timey 3rd-year Operating Systems class?

          • Richard says:

            If the runtime is missing or broken, or any of the libraries needed by any static objects in the application, SDL, OpenGL (glu/glew) or OpenAL are missing, it’s quite likely that it will fail before main() is even entered.

            A surprising amount of stuff happens before main(), and you aren’t going to be able to reliably log any of it because static initialisation order is undefined.

    • James Schend says:

      Yeah, I’m 99.9% sure that the reason those “detailed” error messages were removed were:

      1. NT logs all that stuff into the Event Viewer
      2. Average user couldn’t really do anything about them anyway

      Next time someone reports a problem, ask them to go into the Event Viewer and search for the name of your .exe. I’m certain Windows will have logged something about it.

      • Or, I don’t know. Check all SDL And OpenAL etc. inits and calls if they return a error code then fetch the error and print that?

        I’ve gotten pretty anal about that stuff. even simple test programs I always add full error checking/handling to them.

        If you use LoadLibrary rather than compiling the dlls to be required you can easily handle a issue with loading SDL for example or OpenAl or whatever else.

        “Fail early, fail quickly” is a good mantra. I manually load all DLLs I use (whether they are bundled with the app or if they are standard OS dlls).
        The only dependency is system32 (which is always loaded into all processes anyway) and possibly msvcrt.dll. Though that is a limitation in PureBasic (great for prototyping and serious work), if I’m making C/C++ dlls or exes I can get rid of that dependency as well.

        Due to failing early and quickly it is easy to know where something fails in the startup of the program. And if there is a error or negative condition in a procedure I fail early and quickly there as well. Exiting the procedure instead of deeply nested if/endif blocks.

  11. Abnaxis says:

    Not making any suggestions or anything, but have you tried Vulkan yet? Thoughts on it?

    • MichaelG says:

      I tried it. Very, very, steep learning curve. I still don’t have a pattern that really lets me get all the cycles out of the GPU. As of last year, it definitely needed higher quality samples.

      I also discovered the hard way that the two slots for the graphics card on my motherboard are not identical. One is twice as fast as the other… sigh.

  12. drukargin says:

    Shamus, I may be oversimplifying here, but it seems to me like you could very probably isolate this problem by spinning up a couple of virgin Windows virtual machines. Make a bare Windows 7 VM and a bare Windows 10 VM, unpack your game as is and see if it runs. If not, add a VC redistributable that you think may be relevant and try again. Repeat one dependency at a time until you find the one that makes it work, then work backwards uninstalling the ones that came before until you have a minimum set. It might not be flawless but it should at least give you a pretty strong indicator of the problem. It should only take a couple of hours and is mostly free, since you don’t actually need Windows activated to install VC redistributables and unpack zip files.

    Plus, you could make a snapshot of the virgin Windows images before you started unpacking things, so you could reuse the method for later projects.

  13. Tizzy says:

    In the old days, Windows would give you quasi-helpful error messages like, “Unable to load foo.dll”. It wouldn’t tell you why. Is foo.dll missing? Or corrupted? Or does it depend on some other thing that the user doesn’t have? Is it for a newer / older version of Windows?

    Why was that, though? Is the Windows system that shit that it doesn’t differentiate between these failure states? Or were the programmers such lazy fucks?

    Or is this some weird form of security through obscurity? Job security most likely…

    • David says:

      You actually can get to the real error message in most cases, windows just hides the overly complex (and confusing for non developer) error messages with a more generic ‘something went wrong’. Typically there is some more info available to you if you know how to look for it (I haven’t done this in a few years and I am sure the tools have changed). Sadly diagnosing a lot of these issues typically requires some debugging tools on the machine … old versions of windows didn’t ship with these (I don’t know if windows 8 or 10 have them by default) and it can be tricky to talk a non technical person through how to do it.

      • Matt Downie says:

        I think maybe useful error messages require a special edition of Windows – if you get the cheap ‘Home’ version you’re not allowed to know.

        • Tizzy says:

          Note that this was when Shamus was fondly remembering the “old days”, though. I wonder how things were back then. There was a time when you couldn’t even look up an error message on the internet (probably one of the reasons I never became a programmer. )

    • Kyte says:

      Translating an HRESULT is tricky business when you can’t trust the system to be stable, and there’s no benefit for the end-user. It’s been shown that end-users do in fact get intimidated by verbose error messages, and MS’s focus on the broadest possible userbase (with a bias towards corporate customers) means that is not good.

  14. Henson says:

    You’re underestimating the percentage of people who couldn’t run the game. The poll put the figure at 5%, but only 55% of your sample actually tried to run the game. If we extrapolate from those numbers, the percentage of people with failed game launches is closer to 9%.

  15. Tse says:

    To be fair, as an ABAP developer, I would never suggest making a game with it.

  16. Ian says:

    For the VC runtime I had good success in the past by switching to the static linked version rather than the dynamic.

    The downside is you don’t get bug/security fixes without recompiling and the exe will be a lot bigger.

    The plus is you don’t need to specify the redistributable that you need to set to install.

    I had to do this for distributing to an estate of machines that had no internet and couldn’t reliably get the redists installed to.

    • Static linking is usually less in size than exe + dll as only the stuff you use is linked.

      Also, you don’t have to use the re-distributable. Just plop that dll in the app folder.

      Only benefit these days to use dynamic linking is if your program consists of a exe and several dlls that all use the same runtime, in that case dynamic linking will use less space than static linking, but not by that much.

  17. Darker says:

    Hi Shamus, in the last build that you have provided (pseudoku052.zip) you still haven’t included the VC++ redistributable libraries, so that’s likely a cause of some of the issues.

  18. Name says:

    I know, I know, you don’t have time to rewrite your code with this just one tool.
    But maybe at least note it for your future project:
    Since you’re already using SDL, there are SDL_image, SDL_ttf and SDL_mixer extensions, for working with images, fonts and sounds respectively.
    Also, SDL_net, for networking.

  19. Jamie says:

    Are you using <= msvc2012 or > 2012 ?? Are you installing the redistributable as part of your game (or making steam try to do this for you?)
    AFAIK msvc 2012 is the last version who’s redistributable will install on windows 7 without some specific windows updates. If the target machine doesn’t have the updates then the redistributable installer HANGS midway and won’t complete. (GJ MS, SUPER awesome job there)

    See these threads for another game having these issues.
    https://forum.systemera.net/topic/8913-2015-c-runtime-bug-solutions/#comment-15137
    https://forum.systemera.net/topic/9417-fix-for-missing-microsoft-visual-c-2015-redistributable/#comment-32314
    I have also encountered these issues distributing my own application.

    Also +1 for testing your deployment in a stock vm (http://modern.ie can provide these)
    Also +1 for trying to statically link the runtime, because this issue is really annoying.

    • Shamus says:

      I’m using VS 2015, which will let you go all the way back to 2013, but not 2012. It’s almost as if MS is shoving developers, hoping we’ll start shoving the Win7 holdouts.

      • If it turns out that one of the dlls you use depends on a certain msvcrt9whatever.dll then just plop that in the application directory (where you game exe is).

        Contrary to popular belief you do not have to distribute those annoying MSVC runtime installers. You aren’t allowed to make your own installers (for obvious reasons), but you are allowed to plop the dlls you depend on in the application directory.

        • Richard says:

          It’s still a bad idea to pass out the MSVC DLLs directly.

          Your users will not get MSVC security fixes, despite their PC getting them, and it breaks the WinSxS model which results in really funky errors. I’ve also seen several cases where putting the MSVC DLLs into the application folder completely broke the application – EXEs and DLLs that wanted other versions.

          There are many cases where static linking is necessary, for example installers/updaters. Though I mostly use NSIS.

          Just use the vcredistXX.exe installer, it’s both easy and correct – which is nice.
          The only slightly annoying thing is that the “silent” flags keep changing. I’ve noticed that most games on Steam don’t use the “totally silent” flags, which is odd.

      • MadTinkerer says:

        Yeah, I’m not upgrading to Win10 just for Pseudoku.

        Sorry, Shamus. ;)

  20. Will Riker says:

    Obviously the idea that you should port your almost-completed game to a completely new language/engine/environment is absurd and I would never suggest that. However, I think you’d really benefit from taking the time to learn something like Unity for future projects. Not having to deal with manual memory management really is a significant productivity boost. And with Unity, 99% of the bizarre timesink problems you end up dealing with (I distinctly recall how much trouble you had dealing with shaders on different systems on Good Robot) simply don’t happen because the Unity developers have already figured out those problems for you.

    I know you’ve been programming in C++ since probably before I was born, so it feels like learning anything else is a massive hill climb, but I think you’ll find that the learning curve of trying a new language is actually quite small and you’ll find pretty quickly that you’re more productive in a higher-level language.

    • I’d suggest Unreal over Unity though now that you can use Unreal for free.

      • Jamie says:

        I just downloaded unreal and besides having it install vs2015 on me (Not sure i’ll ever be able to recover my vs2012 production env ;~( ) I haven’t gotten very far. I checked out their documentation and so far haven’t found the part where I get to start actually coding something :) it’s all ‘use the designer to link this to this to this to this and voila, you have a game’ stuff

  21. Duoae says:

    I know how you are, internet. You want me to use that one tool that will solve all my problems. Which just so happens to be your favorite tool.

    I was just thinking if you’ve ever considered working in print?

    ;)

  22. I’ve tried to package up and install a Visual Studio + OpenGL program before. I tested it on a variety of desktops and laptops that I had access to. It didn’t work on some, and I used a tool (probably was Dependency Walker) to track down the missing file(s). I think it was one of the visual studio redistributables. If I remember correctly, it was a debug vs. release problem where I packaged up the debug rather than release DLL (or the other way around).

    I also hate how Microsoft gives a crappy/useless error message now. If you have Visual Studio installed on that machine, you can often debug the application (if it has debug symbols) and figure out the problem that way. I like to always include debug symbols with my released binaries to help in diagnosing problems.

  23. Aanok says:

    I’m curious: why are you absolutely dependent on .wav files? Is it because compressed formats would impact performance, or perhaps you’re worried you’d have a harder time handling metadata?

  24. Leonardo Herrera says:

    Regarding installers, try Inno Setup. It’s free, absurdly powerful, and the generated installers are very well behaved.

  25. Decius says:

    Have you dropped everything, learned assembly, and ported your game to it? I hear games written on assembly work better than ones written in high-level languages. Plus you don’t have to include redistributable libraries that you might not fully understand. And on the plus side, you know exactly what hardware each user has, so no confusing problems about whether not it runs on a supported architecture.

  26. The Seed Bismuth says:

    just to put my two cents in I think shamus should learn Python, C#, or Unity and write articles about his learning curve since it be the first long form programing stuff shamus wrote in what 5yrs now

  27. Tometzky says:

    In the Linux world the problem was solved by creating a clean virtual system each time just to compile the software package. This way the correct version of library is always linked and a compatible compilation can be reproduced at will. For Fedora Linux there’s a tool called Mock which automates all of this.

    You might be able to do this also – install a clean Windows, then Visual Studio, then all the needed libraries in the precise version you use and nothing more. Document all the steps, so you can repeat this any time without thinking. Then just compile the project in this artificial environment. You won’t even require a Windows license key – Windows works without one for some time after installation.

    I suppose that you can embed a correct Visual C++ Redistrubutable package version and all the other required DLL with the program installer. (https://www.microsoft.com/pl-pl/download/details.aspx?id=48145)

    This is also a way to test if you included all that is needed – just try to run it in a freshly installed clean Windows 7. OpenGL application might not run well (or at all) in a VM, but as a check for availability of libraries it should suffice.

  28. Benjamin Hilton says:

    I find it funny that so many people think computers are almost magical in what they can do, when in reality they’re Rube Goldberg machines held together by chewing gum and twine.

  29. MadTinkerer says:

    This sort of thing is why I’m not even interested in writing for OS specific code. Does using other peoples’ engines exclusively limit the kinds of software I can make? Yes. Is saving myself the hassle of ever needing to think about this kind of thing worth the limitations? Absolutely.

    It’s not that I don’t like C and C++. I loved C and C++ when I took those classes in college. I really like using Visual Studio. But trying to use VS to make 2D platforming games in Windows instead of giving up and just using Game Maker Studio (or AGK or Multimedia Fusion or Unity or Construct or Clojure or HTML5 (+Javascript) or Python or just about anything else) is just asking for headaches.

    One day I am going to find the time to teach myself how to make my own engine. I will find a cross-platform API that is suitable to my needs and figure out this “real-time 3D rendering” thing I’ve heard so much about. Until then, plain scripting languages save me an abundance of unnecessary work.

    EDIT: Just to be clear, I’m not suggesting Shamus stops doing what he’s doing. If Good Robot was made in Game Maker Studio it would have been done sooner and easier but it would have looked even more like Enter The Gungeon, Nuclear Throne, and other twin stick shooters made in GM.

    But the new version doesn’t have a tool to load WAV files.

    That doesn’t even make sense. That’s like a graphics library that doesn’t know how to handle vanilla bitmaps.

  30. Zak McKracken says:

    I consider myself a Python Person, but I definitely don’t think you should convert your game to it.

    It might be a very cool and efficient way to change high-level game behaviour (so, yeah, learning Python could potentially help you), but it will not make your problems go away, and unless you have some efficient and fast libraries (witten in not-Python) for practically everything that needs to be fast, it will run slow.

    But… yeah, for high-level stuff it is the coolest thing, evar!

  31. I’m on team Visual C++ Standard Runtime Libraries. It’s where I’ve had the most issues. But – from memory (and correct me if I’m wrong) – can’t you include the DLLs for it? Use the versions you ship rather than on system? Not sure how that goes with licensing though.

    I’m also on team “roll out some fresh VMs and install combinations of things on them”. Normally works for me to find deployment issues.

    Also – is wrapping your whole program in an exception handler, and getting some better logs out of the program an option? And does it crash on load, on running, or before load?

Leave a Reply

Comments are moderated and may not be posted immediately. Required fields are marked *

*
*

Thanks for joining the discussion. Be nice, don't post angry, and enjoy yourself. This is supposed to be fun.

You can enclose spoilers in <strike> tags like so:
<strike>Darth Vader is Luke's father!</strike>

You can make things italics like this:
Can you imagine having Darth Vader as your <i>father</i>?

You can make things bold like this:
I'm <b>very</b> glad Darth Vader isn't my father.

You can make links like this:
I'm reading about <a href="http://en.wikipedia.org/wiki/Darth_Vader">Darth Vader</a> on Wikipedia!

You can quote someone like this:
Darth Vader said <blockquote>Luke, I am your father.</blockquote>