Sooo, gonna tackle now the problem of materials in my track editor.
Until now, the circuits were loaded from java files and made from calls to high level methods.
I’m in the process of moving towards loading json files instead, for 2 reasons:
- my high level methods were all based on the idea that the tracks were built sequentially, as in one track before the next, but I wanted the editor to allow crud operations on any track of the circuit
- security… I really don’t like the idea that people would open security holes the size of a continent each time they loaded a downloaded map… and none of my tests with sandboxes pointed towards me having any chances of securing that loading. So it’s another humbling experience, but I’ll have to admit you peeps were right all along :.
But, with java files, the materials could be defined directly in there and the editor would just allow selecting the material for the different tracks. This won’t work with json files.
Now, I have some “ideas” for resolving that:
- using j3M files located in a mod/materials folders but that would probably be expecting too much of my users (if there ever are any )
- having interfaces in my editor to build materials from the ground
- having interfaces in my editor to only modify the most common properties of a set of provided j3m’s
In order to make a better choice, I would like to know:
- what would you peeps think would be a good way to do this?
- where can I find the source of the sdk window that allows modifying/creating materials?
- is it possible to ask the assetmanager for a list of available j3m’s? I think I read that it wasn’t possible, so mostly looking for a confirmation of that. The default provided j3m’s would be located in the assets jar.
- if I create materials from the same j3m file… will they still be considered like one material as far as batching goes? I suspect no, but crossing my fingers haha.
- any data you think might help
Thanks in advance :).
NB: I feel stoupid due to my remarks somewhere else about the complexity of json… nothing complex in there… just an exchange format and some simple libraries to serialize/deserialize.
NB2: I have read: