User-friendly data tools for my JRPG

Image result for persona 5

I haven’t done a project blog in regards to tech in like forever. In fact, I haven’t blogged in like forever. HI! So yeah I finished Persona 5 (hence the picture) and it took around 90 hours. And that game is a JRPG. And I am working on a JRPG so see it is kind of relevant right!

So today, I am talking about how I am doing some of my data tools. JRPG are giant houses of numbers. It is like your overpacked loft… but instead of the random crap you have collected, it is numbers. And you want to be able to change these numbers all the time for balancing.

As I said before I built a sort of equivalent CMS system in my game. It is the loosest phrase of “content management system”, but as I said in the previous post, I modelled what I was doing by separating data, etc from my work at MediaTonic, who have a quite frankly world class CMS that is hundreds of times better than others I have used. Like I mentioned previously, I make heavy use of scriptable objects:

For some designers, however, double-clicking on the curve and editing it from the editor can be quite cumbersome. And writing Editor GUI code in Unity is quite frankly out of the question, because it is well… horrible… so I came up with a slightly better solution.

Google sheets. In google sheets you can build your data really nicely, view it in graphs and curves to see progression and can be used for balancing.

I came up with a sheet schema as above and then wrote some a little editor script:

And also a static parsing class to parse the data from a csv file to my game data:


What the editor script does is add this little button to my battle character scriptable objects:

And uses the parsing code to fill out those curves.

Therefore we can use the power of a spreadsheet program to plot our graphs and then load the data in and apply it to our scriptable object.

Neat, huh?



Researching a replacement for dynamic shadows continued…

I am still playing Nier: Automata so you will get a few of these pics for a bit.

A while back, I posted an article about researching a replacement for dynamic shadows.

On projects I have worked on we often default to using dynamic shadows to make stuff look good, but they can kill our performance on mobile. In order to hit the 60 FPS mark (or sometimes even 30) theya re one of the things we turn off. We then replace them with blob shadows, which are OK, but are still not as performant as we may like I found this advanced technique called graphics command buffers and a sample that includes decals in deferred shading. Decals are quite a nice way of creating blob shadows.
I have since knocked up a super quick test bed to see the difference between real time shadows, projectors and decal textures.
Realtime shadows:
And here are there corresponding BASIC stats:
Real time shadows:
Projector Blob Shadows:
Decal blob shadows:
Again, this is only a cursory test, but so far the decal blob shadows are edging out on the number of tri, batches and overall framerate. Of course this is needed to be taken with a pinch of salt and needs to be profiled more in other scenarios, however as a starting point it looks promising.
My next step is to see if I can create real time shadows using render textures and combine it with the decal techinque.
There is a warning here though that at time of writing this technique only supports deferred rendering and not ALL mobile gpus support it. However, I will press on and get a better overview of what hardware is affected, and come up with an alternative for that.

Very Simple Obscuring Object Culling

This little trick is from something that I worked on that involved robots. So I added the Robot from Infinite Warfare (a game which I have, but need to actually finish… like all my other games!). Essentially there was a character that moved around an environment and attacked enemies. The problem was he sometimes got obscured by the environment. As it was a prototype, I made the quickest and dirtiest thing I could and whacked it in.

As the diagram shows above I raycasted from the camer to the player character. If the raycast hits anything marked “Obstacle” or equivalent term the object is deactivated.

This is SUPPPEEERRR basic. There are some cleverer things you can do like do a box cast and seeing how much an object is inside the box cast and fade it out, but if you need to get somehting up and running quickly then this is a quick and dirty implementation.