Single .exe / Molebox / Smart Packer etc.

Previous topic - Next topic

Poetronic

Hello everyone,

just wanted to know if anyone in here is succuessfully using programs like Molebox or Smartpacker or something the like? I tried, but I failed with every single program (Windows 7 / 64 Bit). I either got some weird Windows errors or the software seemd totally buggy or the output was somewhat damaged (i.e. slighlty wrong window size). So I am really wondering whether those virtualization programs are really worth trying - not to mention the false virus alerts that some of them can trigger! I am still really, really hoping for an INCBIN-command like in BlitzMax (seems to be one of the MOST crucial features for GLBasic to me!), but in the meantime I would still love to be able to make a single exe-file from my game folder(s). At least I would love to be able to protect my game resources. Tips anyone?

Thank you!  :)

PS - I think that Molebox would be the program of my choice, but no matter what I do, I always get an error message that says "Cannot run packed executable -Reason- failed to create child process", or when I manually open the exe-file "The application has failed to start because its side-by-side configuration is incorrect". Has anyone experienced the same problem and knows what I might change in order to get it to work?
ILI-Blocks, my first game ever - please check it out! http://www.glbasic.com/forum/index.php?topic=8654.0

Poetronic

Although it doesn't solve the problem of protecting files and related issues, the following option lets you create a single .exe-file containing all your game folders/data/contents:

http://www.qbasicnews.com/dav/qb64tut/

This way, the contents of the rar/exe get temporarily extracted in some temp folder I guess. I think a lot of people might not really think of trying to "unrar" an executable (unless you didn't change the icon from rar to something else). It also works when the user doesn't have WinRAR installed (I uninstalled and it still worked). Maybe someone finds it helpful - until now I didn't even know that tcreating executables from WinRAR was possible. Still, it does not protect game contents or anything, it merely creates an executable from all your game files.
ILI-Blocks, my first game ever - please check it out! http://www.glbasic.com/forum/index.php?topic=8654.0

erico

Hello Poetronic,

Nice solution, altough it dosen´t cover full protection.
Have you considered releasing the data as is? and maybe that exact thing can be an app propaganda?

Back on subject, we could also check for our medias right? So even if people can edit it won´t work transformed.
Just a general idea. ;)

Poetronic

Hi erico,

what exactly do you understand by "releasing the data as app propaganda"?

I am currently working on an encryption function for my level and highscore data. the ENCRYPT$/DECRYPT$ functions in GLBasic have already proven to be very helpful. In my case, protecting level data / hiscore files / online data etc. is of primary concern. If someone really feels the need to change the player/anim - so be it, why bother, since it doesn't change the game structure.

Right now, I am trying to let players create their own levels in a level editor and then have them upload their "parcours" to an online database, thus making their levels available to other players. This is still work in progress, but it's pretty obvious that players will need to be able to store their level-data locally, thus going beyond the single-exe-solution anyway, I guess...
ILI-Blocks, my first game ever - please check it out! http://www.glbasic.com/forum/index.php?topic=8654.0

erico

Oh, now I understand it , you didn´t mean media but actual game data. :-[
And those datas should actually be protected, It sucks when people hack score.

But unfortunantly I would not know how to go about doing such.

Poetronic

#5
Yeah, hacked hiscores suck big time  :S

I think I might try something like this for hiscores and game data:


  • Create some string-keys for ENCRYPT$-function
  • Create some more strings
  • Add these strings to the existing data based on a more or less complex loop
  • Write the encrypted data in the files using a loop that switches the encryption keys
  • Load the data using the same routine

I think this solution is more or less necessary when encrypting data like 0,0,0,1,0,0,0,12,13,14,0,0,0... because otherwise you might be able to identify contents by the way they are repeated in the data-files.

Another issue might then be the online hiscores...
ILI-Blocks, my first game ever - please check it out! http://www.glbasic.com/forum/index.php?topic=8654.0

erico

 :offtopic:

You stated  "parcours" on high score on your game...
which leads me to believe it is an action game, care to share something about it?

Poetronic

#7
Sure, thanks for asking  :)

I said "parcours", but the actual game is pretty far from being innovative or anything. It is my first project, so I wanted to start with something basic and decided to to a little breakout clone (yeah, yawn, I know...).

Still, I am planning to include a level editor and an online hiscore. I would then love to add the possibility for players to share the the levels they created ("parcours") with other players, so that there is an individual hiscore for each of them. Perhaps that would make the game a bit more interesting, since the number of available levels would practicatlly be unlimited.

What I do have by now is:

- a working game mode with local hiscore and a still very rudimentary online hiscore
- a working level editor with the functionality listed in the specific screenshot
- a handful of blocks with different behavior like static, explosive (recursive), teleport etc.
- a handful of items to start with (player size, missiles, explosive ball, sticky ball, level up etc.)
- enemies shooting back at the player
- no screenshot function (I missed it very badly writing this post!)

There is still a lot on my todo-list (design, online functionality, level editing and so on), but I am pretty sure that I will get this project done within a few weeks from now.
ILI-Blocks, my first game ever - please check it out! http://www.glbasic.com/forum/index.php?topic=8654.0

erico

Looking good!

If you would allow me a suggestion, gfx for block and paddle could have more work into it.
Editor looks nice too, is it fully functional? Like I can create a level and share and it will work?

I have seen many ´highscore´ threads on this forum, you might wanna search a bit as If I remember correctly, some even dealt with security.

I might have to look for those threads too if I finally decide to add the high score online stuff.
I guess there was an online high score solution offered by Gernot, where scripts were on the GLBasic site so people could use it with less rassle, I´m not sure if it is going, does anyone know about it?

Poetronic

#9
Yes, as I said, design issues are still on my todo-list. I would like to get a 100% working version running first, and then I will take care of the design.

The level editor is fully functional indeed, although it is still fixed to the main set of levels. Storing/loading multiple files with different "parcours" is not possible yet. I wrote the editor mainly to be able to edit my own levels for the game, but I think a level editor with an online sharing option might be an interesting feature (way more interesting than a simple breakout clone obviously). But you could save your levels and send me the blocks.ini and items.ini - then I could play your levels ;-)

And yes, I've been reading a lot of threads about security issues and online stuff lately (I recommend Kitty's Networking for Cowards series), but I am very sure that it will take me at least a few more weeks time to really figure out how to do the stuff I have on my todo list...

ILI-Blocks, my first game ever - please check it out! http://www.glbasic.com/forum/index.php?topic=8654.0

BdR

Have you tried ShoeBox to create .SBX files? I haven't tried it myself but you can use it with built-in GLBasic commands like SETSHOEBOX. For more information click here.

Quote from: Poetronic on 2012-Aug-08
Still, I am planning to include a level editor and an online hiscore. I would then love to add the possibility for players to share the the levels they created ("parcours") with other players, so that there is an individual hiscore for each of them. Perhaps that would make the game a bit more interesting, since the number of available levels would practicatlly be unlimited.
Sounds very cool :good: Are you planning on releasing it also on iPhone or Android? The game description reminds me of the game Block (by kenta) a japanese freeware game that also keeps high-scores per per level
http://www.mobygames.com/game/block/

Btw for screenshots you can just use the PrtScr button if you run you program in Windowed mode, or you can use the SAVEBMP command, for example SAVEBMP "myscreenshot.png".

Poetronic

Hi BdR,

.SBX files may be an option, but they also don't really protect your media files. I am still hoping for an INCBIN-command to include binary files in your executables sooner or later (although I am not quite sure whether that's really a solid protection (but I assume it is way better than shoeboxing files).

For the moment I will be satisfied to release a working version for Win/Linux/MacOS soon (without a public level editor in V1.0, but with an online hiscore database for the standard levels which is already in place and working). I will definitely take a look at kenta's "Blocks"!

Thank you for the hint at SAVEBMP!  :)

ILI-Blocks, my first game ever - please check it out! http://www.glbasic.com/forum/index.php?topic=8654.0

Poetronic

Just tried to play kenta's "Blocks"...

...but about ten seconds into the game my eyes felt like sand paper and then almost exploded. Seriously, graphics and gameplay are outright horrible in my opinion.
ILI-Blocks, my first game ever - please check it out! http://www.glbasic.com/forum/index.php?topic=8654.0

BdR

Really? I though BLOCK was pretty cool. You could also check out a more recent game called Wizorb for iPhone for gameplay ideas.

But back on topic, I think the real question is what do you want to protect using this? As for graphics and sounds, you can't prevent people from using the default screencapture and soundrecord functionality of Windows/mac. I understand why you want to protect highscore upload, but why protect the leveldata? If you want to prevent people from changing the default levels so they can easily get a highscore, then you can simply include the leveldata checksum into the encryption. Something like this:

Code (glbasic) Select
FOR y = 0 to 10
  FOR x = 0 to 10
    iCheckSum = iCheckSum + BricksLayout[x][y]
  NEXT//x
NEXT//y

MyText$ = "score=" + iScore + ";level=" + iLevelNr + ";playername=" + playername$
MySecret$ = "8ibc4x86" + iCheckSum + "j3cbqlfa" // take that, evil haX0rs!
hex$ = ENCRYPT$(MySecret$, MyText$)

// now upload hex$ to your server and decrypt it using PHP or ASP etc.


This way you have a different secret-string for each level, which is much more difficult to hack. And then on your server where the highscores are uploaded, you can keep a list of precalculated MySecret$ strings for your default levels to decrypt the received highscores. If it cannot be decrypted, the score is invalid.

Poetronic

#14
Hey BdR,

checksum protection is just what I decided to do even before you posted your comment :-) It already works (thanks to the easy usage in GLBasic), so no need to change anything there anymore. I would still like to be able to include ALL my game data in a single executable file. I simply don't like to have people download a rather small game and then it turns out it consists of 3 Folders, 2 DLLs, 82 images, 10 song modules - you get the point...

Thanks for your comment, I hope I will find some time soon to complete version 1.0a of my game :) Will also have a closer look at Wizorb later on.


ILI-Blocks, my first game ever - please check it out! http://www.glbasic.com/forum/index.php?topic=8654.0