Downloadable Game Question

Blitz3D Forums/Blitz3D Beginners Area/Downloadable Game Question

Happy Llama(Posted 2012) [#1]
I have finally finished my game and have run into another problem (hopefully my last). I want to make this game available for download on my website. Currently I have a zip folder with all my media and the .exe file. This wouldn't be a problem if the people who wanted to play it were more tech smart. How can I make it so 1 people can move the executable file out of the folder without messing up anything and 2 make it so the media is not so accessible and easy to manipulate.


Yasha(Posted 2012) [#2]
I don't really understand your first question. The folder is where the executable lives? Why would people move it? (If people are determined to break something... that's their own problem.)

and 2 make it so the media is not so accessible and easy to manipulate


I keep going on about this in other threads, so this may be repetitive, but:

Consider carefully your motivations for this and whether it's worthwhile.

1) It is not possible to protect yourself against copyright theft through mechanical means. Use legal means. Nobody who would get away with it will be stupid enough to try such obvious theft anyway.

2) This is not an effective way to address cheating in multi-player games.

3) Do you really care about cheating in a single-player game? Why?

4) If people want to make improvements to your game, what are your reasons for wanting to stop them? This will hurt your game's reception overall.


Happy Llama(Posted 2012) [#3]
I don't really care if people want to make improvements to my game and change the media, but I do get a lot of people saying the game won't play because they accidentally deleted a few pictures or something.

Last edited 2012


Yasha(Posted 2012) [#4]
While I would have to wonder why they were "accidentally" deleting things, the simplest option is to just chuck everything into a folder entitled "Media".

Blitz3D can access resources in subfolders just as easily as it can in the same folder. Just use LoadImage("Media\img_001.png") instead of LoadImage("img_001.png") and it will work exactly the same way, but none of your resources will be visible in the top-level folder.

You can also do this with userlibs, if you're using any, but the process is a little more complicated. This is good for very non-technical users who are frightened of DLLs.

(You can also use the other standard ways of describing a Windows path, if you need to for some reason.)


Happy Llama(Posted 2012) [#5]
What kind of file path would I have to use to make it so they can take the .exe out of the folder and have the game still work?


Yasha(Posted 2012) [#6]
That can't easily be done. If the exe is moving to an arbitrary location, it won't know its position relative to the media's location. Unless there's some way of storing the absolute path of the media before the exe is moved - not easily done since it would require the thing to run and somehow update itself? - this information is probably not available.

In short, tell them not to do that. It's not your job to fix things that the users wilfully break! In fact, doing so is actively bad as it encourages them to break more things in future. If they want to break your product, they should be left hanging! They should copy the exe and media all at once (have the installation instructions clearly say, "copy all of these files and folders").

If you make sure that the contents of the zip - exe, media folders, lib folders, etc. - are held within a single top-level folder named after your game, it may make it easier for the user to extract it, as they will appear to be unzipping just one folder thing, as opposed to a bunch of stuff suddenly appearing on their desktop or wherever.

The other option is to go for an automated installer-creator tool. The only one I know of is InnoSetup (other users will know more about this, and it has been discussed in depth in the General forums).

Last edited 2012


Happy Llama(Posted 2012) [#7]
Thanks a ton!


Adam Novagen(Posted 2012) [#8]
Another vote for Inno Setup from me. I used it for both of the projects I completed in the past; Inno Setup creates powerful and complete Windows installers, complete with the ability to add registry keys, package your media in the installer using LZMA compression, the works. If you use Inno Setup, you'll find that a script of roughly seven lines will allow you to install your entire game to a folder in Program Files and add shortcuts to the start menu like any professional program.


Matty(Posted 2012) [#9]
Just a comment -

do these same people enjoy deleting random media files from random folders on their pc and then wonder why their programs don't work?

Seems a bit bizarre and unreasonable to expect something to work if the user goes and deletes bits and pieces of it....


RemiD(Posted 2012) [#10]
Matty>>I have seen several customers delete a file when i was teaching them computer lessons. Then the customer look at me straight in the eyes, and says : "No i haven't done that."
A way to become crazy...

Tell the users of your game to not touch, to not delete, to not move the folders and the files, and if the game don't want to function, tell them to reinstall the game.

One good thing to do is to design your game so that the old saves will still be recognized if the user reinstalls the game.

Last edited 2012


_PJ_(Posted 2012) [#11]
Really, this sounds like a big waste of time.
Anybody who is - really, excuse the phrase, - dumb enough to delete files from a game folder is not worth catering for as a lowest kinda denominator in my opinion.

Jordan Russel's Inno SetUp or Microsoft's free-with-windows setup creator will be adequate and useful for allowing users to install a game correctly and locate it where they wish.

As for then being able to identify the exact folder from which the program was run from, and whether or not it is valid, can be retrieved from the installation registry (using a I think AdvApi or Kernel32 DLL)


Nexinarus(Posted 2012) [#12]
i personally either
A) make a backup program for missing files
(if a file is missing, not correct filesize, corrupted, recreate it) etc...
b) have all the gfx and stuff in DATA format in the program itself (therefore only an EXE) I've done this one before in recreating 2 QB games in Blitz) This one is where you just have to move 1 file (the exe)

As for games with registrys... I dunno about that stuff. And personally I dont like them. If a person wants to delete a game, it is easier to just delete the entire game folder.

Last edited 2012