Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

Vapourware Codexian Game Development Thread

CreamyBlood

Arcane
Joined
Feb 10, 2005
Messages
1,392
All very nice. Well done. If you can use C++ to get some veins exploding out of the eye sockets, you can colour me impressed.
 

Reinar

Scholar
Joined
Oct 20, 2015
Messages
145
:abyssgazer::lol: Fits right in.
M4Psnb6.jpg
 

subotaiy

Cipher
Joined
Aug 8, 2012
Messages
522
Location
Romania
You don't need a plugin for that in sublime. If you are using Jetbrains products, they also have great support for all kind of formats, including hierarchy view.
 

Zep Zepo

Titties and Beer
Dumbfuck Repressed Homosexual
Joined
Mar 23, 2013
Messages
5,233
If I can inherit someone else's savegame system--even if it means mucking through JSON--I'd rather do that than write my own from scratch.

What?

You need HELP saving savegame data? Maybe programming is not for you...just sayin'.

Zep--
 

Nathaniel3W

Rockwell Studios
Patron
Developer
Joined
Feb 5, 2015
Messages
1,234
Location
Washington, DC
Strap Yourselves In Codex Year of the Donut Codex+ Now Streaming!
Dude Zep, no need to be a dick. I don't feel the need to justify my programming chops to you. But I will let you know that when you're a singleton developer working on a project of this size, you save time and effort where you can. And if that means using an off-the-shelf savegame solution, then that means there's extra time for me to work on something else.

And Mustawd I haven't seen you in a while. I guess now I know to avoid pissing off DU?
 

Zep Zepo

Titties and Beer
Dumbfuck Repressed Homosexual
Joined
Mar 23, 2013
Messages
5,233
Dude Zep, no need to be a dick. I don't feel the need to justify my programming chops to you. But I will let you know that when you're a singleton developer working on a project of this size, you save time and effort where you can. And if that means using an off-the-shelf savegame solution, then that means there's extra time for me to work on something else.

And Mustawd I haven't seen you in a while. I guess now I know to avoid pissing off DU?

Dude, Not trying to be a dick. When you have 80 MB of shit (or however big it is) that your tools won't open, it's time to rethink your language and/or method.

Zep--
 

Aiff((AimpliesA)ImpliesA)

Artist Formerly Known as Prosper
Übermensch
Joined
Oct 21, 2016
Messages
287
Dude Zep, no need to be a dick. I don't feel the need to justify my programming chops to you. But I will let you know that when you're a singleton developer working on a project of this size, you save time and effort where you can. And if that means using an off-the-shelf savegame solution, then that means there's extra time for me to work on something else.

And Mustawd I haven't seen you in a while. I guess now I know to avoid pissing off DU?

Dude, Not trying to be a dick. When you have 80 MB of shit (or however big it is) that your tools won't open, it's time to rethink your language and/or method.

Zep--

To be fair Zep he did not indicate File I/O is insurmountable. But that it's too much effort. Which I have to agree. It has no relationship to the resources being managed, does not in and of itself manage the resources, but has performance costs.
Meanwhile what resources themselves are needed to be loaded/saved are determined not just by a map's design, but its intial state, current state, future states and let's not forget individual save games onced drawed on a common initial set of data.

Add also:
1) save game switching between potenially very different saves without having to restart the application,
2) editors
3) configuration files
4) individual file formats
5) endian and ansi/unicode retardation
6) picking appropriate folder structure layout and crossplatform directory path derps
7) temporary cache folder bullshit some OS' have
8) a mod plugin system potentially
9) network streaming of bullshit

Zep by telling him to switch tools you merely doubled down for him to find something that's already made.

hint: it's project specific.
 

Zep Zepo

Titties and Beer
Dumbfuck Repressed Homosexual
Joined
Mar 23, 2013
Messages
5,233
Example from the Old School

Armor Byte
1st 4 bits 0x0000<0000 Heavy,Medium,Light,Clothes
2nd 4 bits 0x0000>0000 Plate,Chain,Leather, Cloth.

Example - Heavy Chain
0x10000100

In 1 byte you can have 4 armor types and 4 Weight Types

Need more? Use Words or Double Words or whatever...add actual weight, color, whatever...

Zep--
 

Nathaniel3W

Rockwell Studios
Patron
Developer
Joined
Feb 5, 2015
Messages
1,234
Location
Washington, DC
Strap Yourselves In Codex Year of the Donut Codex+ Now Streaming!
Example from the Old School

Armor Byte
1st 4 bits 0x0000<0000 Heavy,Medium,Light,Clothes
2nd 4 bits 0x0000>0000 Plate,Chain,Leather, Cloth.

Maybe that was all you needed for Zork, but this is what I'm saving:
Army
Squads
Soldiers
Equipment
Enchantments, upgrades, stats​
RPG info (name, stats, portrait, sprite sheets)
Character classes
Level and xp earned in this character class
Cards remaining in the level-up card deck​
Equipment not currently equipped
Supplies (such as food and crafting materials)
Soldiers not assigned to squads​

I do that for every one of up to about 100 armies on the map. Most of the information has to be there because you can see every individual soldier on the map and a lot of them are randomly generated. But still for the NPC armies I leave out some of the information. For every single object that gets saved, I have to record its location and a reference to the "archetype" that was used to build it. (And players can make their own campaigns with their own custom archetypes for character classes, equipment, crafting supplies, crafting recipes, and pretty much everything. The game has to be able to load those.) For that structure, JSON works pretty well. And that's only about half of what the game has to save:

Campaign variables (for the state of each quest, for example, and these are unique to each campaign, and players can make their own campaigns)
Levels currently loaded (once again, unique to the campaign, and players can make their own levels)
State and location of generic gameplay elements (movable platforms, open doors, for example)
Characters not assigned to an army
Types and counts of armies on the map (so that there could be a max of say 20 bandit armies but only 1 dragon army on the map at a time, and when the respawn timer hits, the correct number is already known)
Game type (in case a modder gets really ambitious and decides to write his own game code that extends the vanilla game type, and the save game system has to be flexible enough to save all his stuff too)
And with all that, the savegame files weigh in at about 4 MB. That's more than I would like, but it is what it is.

And JSON isn't the only way I save data. It's just what makes sense for me for the save games. For the list of available campaigns, and for sound and video options I save .ini files.

And maybe there is a better way to save the game than using JSON. I haven't ruled that out. But I can say that there is no other way to save the game that is already working so any other option already has that count against it.
 
Last edited:

Nathaniel3W

Rockwell Studios
Patron
Developer
Joined
Feb 5, 2015
Messages
1,234
Location
Washington, DC
Strap Yourselves In Codex Year of the Donut Codex+ Now Streaming!
At the end of the day, I'm the one who has to program this. You're not responsible for keeping it to any kind of a schedule, but I am. I've wasted enough time feeding the trolls.
 

Nathaniel3W

Rockwell Studios
Patron
Developer
Joined
Feb 5, 2015
Messages
1,234
Location
Washington, DC
Strap Yourselves In Codex Year of the Donut Codex+ Now Streaming!
Zep Zepo , you said you're not trying to be a dick, but guess what. Everything you say here is just you showing what a dick you are. Let me tell you could have not been a dick:

Me: Hey guys, can you recommend a good JSON viewer?
You: No man, I don't use JSON.
Me: OK, cool. Thanks anyway.
You: You know, you could get a lot more storage in a lot less space if you just saved everything as bytes.
Me: Yeah, you're right, but you know what? I already have a savegame solution that works for me.
You: OK, then. Good luck!

There, wouldn't that have been nicer? Instead here you are accusing everyone of not knowing anything about programming just because I'm not rewriting my savegame system and because Mustawd tried defusing the tension with a joke.
 

Zep Zepo

Titties and Beer
Dumbfuck Repressed Homosexual
Joined
Mar 23, 2013
Messages
5,233
You: My savegame "Solution" I copped off the internet is crashing my viewer which I also copped off the internet since I'm too lazy and/or dense/inexperienced to write my own.
Me: LOL JAVA. gg nub.

Is more like it.

Zep--
 

Hoaxmetal

Arcane
Joined
Jul 19, 2009
Messages
9,161
Zep Zepo , you said you're not trying to be a dick, but guess what. Everything you say here is just you showing what a dick you are. Let me tell you could have not been a dick:

Me: Hey guys, can you recommend a good JSON viewer?
You: No man, I don't use JSON.
Me: OK, cool. Thanks anyway.
You: You know, you could get a lot more storage in a lot less space if you just saved everything as bytes.
Me: Yeah, you're right, but you know what? I already have a savegame solution that works for me.
You: OK, then. Good luck!

There, wouldn't that have been nicer? Instead here you are accusing everyone of not knowing anything about programming just because I'm not rewriting my savegame system and because Mustawd tried defusing the tension with a joke.
That's 50 lines of code you could have written for your new savegame system.
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom