If you see this text this site will only be partially functional due to JavaScript being disabled!

1641

Heptaveegesimal
Minesveeper

# Day 31 - True Custom Mode

Hallo

Hallo

Hallo

Hallo
Hallo

Death in:
0:05.000

Time:
0:00.000

When I first made the advent calendar, connected edges where kind of hard to deal with.
I did get two suggestions how to make them a bit easier, the one I added was to put numbers next to the edges.
The other one was to add the ability to move the field around, which I didn't add. The problem with it would be that I would have to add it everytime there are connected edges. However this isn't nearly as trivial on a Klein bottle, then there are entities which move based on the location on the board and don't care about the edges. Asymetric shapes on day 24 in combination with a möbius strip, could also cause some problems.
However for today which is just a completely normal torus I have added this option. So you can just use the buttons on the right to move the board around.

Double Mines?
But there are only normal mines?
Yes, today uses a slightly different interpretation of double mines. Here mines always generate in orthogonal pairs of two. Here you can't just have one mine surrounded by safe tiles, but there always has to be mine next to it as well.

In this example tile A has to be a mine.
Why?
Because the mine below it, needs to have mine next to it. To it's left, right and below it however are safe tiles. This means that the other mine has on the tile above it.
Theoretically you could play this day just like any other days. There are however quite a few situations where you can use this knowledge about how the mines were generated to your advantage

During day 11 when the field was a Klein bottle, I also mentioned that there is also a thing called a real projective plane where all side are connected in opposite directions.
But I also mentioned that I would have to drastically change the algorithm for counting neighbours so that it still works in the corners and even then it wouldn't be obvious how to play there.
However there is an easier solution to this problem, I just make sure that there are always mines around the corners, so the flags you see will always be mines.
Don't remove them and click there, there will be mines and if you click right next to them you will also not get a clearing at the beginning.

Ideally you would want to have a disk for a projective plane, then you could define two opposite points on the edge to be the same and connect them that way.
Now if you zoom into edge they will at some point just appear flat and the two opposite edges will be connected in opposite directions. But since this game is a square, the disk gets deformed and 4 points of the edge of the disk turn into corners. Which is where the problem with these comes from.

When Anti Mines where introduced, there were a lot of situations where you need to guess. However this is a version where Anti Mines work better and you aren't forced to guess as much. Here there are only triple mines and Anti Mines, and while a regular mine and a Anti Mine can cancel out, here it would take a triple mine and three Anti Mines which would take up 4 tiles. So if you have only 3 unknown tiles next to a number with the correct amount of mines around it. You know they are all safe since there aren't enough tiles for a triple and three anti mines to cancel out.
And even if all of that fails, you might still be able to get the rat to run over any problematic area.
Also quick reminder this day uses zeros on the ground in the same way as before, where if all 8 tiles are safe the ground is empty, but if there are mines that cancel out to zero there is a zero on the ground.

Wait, there is no unique mechanic to this!
But I need to add something new otherwise this is just a specific day 24 setting.
What should I add, I can't just leave this day like this?

No, let's just leave it like this and I am just going to hope that there are still some people here, who have not yet played with this setting? That's right no other mechanic for today.
This day is normal.
I am normal.
Everything will be fine.

When I made the Zen garden, I made it by first generating a regular game and then applying some modifications to the board.
But the Zen garden was the only time I used this for a serious mechanic.
Today I will use this in another way.
Because every number has been replaced by that number modulo 3 (Remainder when dividing by 3). So if there was a 4 it would have turned into a 1.
And if you see a 2 that could have been a 2, 5 or 8.
This day also uses the 0, in the same way it is used with anti mines, so if there are no mines around you will see an empty tile, but if there are 3 or 6 around that cancel out to 0, then there will be a 0 on the ground.
Also this game is on a Torus again, where you will again be able to navigate on it like you could on day 25.

You might mave noticed that each number has a specific color and will always appear in that color.
However today these are two different mechanics. The numbers tell you how many mines there are on the 4 orthogonal neighbours of a tile. While the colors in the meantime correspond to the numbers of mines on the 4 diagonal tiles. This day also uses zero's, just not the regular brown zero, because a tile that has no orthogonal or diagonal mines around it will just appear as empty ground.
So today a green two, means two out of four diagonal and two out of four orthogonal tiles contain mines. A brown three means there are three mines on the orthogonal tiles and all diagonal tiles are safe.
And since this gives you way more information then a number on a regular day. There are 120 mines on this day.

Also there was a low chance for recolored numbers to appear on day 28, there they were just a regular number with the color changed.
Why?
I just thought it would be funny to do this and see if it confuses anyone.

True custom mode?
But there isn't any way to customize this, like there was on day 24.
This is just a regular day 2!

Yes, looking at it from that perspective, you are correct.
However the problem with this advent calendar + bonus days, is that there are a lot more ways in which you could customize it, even without any major changes. There were only ever 3 entities used in this, the sheep, the rat and the cheese although the last two would always show up in combination. However the current code would allow for entities with an arbitrary move pattern whenever you make a click. So this would require a tiny bit of custom programming. There are also more ways for alternative generators, you could come up with in a similar way to the one used for day 26. But again this would require a bit of custom programming. Maybe you would also have ideas for something similar like the Zen Garden or the color changes yesterday, which could be added in with not too much effort. But again custom programming.
So if you want to do any of that here is a zip-file with containing all the relevant files to this project, that you can just download without having to figure out all the individual files, you would otherwise have to manually download.

And now to a quick description, of how you can easily mess around with the settings for this day.
For this I will assume that you know some basics about JavaScript, or are able to figure a few things about it out / look some stuff up.
To mess with this day you want to edit "bonus-days.html". In there you will want to find the line "var Days = [" this is the array of all settings for the individual days. In there you can change the last element to mess with the settings for this day.
Each setting is an object consisting of the following properties:

 sx / sy Size of the board in x and y direction. mineMax The maximum number of mines below one tile. This should only have the values 1, 2 or 3. amount Array containing the number of regular, double and triple mines on the board, should have the length mineMax. neg If provided, describes the amount of anti-mines on the board. shape Describes the shape in which mines are counted, check out how other shapes are structured in the code above. wrap Describes how the edges are connected, is an array of two elements the first for left/right the second for up/down. Where 0 is no connection, 1 is a normal connection and 2 is a connection in opposite directions. entities Array of all entities, description can be found below. deathTimer Milliseconds after which you die if don't open another save tile. selFnct Function that gets called as soon as the day is selected or after the reset button is pressed. This function does not take any parameters. preGenFnct Function that gets called before the mines are generated, it takes the x and y coordinates of where the player has dug up the first tile as parameters. altGenFnct If provided this function will be called instead of the regular generator, it takes the x and y coordinates of where the player has dug up the first tile as parameters. postGenFnct This function will get called after all mines have been generated, it takes the x and y coordinates of where the player has dug up the first tile as parameters.

Only the properties in black are mandatory, the ones in red do not need to be specified.
If you mess with the number the generation of mines, you will need to make sure that at the end the correct amount of mines, have been generated. Otherwise the detection of when the game has been completed might not work properly.
Should you want to create custom entities, they again are objects containing the following properties:

img / x / y They will be dealt with later you can just set them to: img:null, x:0, y:0
src Link to the image which will be used for the entity / just the image name if you put it in the same directory.
ai Object containing the movement patterns for the entity. Each of these functions takes three parameters first is the entity itself and the other two are the coordinates, where a specific click event has occurred. You need the following properties to fully describe the movement of an entity :

 init Gets called when the player makes the first click and should ideally set the initial position of the entity. dig Gets called when the player digs up a tile. flag Gets called whenever the player changes the amount of flags on a tile. voidClickL Called when the player left clicks a tile that has been dug up. voidClickR Called when the player right clicks a tile that has been dug up.

If you don't want to use a certain function set it to null instead.

And now to some specific features:
If you want to use the Zen Garden decorations, set postGenFnct to the string "zenReplace" it will then be automatically replaced with the function for generating the Zen Garden decorations, in this case however you will also have to add the property zenDensity to the setting, this describes how many attempts to place a Zen Garden decoration are made. Setting it to 0.25 means that on a 20 by 20 board there will be 100 attempts to replace a number with a Zen Garden tile.
If you want to mess with the controls you can change the variable confused, if it is false all controls are normal, when it is true all controls get inverted.

Now you might want to share some settings you create with this.
To do this there are two different ways.
If you can fit your entire setting into a Generator Object, meaning you have just been using the stuff explained above. You can easily just tell people to go to the bonus days open the developer console and enter a command like:
Days[6] = {sx:20, . . . };
To replace the setting for this day with your code.

However should that still not be enough and you want to do something where you need to change more of the code, but not the point where you where you would just be making your own version. Then inside the .zip you can download there also is a folder called "reupload" in there you can find "index.html" this is a page containing only the basics you need to play one individual setting, plus a placeholder description and a link to the original. To change the setting you can just change the line saying:
var Generator = {sx: 20, . . . };
You may now re upload the files from this directory however you like in any noncommercial way, as long as the link to the heptaveegesimal.com, where you got these files from is kept in.

So to conclude this extended advent calendar, I'd like to say that it was really fun to work on and it was also nice to see that there were quite a few people to play it.
So will there be more?
Maybe, there definitely won't be another extension tomorrow, however I still have some Minesveeper ideas I'd like to try. So if you want to get informed about them, there still is a Discord Server for this.
If you are one of the people I know in person:
Dann werde ich das ganze wahrscheinlich wieder in alle möglichen Gruppen schicken oder Zettel austeilen, wenn es eine umfangreichere Erweiterung hiervon gibt.
You could also just check here once every three to four months.
And if none of these are an option for you but you still want to know if there is a major update, then uhhh...
You could send an E-Mail to the address on the about page. I don't have any sort of mailing list that one could automatically join and leave. So even if I set up an extra address for this it would ultimately still just be me, treating it like such a list. So should there be a major update and also anyone who has sent me such an E-Mail, I will reply with a link to the update.

Thanks for playing!

# The Bonus Days

When I started working on the advent calendar, I kind of expected it to turn into a thing where a few people play the first few days and then everyone forgets about it. However it seem like there are quite a few people who have been playing this.

So here are the bonus days to the advent calender, which is just an extension of it until the end of the year.
Otherwise everything works just as before.
There is a mobile version of this again.
And also there still is the Discord Server for this.

Have fun!