Storing prefab pieces - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html) +--- Forum: Development (https://forum.cuberite.org/forum-13.html) +--- Thread: Storing prefab pieces (/thread-1406.html) Pages:
1
2
|
RE: Storing prefab pieces - worktycho - 03-14-2014 Then we need to separate cBlockArea. If we keep the c++ code in source control well have the same problems as we had with bindings, merges dont work or dont match the source. RE: Storing prefab pieces - xoft - 03-14-2014 I don't expect the process to be that much automated for this to be a problem. It'll be more like this: 1. The export tool generates a piece of C++ code 2. The dev pastes the code in the appropriate source file 3. The dev adds additional meta-information to the code - such as the connections, available rotations etc. 4. The file gets checked into git. This shouldn't produce too many merge conflicts, unless we fully automate that process, and even that it can be automated to behave reasonably - sorting the individual prefabs by their DB IDs will provide a reasonable order in the code. Also, since the Gallery server is running on my computer, I don't expect anyone else to be actually doing any modifications to those sources RE: Storing prefab pieces - worktycho - 03-14-2014 I don't know about none else doing modifications. I think this is exactly the sort of thing where people might want to add additional buildings to villages on there builds. RE: Storing prefab pieces - xoft - 03-14-2014 If we have a fixed part that's compiled into the executable and a variable part that gets loaded from a folder full of .schematic files, then no-one else needs to modify the sources. And even if we didn't have the variable part, there's very little reason to modify the sources without sharing the modifications back, which still works well. Remember, it's not that the generator will overwrite the entire file, no. Rather, the generator outputs C++ code that the developer still neds to copy & paste into the actual C++ source file, while adding metadata to it in the process. RE: Storing prefab pieces - worktycho - 03-14-2014 It might work. But I'll continue with my decoupling project after I've finished on IPv6 and see if I can get cBlockArea so it can be run separately. RE: Storing prefab pieces - xoft - 03-14-2014 It might just be easier to write a LuaRocks library that implements the .schematic file access. Also the Lua community might appreciate that more. RE: Storing prefab pieces - worktycho - 03-14-2014 Yes but decoupling our code has other advantages like reducing compile time and separating the generator. Also if I built a luaRocks library wed then need to add luaRocks as a build time dependency. |