gdelazzari / tech_api

Minetest common API for technical mods compatibility
3 stars 2 forks source link

Just a question #12

Open ghost opened 4 years ago

ghost commented 4 years ago

Why is this project no longer being developed? Does it have a serious problem? It seems to be better than Technic in operation but does it correct the problem of infinite energy? (example: https://github.com/minetest-mods/technic/issues/439) (I couldn't think of another way to ask, translated by: google translator)

gdelazzari commented 4 years ago

I initially developed this code with the idea of creating a common energy API between Minetest mods, with Technic probably being one of the first ones to use this... I structured everything to make this appear as an API that any mod could use, and while indeed the development was also initially started because Technic needed a better energy system (the main reason was that I wanted to experiment writing one), when I tried porting Technic to it I found some difficulties and lost interest... mainly in terms of ensuring backwards compatibility (for which some kind of converter code to adapt the old world to the new one is probably needed) and because Technic is doing a "trick" that doesn't play well with the API here, which is to swap a node whenever a texture change is needed - for instance when lighting up a furnace or some piece of machinery (IIRC). At the time the swap_node solution seemed to be the only way to change the texture of a node, but things might have changed a lot since years have passed. I don't exactly remember the details of the problems that this caused with the API, but I probably figured it would have required a decent amount of work to make it play nicely (i.e. Technic would have to be almost rewritten - maybe not so bad but the work required wasn't promising indeed).

As far as this project alone is concerned, I guess it's working, in the sense that energy gets transferred, you can create providers/users/storages, etc... and the performance was pretty good if I recall correctly. The interaction model that the API exposes to the mods is probably not the nicest one, it requires the nodes connected to the network to implement a decent chunk of logic regarding energy request, usage, etc... I'm sure there are better solutions, the one implemented is surely a very naive one.

ghost commented 4 years ago

I understand, at first I thought it would be independent of Technic, so it would not be necessary to convert the old one (ideal in a new server), I came to this due to the problem I saw where the players had infinite energy and some random network problems.

S-S-X commented 3 years ago

I came to this due to the problem I saw where the players had infinite energy and some random network problems.

You might be interested that many of these issues were fixed on mt-mods fork: https://github.com/mt-mods/technic mt-mods fork however has diverged enough already that you might not be able to simply revert back to official technic without issues if you wanted to do so for whatever reason. But it brings some cheat mitigation, way better network performance, monitoring tools, most infinite energy problems fixed and other improvements.

Network code was mostly refactored there but this tech_api project would be interesting if it could perform better and without as many hacks around old stuff. Was this API supposed to be sufficient for building power networks that does not depend on actual nodes in world?