Hi guys,
A while ago i had a suggestion for the option to export/import global variables into a spreadsheet for easier editing. Jean and Djaydino were appaled by the number of global variables i use at the moment (more than 800). For me, it was the most logical way to store data since i could access it from anywhere in the project. I was a beginner and i felt that using local variables is too limiting, especially when time comes to tweak things like attack or health points of certain enemies for example. Downside to that approach (besides security and naming), as i noted further down the road, is the impossibility to manipulate it in a more meaningful way than variable by variable in a closed Playmaker environment. Besides that, local variables that don't draw data from a data source are easy to mess up and hard to debug sometimes.
In terms of programming, i'm currently in the phase of knowing more each day, but aware that i actually have more and more to learn. As a method of learning, i decompiled a lot of stuff made in Unity by opening .dll files with Resharper. I noticed that majority of games use JSON for data storing (with XML as the second most used format). I also bought Easy Save as a very praised solution which uses neither XML nor JSON, but claims to be faster than both (tho i don't care about the fast part, easy got my attentiom) but i don't know how easy is to edit those files since they are in their own enclosed binary format. They have their own editor, but that seems as handy as editing 800 globals in Playmaker (not handy at all
).
Why am i asking this now? I'm starting to bump into limitations. The way i work has 0 reusability and making things interesting and with variety is starting to take too much time copying and pasting the same things over and over to get a sense of controlled randomness.
The game i'm working on is an endless shmup and i want to be able to store everything and just call it as needed.
I want to create an enemy that will draw an image, flying pattern, shooting pattern, hp, attack points, armor type, bezier path points and everything else from a data structure in the format that is easy to store, read and edit. Furthermore, i want to be able to easily make subsets and combinations of data. As far as i have seen, for something like that i need multidimensional arrays (probably) and JSON seems the best suited for something like that.
One last thing i need is the advice on most painless way to refactor the existing FSM's and stored global and local variables (exporting and rearranging to empty data structures).
Any advice is more than welcome. I attached a dummy basic data structure of how enemy objects i imagine to work like, it's basically like deriving classes and adding methods.