• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Windows frustration, without a volume label recognition database for my game

I got a problem that I cant solve, because it has to do with the nature of programming languages such GML, C, C++, and etc. of how they're designed with platform specific functions. But before I explain how this part fits with my problem, let me explain the problem of my game that I wish I could solve. I want to do something that involves reading and writing outside the sandbox of GMS.

I am developing a game, that has a cartography system that expands on demand, by the player. When the user conquers a region or map, they have the ability ( or option ) to add a new region to the existing map system, to continue playing the game. When they conquer that map, they can add another region. I want to know how much space on a medium ( other than the local hard drive ) that would I need for my expanding mapping system. I calculated roughly, 6+ TB of space being used if I were to make a complete and full cartography system for my game. Again, this is all on demand, in the design of my game. Originally in the installation of the game, you have a given region or realm that your player plays in and conquers, and then adds on as they need. However, I want to player to have access to other mounted mediums that they can use to write this data to.

The map data is written once and read infinite times after that. Again, as I thought, why not give the user the ability to use other mounted storage devices, such as DVD data discs, USB flash drives ,and external USB hard drives. In this method, I would be saving the players local hard drive's precious space ( no matter how big their hard drive is ). Then I thought, I should make a database system for this organization, which expands as more mediums are registered to it. When the game needs that data, which is that specific mapping information - the game tells the player which medium to put into the computer by volume label name ( whether it us a DVD data disc, or a USB device especially ). In addition, the system should also tell the player when they have mounted the wrong medium, by checking the volume label name. The other feature of the system is to also tell the player how much free space is left on that medium. This information and other types of information would be kept tracked by the database system that the game is using. Every time a medium is read or written to, the database is updated, and the information of how much space used is checked for and also updated. For DVD data discs, there is no free space left ( this is a given ), so this information would never change, just the information of when the last time the DVD medium used, recognized by its volume label name.

The database system is an organization system that is created by demand. Every new medium that is used to write new mapping data of the game is registered into the database system. This organization improves the ability for the player to find what they need, so that they don't have to shuffle though their collection of DVDs or USB flash drives ( or External Hard Drives ) to find that medium outside of the game.

*Please note, when I mean free space, I am not talking about a partition - I am talking about the absolute physical hard drive space that is available ( or the limits of physical space for a
medium ).
The most important information that the database system has to have is the total amount of physical space that is available, of any medium, measured in bytes. That way if the player wants to add a new region of map data to a medium, the system will tell them by warning messages ( as well as preventing the operation ), OR by observing the data entry read on the screen of the medium in the database, if there is insufficient space to add a new mapping data. l the problem is, in GML there are no functions that will tell you the volume label name.

Another way I that I thought about solving this, is that I would have to scrap the database idea and tell the player how much space they need. Then the player would have to do a dipstick operation ( this is described below ). The problem in GML, is that there is no provision to provide a means of telling you the size for things such as DS grids or DS lists in bytes , as C ( or C++ ) can tell you using (sizeof). I cant escape the need to measure data consumption in a programming language. The GML manual ( which needs more information ) does not tell you exactly the limits of space you that you have for a variable even if it can be used for both text strings and single values for variables. If only I had access to the equivalent of something like limits.h in C, I would be able to know this. GML variables feel like they are the invention of a union in C.

I am stumped when I wonder about how or why this is not available in the langauges that I use.

I know that GMS was written using MVS ( Microsoft Visual Studio ), just by the clue in one of the preference panels that you use MSV. I am going assume that GMS written in C++, unless I am told otherwise. I would find it hard to believe that there is NOT a command in the entire listing of platform specific functions in MVSC++ section that can tell you the volume label name and the mediums free space and used space that is available. Becuase if such a function did exist, I am sure it would be important to use in a program.
Note, I don't have MVS. I program MS-DOS console programs using DJGPP ( by DJ Delorie ) when I program in C. DJGPP a import of gcc and gpp from the Linux. In DJGPP ( via RHIDE ), no such functions of what I want to do exists for checking volume label names or drive space byte values, in that programming system .

I find it really strange, that in MSDOS ( going way back to version 6.22 and before), the "dir" command, when used, displays the directory listing including the volume label name, and the number of bytes free available - AND yet we do not have that ability in a programming language to get those specific pieces of information. The ability to do this is not in C, and probably not in C++ ( I don't program in C++, even though I know some of it ), and its definitely not in GML, especially for outside the sandbox file operations. My problem has nothing to do with the fact whether its a Windows or a Linux ( Unix ) OS , it has to do with the fact that the necessity of the invention was overlooked and never created for a programmer in the development of C or C++. If I am wrong - please tell me, I need to know.

In a strange analogy, this is like the automobile technology that has evolved, but has missed the necessity of having a fuel gauge on the dash board. You have to pull over to the side of the road and turn the engine off. Then you have to get out of the car and open the hood to use a second dipstick invention ( like you do for checking the oil ) for the fuel tank to tell you much gasoline is left in the tank.

The dipstick operation for the automobile is like this in computers....

In my problem, this would be the same as pausing the game, minimizing the game window, and using properties to tell me the volume label name, the amount of free space that is left, and the capacity of how much information I can write to the medium, so I can go on adding another chunk of map data.

The problem is that this information is only avail through the OS. The only time that I have only seen this information of free space is when you install a new program. In every program that has a installation wizard for Windows, there is usually, in the installation process where wizard tells you, how much space you have on your local hard drive, and how much space the program us going to use, before you click the option to install the program. So I know it is possible to get this information, its just that I have not seen the ability in a programming language, that has the means yet ( which escapes me as to why we dont ). It can be done. I just dont understand why in this age of computers we have not implemented a function or a feature for C ( or C++ ) that is platform specific to tell us this information. I would find the idea of being able to get volume label names and storage space information important for GML as well. In my game, all I would have to do is use an IF statement to tell the user if the volume label of the medium is not the medium the game is requesting, OR the fact the amount of free space is less than the amount the game needs to add new map data.

Again, my volume label recognition database would make organizing multiple mediums that the player has registered in the database to find and remember, just by recognizing the volume label of the medium and retrieving the amount of available or used space in that medium, along with the measurement of the physical capacity.

So I am stuck with how to solve this problem for my game, and I have a feeling that I am going to spend more time creating a work around for this problem, than working on my game. Im sorry if I can not explain it any better, but I am happy to answer any questions you have.

What do you think?

Thanks in advance.
 
H

Homunculus

Guest
I'm so confused after reading this wall of text that I'm not even sure where to begin with, but the amount of space seems like a good candidate. How anyone in his right mind would even think of playing a game that may at some point require up to 6tb of data? I mean, you already have games with a theoretically infinite map, minecraft is a good example of that, but even in the worst case having a minecraft map that's bigger than a few gigabytes is extremely unlikely.

I'd really like to know how you got that 6tb+ figure honestly, and even if that's the actual size you may at some point get to while playing the game (also assuming you are storing data in an efficient way) it's not a problem you are likely to solve by involving external media or DVDs (!).

I smell something really wrong here.
 
Last edited by a moderator:
I agree entirely with Catan. You're very probably storing data naively which is leading to ballooning file sizes. There's many, many games that have a basically infinite world, which maintains alterations, that are absolutely nowhere near a terabyte in size (Minecraft, as already mentioned, No Man's Sky, Elite Dangerous...Many many more I haven't played). I think you need to rethink your approach to what you are attempting to do.
 
Top