Blog

  • Damnit, it can still happen

    I thought of a way the crash can still happen, so I’ll fix it another time…

    EDIT: It only happens during reset (like changing game modes in some of the examples/games…)

    EDIT2: The fix is in 2.4.8

    This function is a little bothersome being in the core (it shouldn’t know about game library stuff…):

    All of these strings “run” “draw” etc are part of the game library… but the obfuscator needs to know not to try to obfuscate them… they’re a special kind of function that is called from the internals, so the names have to stay the same.

    It’s not a major problem as it’s only part of obfuscation and could be separated by querying libraries for callback names.

    EDIT3: I just realized I could probably look up the obfuscated name and call that, for these callbacks, so I can remove game library stuff from core…

    EDIT4: I think I can add a really simple call_function_obfuscated that relies on call_function. I was worried at first because the _obfuscated function involves a loop of function names, but at what is default 60 times a second, it’s nothing. If you use BooBoo as a library, and obfuscate your code, you’ll have to call call_function_obfuscated instead of call_function to call into BooBoo code. It’ll work whether your code is obfuscated or not, whereas call_function will only work if it isn’t.

    EDIT5: I was wrong! There’s no way to fix this dependence on a list of reserved names. Not without forcing you to recompile BooBoo when you obfuscate. Like I said, it’s minor anyway but since the obfuscated code is written before and in a separate execution from launching it, those names like “draw” and “run” need to remain the same because there’s no way to get the real name from a obfuscated name… you could manually edit all those into game_launcher.cpp with each obfuscation… that’s the only other way to do it than a list of special names.

    EDIT6: However, I did miss one special name, “end”…

  • More Obfuscation Stuff

    There is a bug in obfuscating custom expression functions. Like when you define a function of your own and use it in an expression like (my_func param) my_func was appearing unobfuscated while the function name had been changed. This is fixed (will be released in 2.4.7).

    To obfuscate programs with more than one script (using reset) you can create a temporary copy of your game and copy each script to “main.boo” and obfuscate each one.

    EDIT: Also found the crash bug I posted about earlier, wasn’t entirely fixed but is now… and found that accessing containers of containers was not being obfuscated correctly.

    EDIT2: strictly include files don’t need to be obfuscated, just scripts and include files can then be removed from your game. The scripts remain with the same name and obfuscated contents. The include files are embedded and obfuscated within the scripts.

  • I just remembered why I have schizophrenia

    I remember knowing at the time I’d never be the same!

    I remembered being molested but not this incident!

  • Debugging Obfuscated Code

    Admittedly I only tested obfuscation with a few larger programs. So if you run into an error, you can debug it by replacing every space with a newline then running it…

    In Vim you can do it with “:%s/<one space>/<type Ctrl-V then Ctrl-M>/g<enter>”

  • I’m So Stressed

    I literally find Super Mario Bros. for NES stressful, that’s how bad it is. It’s literally the least stressful thing ever created.

  • Found a Huge Bug in BooBoo

    Callbacks could be called before things they depend on were initialized. It never happened to me once until I started working on the obfuscator, which takes longer and thus allows more time for the callbacks to be called erroneously. This would cause crashes at startup and could have affected other people (just not me.)

  • Obfuscating BooBoo

    I was able to get BooBoo obfuscation working. Here’s what the first page of the town example where you walk around and pick up apples looks like.

    It’s built into the interpreter and accessible with the +obfuscate switch to BooBoo or BooBooCLI.

    The one thing you need to pay attention to is when you use “reset”. You’ll need to separately obfuscate every script you “reset” to. Also, you lose include file flexibility as the obfuscated file is dumped to a single file (standard output.)

    Examples:

    > ./BooBooCLI dragonslayer.boo +obfuscate ; dumped to terminal
    > ./BooBoo town +obfuscate > foo.boo ; saved to file
  • Just Realized Something

    Schizophrenics are criminally under credited. If I say I worked 16 hours, you assume I worked 12. If I say I was stabbed, you say I was poked. Everything I say is assumed to be a gross exaggeration so I never get full credit for what I’ve done and been through!

  • Would You Use This?

    Would you use a BooBoo obfuscator? Because I think I could whip one up in a day or two.