Chests
2 posters
Page 1 of 1
Chests
Hi!
I've finally started to work on savable containers. Because the game's development is impeded if I do not complete this, I've decided to get it over with. Once chests are complete, I can steamroll over all of the new blocks, biomes, armor, weapons, etc.
How do chests work?
I've decided that I will use a .ini based saving system. The code will choose a random number out of 9,999,999 and use it as the chest's ID. If the code detects that there is another chest using the same ID, it will choose again. It will then create a file:
chestsave[ID].ini
This, however, creates a problem with cheaters: they are able to edit the file. Therefore, I will try to prevent cheating within chests later on in the development of chests, but for now, I want to focus on this particularly.
How much storage is available within a chest?
The amount of storage available in a chest is 24 slots (4 rows of 6).
I've finally started to work on savable containers. Because the game's development is impeded if I do not complete this, I've decided to get it over with. Once chests are complete, I can steamroll over all of the new blocks, biomes, armor, weapons, etc.
How do chests work?
I've decided that I will use a .ini based saving system. The code will choose a random number out of 9,999,999 and use it as the chest's ID. If the code detects that there is another chest using the same ID, it will choose again. It will then create a file:
chestsave[ID].ini
This, however, creates a problem with cheaters: they are able to edit the file. Therefore, I will try to prevent cheating within chests later on in the development of chests, but for now, I want to focus on this particularly.
How much storage is available within a chest?
The amount of storage available in a chest is 24 slots (4 rows of 6).
Niften- CREVIS DEVELOPER
- Posts : 255
Join date : 2014-10-14
Location : CA
Re: Chests
Couldn't you make it so in the ini, it also detects the coordinates of the saves chest, so it one tries to cheat, the coordinates prevent this from happening as much
Littleman- Posts : 56
Join date : 2014-10-30
Age : 26
Re: Chests
Sorry, I don't quite understand what you mean. Elaborate, please?Littleman wrote:Couldn't you make it so in the ini, it also detects the coordinates of the saves chest, so it one tries to cheat, the coordinates prevent this from happening as much
Niften- CREVIS DEVELOPER
- Posts : 255
Join date : 2014-10-14
Location : CA
Re: Chests
when the game assigns the check the ID, it also saves the coordiantes of the chests' location so if they don't match the check shows a troll face or something like "Don't cheat" :p adn the chest will be empty
Littleman- Posts : 56
Join date : 2014-10-30
Age : 26
Re: Chests
Cool idea, but I don't understand how this will work still: I could have the coordinates saved in the .ini, but, the editor/cheater is out of game when he edits these.Littleman wrote:when the game assigns the check the ID, it also saves the coordiantes of the chests' location so if they don't match the check shows a troll face or something like "Don't cheat" :p adn the chest will be empty
Niften- CREVIS DEVELOPER
- Posts : 255
Join date : 2014-10-14
Location : CA
Re: Chests
Hi everybody,
I've got a quick update on chests. After looking at the theory for a while, looking at ini functions, and all of that good stuff, I finally decided to start working on it and progress is spectacular. I love how many chests that each of these files can store without getting that large. Let me put it in perspective: it will take approximately 20 million chests until the file becomes 1 gigabyte.
I'm very happy with the progress currently, and I'll let you know when I finish
I've got a quick update on chests. After looking at the theory for a while, looking at ini functions, and all of that good stuff, I finally decided to start working on it and progress is spectacular. I love how many chests that each of these files can store without getting that large. Let me put it in perspective: it will take approximately 20 million chests until the file becomes 1 gigabyte.
I'm very happy with the progress currently, and I'll let you know when I finish
Niften- CREVIS DEVELOPER
- Posts : 255
Join date : 2014-10-14
Location : CA
Re: Chests
That's good! I don't think anyone will fill THAT many chests in one world anyway.Niften wrote:Hi everybody,
it will take approximately 20 million chests until the file becomes 1 gigabyte.
Littleman- Posts : 56
Join date : 2014-10-30
Age : 26
Re: Chests
Littleman wrote:That's good! I don't think anyone will fill THAT many chests in one world anyway.Niften wrote:Hi everybody,
it will take approximately 20 million chests until the file becomes 1 gigabyte.
Yeah, heh, I'm also pretty sure it isn't possible. There is a bottom of the world eventually and the planet is not infinite.
Niften- CREVIS DEVELOPER
- Posts : 255
Join date : 2014-10-14
Location : CA
Re: Chests
So, they aren't working properly as of now. In fact the slots aren't even visible. I've been working at this for nearly 2 days straight and I'm about ready to punch a hole into the screen.
Niften- CREVIS DEVELOPER
- Posts : 255
Join date : 2014-10-14
Location : CA
Re: Chests
How's the chest problem going? Have you managed to make the GUI visible?
Littleman- Posts : 56
Join date : 2014-10-30
Age : 26
Re: Chests
Nay. Haven't been able to do too much lately. Also, I post on the devlog more often than on here nowadays so I'd invite you to check that out on http://www.crevis.net/Littleman wrote:How's the chest problem going? Have you managed to make the GUI visible?
Niften- CREVIS DEVELOPER
- Posts : 255
Join date : 2014-10-14
Location : CA
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum