Now that my spring semester is finished, I plan to start focusing more heavily on learning C++. That having been said, I’m currently much more comfortable programming in Java and would like to migrate data from an app I’m in the process of finishing up (in Java) to UE4.
To be more specific, I’ve been working on a procedural timeline/NPC generation system that begins at the earliest point in the game world’s meaningful history with a base list of locations, each with a list of NPC occupants. From there, it generates NPC lifespans, taking note of major events as well as each NPC’s various attributes(roughly 26 excluding lists, of which there are several) at the beginning of each year. After calculating all of this information, I’d like to migrate the data from my Java app to UE4 to set up the following:
When the player starts a new game, they select the year in which they want their story to begin. Instead of needing to generate every detail on the spot, UE4 can load the appropriate year from my pre-calculated data, which will then provide the player with a list of living families he or she can be born into. While the player finishes their character creation process from there, history books, region details, etc are generated in the background to fill in the current world settings and lore. My current plan is to have about 1500 years pre-generated, meaning I’ll have millions of variables to store when all is said and done.
Any suggestions for what the ideal solution would be for the migration process? I was writing out my own compression process to store all of these values into a .csv file, which I could then import into UE4 as a Data Table and build the world from there, but after doing a bit more (i.e., any) searching I found Protocol Buffers, which led to me reading up a bit on XML and JSON. I’m about halfway through writing out my decompression process within Java (to make sure it’s working and all that jazz), but figured I’d see if I’m better off long-term using XML/JSON(between these two, JSON seems preferable from my novice opinion).
For what it’s worth, a sample end result of my base compression process for a single npc within a single year would be something like “a1b3c4c5c7d2e1f18g10g11h2i5j7k12k13l15m16n1o2p2q1r5r6r90r20s10t0u4v3w4x2y6z1”, which I would then need to recreate a character from.