Author Topic: Better folder structure  (Read 5129 times)

~faceplam~

Windows XP and newer versions have a Saved Games folder either in My Documents (XP) or directly on the user (Vista/7). That's where the game addons and saved builds would go.

Programs should never be installed to the root of the drive. Not only is it disorganized, it's tacky.

Programs should be easy to back up. When everything is stored in the user's folder, copying the entire folder can be considered a complete OS backup. All the programs can be reinstalled and then the user's folder is just pasted back in place. Blockland can't be backed up like that, while everything else I use, can be.

Also, the registry is rather abused at this point. Originally it was only used to store file extension associations. This was as early as Windows 3.1.
~facepram~

I don't think you're getting the point here. This is a change that would require totally breaking the way the game file structure works at the moment. This game engine is not meant to access files outside of it's base folder and that is absolutely the way it should stay when the game is so open to modding like it is. The dev time would be better spent on something people can actually enjoy.

Unfortunately for you, being a "programmer" does not make you right. :panda:
« Last Edit: January 06, 2010, 03:50:24 PM by Ephialtes »

You can argue all you like, Badspot is not going to change the file structure just because one person says it's messy. The fact that you want the game split into 3 parts, is even more messy then the current system.

If you don't want to install the game directly on your main drive, make a Games sub folder.
How do you have any idea what Badspot will or won't do? I've actually got a handful of other programmers that agree with me on the subject.

Try to understand how complicated the change you suggest is comparatively to you moving the folder.

Beyond that, splitting the program and the data is a stupid move, in my personal opinion.
It's not complicated at all. It requires minimal code change. Paths are easy to change.

~facepram~

I don't think you're getting the point here. This is a change that would require totally breaking the way the game file structure works at the moment. This game engine is not meant to access files outside of it's base folder and that is absolutely the way it should stay when the game is so open to modding like it is. The dev time would be better spent on something people can actually enjoy.
It wouldn't break anything. Paths are not hard to change. End of story. If you've ever written a program that uses files and folders, you'd know how stupidly easy it is to change a single string value.

It wouldn't break anything. Paths are not hard to change. End of story. If you've ever written a program that uses files and folders, you'd know how stupidly easy it is to change a single string value.

Maybe your awesome visual basic notepad you made with live action saving and loading works using a single string value, but the Torque Game Engine is a different ball game. I suggest you go and learn about that before you go telling a bunch of people with years of experience how to use it.

Maybe your awesome visual basic notepad you made with live action saving and loading works using a single string value, but the Torque Game Engine is a different ball game. I suggest you go and learn about that before you go telling a bunch of people with years of experience how to use it.
It's called a base path. You set it to whatever you want and tack the relative path on the end of it. So instead of the program reading the file ".\Add-Ons\Map_bedroom.zip" it would read base + "\Add-Ons\Map_bedroom.zip".

base would be a single string variable. I don't know why you think it would be any more complex than that.

It's called a base path. You set it to whatever you want and tack the relative path on the end of it. So instead of the program reading the file ".\Add-Ons\Map_bedroom.zip" it would read base + "\Add-Ons\Map_bedroom.zip".

base would be a single string variable. I don't know why you think it would be any more complex than that.

Because you're doing to have to define a "base path" for the config files to go in AppData and the add-ons and saves to go in the User folder or wherever. You're then going to have to go and find every reference to these file paths and add this "base path" to it. You're then going to have to go and modify how the Resource Manager works which is a nightmare to change anyway, so that the engine knows the files exist. You then have to hack up the existing security that prevents external folder access and allow it only access to the two base paths you defined.

Sounds like a mess to me. Do you even have any experience with game engines, or is the visual basic notepad the extent of your "abilities" ?

Because you're doing to have to define a "base path" for the config files to go in AppData and the add-ons and saves to go in the User folder or wherever. You're then going to have to go and find every reference to these file paths and add this "base path" to it. You're then going to have to go and modify how the Resource Manager works which is a nightmare to change anyway, so that the engine knows the files exist. You then have to hack up the existing security that prevents external folder access and allow it only access to the two base paths you defined.

Sounds like a mess to me.
Ok, riddle me this. Why weren't all these paths that need to be modified loaded from some central location? If all the strings are hard coded, that sounds like a nightmare in itself. Global_Paths_Addons, Global_Paths_InstalledFolder, etc would have been easier to manage from the beginning.

Also, would a project wide find-replace not work on all the paths? Since strings are double quoted, you wouldn't have to worry about accidentally replacing something that shouldn't have been modified.

As for your mention of the resource manager, are you telling me that the files are not loaded by string name?

You edited your post after I began replying. I've never written a game using a prebuilt engine. I've always written mine from scratch, the few that I've written. I don't write things as simple as a notepad. And Visual Basic sucks, I don't use it.
« Last Edit: January 06, 2010, 04:09:35 PM by Richard Robertson »

I was saying that the entire addon folder should be relocated. Instead of "Blockland\Add-Ons" it would be "Documents\Add-Ons" or whatever.
i thought some things went into other folders?

i thought some things went into other folders?
I'm not sure what you mean. All the addon zip files go in the one "Add-Ons" folder.

It's not menial. It's the way programs are supposed to be written. It's called good practice. And I don't appreciate you putting programmer in quotes to say that I am not one.

Besides, changing paths is not hard. It would require changing ONE line of code for each path in a well structured program.

Alright, "programmer", what aren't you getting?  Blockland runs on the Torque engine.  The Torque engine demos do not require installation.  The installer is simply something Badspot added for convenience for idiots who can't handle extracting files.  You can test this yourself by opening the Blockland installer with an archive program like 7zip.  I never use the installer at all.  I just open the .exe with 7zip and extract the files inside to a location on my external drive.

Regarding your AppData / Application Data request, it's just stupid.  Torque games are not set up to allow per-user mods.  Look at pretty much any program that accepts plug-ins.  Almost all of them have a plug-ins folder inside of the application's install folder.  This is exactly how Blockland works.  Add-Ons are plug-ins, and they go in the Add-Ons folder.

The problem here is not the design of the engine or the design of the game; the problem is with UAC.  UAC's access control restrictions might actually be a good idea, but the "virtual store" is terrible.  Telling a user that his files are in one location when you're actually abstracting the location of the files to some randomly generated folder is ridiculous.

Again, you have 2 options:

1.  Disable UAC.
2.  "Install" Blockland to another directory.

In my case, I do both.  I disable UAC simply to get rid of the virtual store crap.  Blockland runs from my external drive and I just make a shortcut to the .exe on the Desktop.

Alright, "programmer", what aren't you getting?  Blockland runs on the Torque engine.  The Torque engine demos do not require installation.  The installer is simply something Badspot added for convenience for idiots who can't handle extracting files.  You can test this yourself by opening the Blockland installer with an archive program like 7zip.  I never use the installer at all.  I just open the .exe with 7zip and extract the files inside to a location on my external drive.

Regarding your AppData / Application Data request, it's just stupid.  Torque games are not set up to allow per-user mods.  Look at pretty much any program that accepts plug-ins.  Almost all of them have a plug-ins folder inside of the application's install folder.  This is exactly how Blockland works.  Add-Ons are plug-ins, and they go in the Add-Ons folder.

The problem here is not the design of the engine or the design of the game; the problem is with UAC.  UAC's access control restrictions might actually be a good idea, but the "virtual store" is terrible.  Telling a user that his files are in one location when you're actually abstracting the location of the files to some randomly generated folder is ridiculous.

Again, you have 2 options:

1.  Disable UAC.
2.  "Install" Blockland to another directory.

In my case, I do both.  I disable UAC simply to get rid of the virtual store crap.  Blockland runs from my external drive and I just make a shortcut to the .exe on the Desktop.
The virtual store was created so that every program that tried to write to its program folder didn't require admin access. Also, the virtual store folder isn't randomly generated. "C:\Users\Richard\AppData\Local\VirtualStore\Program Files\Blockland" doesn't look random at all.

Have you got any experience with the Torque engine directly? I couldn't find any kind of source documentation on the website and I'm certainly not paying for the engine. I am wondering why it would be so hard to make it changeable.



And I have a question for all the UAC bashers who also happen to use any form of Unix/Linux. Do you complain about sudo?

I am wondering why it would be so hard to make it changeable.

Because you're doing to have to define a "base path" for the config files to go in AppData and the add-ons and saves to go in the User folder or wherever. You're then going to have to go and find every reference to these file paths and add this "base path" to it. You're then going to have to go and modify how the Resource Manager works which is a nightmare to change anyway, so that the engine knows the files exist. You then have to hack up the existing security that prevents external folder access and allow it only access to the two base paths you defined.


At any rate, everyone on this page(excluding you, I suppose) has experience with the engine to my knowledge.

The virtual store was created so that every program that tried to write to its program folder didn't require admin access. Also, the virtual store folder isn't randomly generated. "C:\Users\Richard\AppData\Local\VirtualStore\Program Files\Blockland" doesn't look random at all.

Have you got any experience with the Torque engine directly? I couldn't find any kind of source documentation on the website and I'm certainly not paying for the engine. I am wondering why it would be so hard to make it changeable.

And I have a question for all the UAC bashers who also happen to use any form of Unix/Linux. Do you complain about sudo?

You're missing the point.  It's telling me that my files are going to one place and they're actually going to another.  That's inherently wrong.

As for TGE, the engine Blockland uses, it's no longer made.  They've moved onto Torque 3D, which is the next version of TGEA.  However, Badspot and his friend kompressor have both worked for Garage Games, the company that makes these engines.  I'm sure they know what they're doing.  Torque was implicitly designed so that the games do not have access to files outside the game folder.  Whether it could be or should modified to behave otherwise is a moot point.  Badspot just isn't going to do it.  You might as well lock the topic now.

As for experience with the engine, mine is limited.  However, Ephialtes has worked with it quite a bit.  When he says that Torque behaves a certain way, you can take his word for it.

I'm not sure what you mean. All the addon zip files go in the one "Add-Ons" folder.
some addons access things in base i thought, maybe not

At any rate, everyone on this page(excluding you, I suppose) has experience with the engine to my knowledge.
even me? :D

At this point I am giving up. Not changing my view, but I'm giving up.

Off-topic: It does make me laugh at how few people realize what UAC was actually designed to do. It's designed to enforce user awareness. Instead everyone just disabled it, finding it annoying.