by MirceaKitsune » Sat May 21, 2011 23:06
Hello everyone. I've been trying out Minetest for a while. Just tried the latest version in the repository now, and wow! It's advancing fast, even if it still has a long way to go. Congratulations to celeron55 for the splendid work he's doing! :D
Anyway, I wanted to start off with a small suggestion. I mentioned this on IRC a while back, but here it should be easier to discuss. I heard about the upcoming scripting support, and that's very good! But I was thinking about something else that would be nice, and doesn't seem to have been done yet (not sure if it's planned, but still asking).
Could each and every object in Minetest (including natural materials / blocks and all items) be turned into scripts, and not hard coded any more? So basically, the Minetest code does not contain any information about any item itself, but just properties that can be used (what that item is and how it works). Then in a script file, each object is defined with a name, texture, and a property of what it is and how it works.
Here's an example: To make the stone rockpick, you would only create a texture for it, then something like this in a script file:
stone_rockpick
{
name: Stone_Rockpick
texture: data\stone_rockpick.png
type: tool #is an item you hold and use
crafted_with: a-plank-here a-stick-there bla-bla-bla #position of each item for crafting pattern
duration: 10 #lets say each dig reduces by 1, so you can dig 10 times with this
improvement: mining_stone 1.5 #says that while holding this tool, you mine stone half a time faster
}
Just a random example (in a random scripting language that came to mind) to illustrate what I mean. This could make Minetest VERY flexible and easy to edit in all ways, without having to change any code. One could add new tools very easily, remove tools they don't care about, and do anything they want.
Same could be done with everything... even blocks the world is generated with. You would define within the script if that block should be used by the world generator, and you could even invent new materials, stuff like alien trees (or whatever comes to mind) and make new worlds that way, without having to change any code.
I believe this would be really cool. So I just wanted to propose it here, since I wasn't sure if turning every item and object into scripts is planned with the scripting support. Hope it will happen :)