richardbiely / Voxelmetric

An efficient voxel framework for Unity3d

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using SerializedObject to define new block types

Hertzole opened this issue · comments

Hello

I've been eyeballing this project for a bit and been having a tinker around with it and the more I used it, the more I started to dislike the current JSON setup for defining new block types and layers. To me, it feels "dirty" or something. It feels like it's not correct and the use of the 'Resources' folder really turns me off. It's weird but I can't get used to it.

So why not actually implement Unity related things to make it work better in Unity, like ScriptableObject? I know it would be better if it could work anywhere with JSON, but when you're working in Unity, why not make it fit in with the workflow?

I've personally attempted this a few time in a fork of this project but I am overwhelmed by all the things I need to change, but I'll still continue to try to convert it.

Now, if you think I'm very wrong and crazy about all of this, please do convince me why JSON is the way to go! This is just a weird issue I have with this.

I do not think you are crazy nor wrong :) You just have a different view and that is welcome.

There are multiple reasons why I kept JSON alive for this project. First of all, it has already been there in the original Voxelmetric repository which meant less work for me. However, this in itself would hardly be a worthy argument.
The main reason to keep it there is I do not want this project be dependend on Unity (eventually). I would like to move the core to a library and have it usable everywhere be it Unity or some custom C# project. I find JSON ideal for this purpose.

However, you have a good point there with your proposal. Which brings me to my second point. This Voxelmetric core I talk about would have another layer that would be environment specific. For example, when using Unity3D there would be custom UI available along with ScriptableObject backend which could then be exported to JSON. The same goes for Unreal or any other engine. Having it this way will allow you to use your settings among multiple environments without breaking a sweat.

Unfortunatelly, I can not find enough time to realize this vision short term so either someone will have to do it for me or you will have to wait until I get to it.

commented

Don't mind the json files myself, the unity system is pretty anti modder friendly to say the least. Even 7 days to die took a better approach with putting ALOT of the games settings and configs in external xml files, shame it wasn't json.

"For example, when using Unity3D there would be custom UI available along with ScriptableObject backend which could then be exported to JSON"

...that I'm fine with, any custom UI that does the read/writing to json files is useful.

You checked out VoxelTurf? What he's done with that on his own is pretty impressive. Just wish there was an engine more fully featured out like that available for Unity.. I'm more tooling gameplay design guy doing the engine stuff just isn't my thing ...So when do you think you will have time get back to this project?.... and how much would one have to pay you to incentivize more progress on it, I think you mentioned before about licensing it is that still the plan?

Since I last posted this, I've taken a real thinker about my project and adding this to it and I realized it wouldn't really work out, so I'll basically have to write my own. But I would like to comment on what you both said.

As XeonG mentioned, the Unity system isn't modder friendly, which could be a huge turn-off for a lot of people, and I do see the massive advantage of using JSON because of that. Personally, I don't need it.
And a system that allows you to work in the engine and export it as JSON sounds like a really terrific idea! That would be a perfect balance between not wanting to use JSON and using JSON, in my opinion.

So I guess I'll give in to JSON with this project.

Now, for something a bit different:
As I mentioned, I probably have to write my own engine to fit my needs, and because of that, I would also like to ask one thing: What makes this engine so gosh darn fast? It loads creates, builds and optimizes chunks SOO fast! Could you give me a lead/hint of where to look for that kind of speed?

It's faster than most fellow Unity3D voxel frameworks because it's fully and smartly multithreaded. There's still a long way to go to make it really fast, though ;)