Mirrored as part of a study of Minetest events of 2010 to 2019 and people involved, and in connection with a related book, events in 2017 to 2018, in particular, conferring upon host legal rights related to Fair Use.

Archive for the ‘Minetest’ Category

Minetest source repository split

Monday, March 26th, 2012

Package maintainers ahoy!

I have split the Minetest source repository in two parts:
https://github.com/celeron55/minetest
https://github.com/celeron55/minetest_game

This is to allow working more freely on the game content, which involves adding and removing and tuning binary blobs. The minetest_game repository will be periodically cleaned as it’s history grows too much in size.

The minetest repository will stay the same as before, except that it will no more contain the full game. It contains the current game content renamed as “The minimal development test”, gameid=minimal, which will be cleaned over time and extended to minimally test new engine features as they are developed.

Minetest documentation updated

Thursday, March 22nd, 2012

Just took the time to update the Modding API reference and the
Map format specification of Minetest.

The map format specification had been for a long time quite out-of-date and incomplete. However, now it should allow anyone to read and write Minetest worlds without ever seeing the source code.

Here are links to the same files that will be updated in the future.

Minetest MinGW instability finally fixed. True story.

Thursday, March 22nd, 2012

Minetest has never worked reliably when built on MinGW, causing very odd memory corruption in under a minute, for which, even while having been investigated multiple times, a fix was never found.

Well, now there is a fix.

Minetest was converting strings to floats using std::istringstream. With results like these:
http://paste.dy.fi/yeY http://paste.dy.fi/ybc http://paste.dy.fi/yGZ http://paste.dy.fi/wDX http://paste.dy.fi/whn http://paste.dy.fi/Gtt http://paste.dy.fi/fKk http://paste.dy.fi/yeY http://paste.dy.fi/ybc http://paste.dy.fi/yGZ http://paste.dy.fi/fKk

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 5572.0x11b0]
0x77c3330c in msvcrt!__argc () from C:\WINDOWS\system32\msvcrt.dll

What you are seeing is basically segfaults all over the place, in Windows’ DLLs and whatnot. And…

Well, yesterday, it took me six hours of backporting patches to build old versions of Minetest under MinGW, randomly coming up with ideas, recalling past investigations and trying out things.

I found the very early commit (combined with the next one that fixes it to be buildable) (it’s actually the 4th one ever committed) that introduced the problem. Minetest has always been built using MSVC on Windows, thus it had gone unnoticed for like forever. It’s a relatively large (2800 lines of diff) but innocious-looking commit.

The commits add the VoxelManipulator class, they implement the BlockEmergeQueue and add an in-case-of-bugs triggering of the EmergeThread. The first one is not used yet. Disabling the triggering doesn’t get rid of the bug.

After trying a number of things, nothing helped.

I started to wonder if it was a MinGW incompatibility with the distributed Irrlicht.dll. Wasn’t.

…Then the multiple occurrences of Settings::getFloat in the backtraces finally catched my eye. getFloat looked like this:

    float getFloat(std::string name)
    {
        float f;
        std::istringstream vis(get(name));
        vis>>f;
        return f;
    }

It felt complete nonsense, but I replaced the contents with some dummy code and once again started testing the thing… to find out that it did not fail.

By testing a number of things, I found out that by replacing the istringstream stuff with a simple atof() fixed the problem.

Needless to say, the same modification could be applied to the latest github master version, in a slightly different place, and it worked.

So, to fix this:

inline float mystof(std::string s)
{
    float f;
    std::istringstream ss(s);
    ss>>f;
    return f;
}

You just:

inline float mystof(std::string s)
{
    return atof(s.c_str());
}

I think this might have something to do with that function being called by threaded code.

Maybe the MinGW guys should get to know this. Dunno; I won’t bother poking them though. If somebody wants to, feel free to.

Dev snapshot build 0.4.dev-20120320

Tuesday, March 20th, 2012

This fixes the huge directory structure of the previous version to be more manageable (in addition to a few other small things).

Additional mods now go in
mods/mesetint/
and that directory is included in the package. (more info)

Somebody asked about texture packs – they aren’t properly supported currently, but you can try to put the textures (without any mod directories or anything) in textures/base/pack/ and see what happens. Or use the texture_path setting in minetest.conf.

Aand to continue listing of the modding API changes: One of the other important things that has changed is that all LuaEntities have a HP value accessible by set_hp and get_hp, and the maximum hp is set in the definition as the value hp_max. Also entities have “armor groups”. See the “experimental:dummyball” in experimental/init.lua for an implementation example.

Build for Windows:
https://github.com/downloads/celeron55/minetest/minetest-0.4.dev-20120320-win32.zip

Latest commit:
https://github.com/celeron55/minetest/commit/94f1ab4da3296be707f9164d7a2f7cd61e357e12

Dev snapshot build 0.4.dev-20120122-1

Monday, January 23rd, 2012

This is a larger changeset. See this wiki page for information.

Build for Windows:
https://github.com/downloads/celeron55/minetest/minetest-0.4.dev-20120122-1-win32.zip

Latest commit:
https://github.com/celeron55/minetest/commit/cb05a28745ae4f4f6ad6f4b922bc1b465c6287fa