New game: Hexxagon

Enjoyed loading this up and playing vs myself for the time being. I’m curious to explore different board arrangements, see what is working well for others, and also have a sense for suggested # of Blinks for easy to competitive play. Looking forward to playing some good vs games.

Let me know if you have any suggestions for the game. I now have the space to implement new things.

Concerning board arrangement, there is one invariant that should ideally be kept which is: the distance between 2 pieces from different players must be at least 5. Ideally, 6. The reason is a player can move to a Blink up to 2 Blinks away so if you have 5 spaces, it can not take the other piece immediately in a single move. If you have a distance of 5, the other player then would also need to move 2 pieces away to take that piece so there is a strategic decision to be made. With this in mind, I am guessing you can set up an interesting game with a triangular board with side 5 (so, 15 blinks in total) and 3 players. You most likely can rearrange the same 15 blinks to make the game more suitable for 2 players instead.

But the more, the merrier (and this is why I ordered 60 blinks :slight_smile: ).

2 Likes

BTW, if you downloaded and tried a relatively recent version of the game (one that has the message_tracker.* files), there is a bug that would make the game get stuck depending on the order of things happening. One case was it getting stuck after you tried to finish setup but had an invalid board state. Then you fixed it and moved on. It would not be possible to select a target after this.

This has been fixed but I did not pushed the code yet. Will do it later today.

Heads up that the game is now on its self-contained directory. Instead of using sysmlinks, it now uses git submodules which will work on Windows (no manual file copying required). To clone it and all dependencies just run:

git clone --recurse-submodules https://github.com/brunoga/blinks-hexxagon hexxagon

The command above will clone the repository and dependencies in a directory named hexxagon. This is required by Arduino IDE as it expects the sketch and directory to have the same name.

@bigjosh I do not know if you ended up trying it or not the next time after you hit the symlinks issue, but feel free to try it again. :slight_smile:

I am at the storage limit again, but I managed to squeeze in a nicer takeover animation:

When a piece is about to take over another one, the one being taken over will show a “lightning” animation that starts at the face connected to the attacking Blink and ends randomly at one of the 3 faces on the opposite side (this happens very fast and is supposed to look like lightning). It is specially nice because it happens at the same time in all affected Blinks.

Now trying to clean this up and get some space back just in case I decide to do something else and need it.

But, yes… Blinks with, say, 10 Kb of storage would be REALLY nice.

2 Likes

I changed my mind and implemented self-destruct. Triple-clicking a player Blink during the select origin state starts the self-destruction sequence.

The Blink self-destructing and all player Blinks around it are “destroyed” (they become empty Blinks). Even Blinks from the same player.

I guess now the game is really done. It is rock-solid and there is nothing else I wanted to do. 97% storage usage in the end (but I could still save some bytes if I really wanted to, but it is not needed anymore so I will leave it as that).

If any of you checks it out, let me know what you think.

2 Likes

I am now working on the associated material for this game. Here is my first attempt at an introduction story:

In a distant future in a different planet where overpopulation is the biggest problem an entire civilization is facing, land became the most valuable resource (specially fertile land) and having access to it is a matter of life or death.

Nations defend their land with all they got but the need for expansion is pressing all of them and a major worldwide war was about to become inevitable when a major earthquake hit in the middle of a major ocean and this caused underwater volcanoes to erupt and form a huge new mass of land.

This was just too tempting and certainly beat the prospect of having to fight other nations at your border. Armies were sent to take hold of the new land and the inevitable worldwide war was now, at least for the moment, happening on a remote land in the middle of nowhere.

You are tasked with being the main strategist for your nation in this effort. As such, you will be controlling the most advanced battle equipment ever devised, capable of not only fighting enemy armies but also being able to terraform and defend any conquered land and replicate itself to continue expansion.

Even with this advanced equipment, your task will not be easy. At every turn you will have to make difficult decisions.

Godspeed.

Any suggestions are welcome.

1 Like

Hi @BGA

Love the game and want to have it in one of my Blanks!

But I’m a little lost about the custom blinklib, also never tried a game with more than one .ino file, can you do a short tutorial on how to install the game?

I have 24 blinks, what do you think is the best arangement for 24?

BTW the introduction story is awesome, I think you should add it in a Readme in github, showing also the title of the game, sugested arrangements and instructions, that way can be more friendly to everybody to try your awesome game.

Bye!

It is easier than it looks actually, but yes, it requires going through some setup. I will assume you are using the Arduino IDE for development as it is most likely the most common scenario (if you are not, you probably know how to do things on your IDE).

1 - Install the custom Blinklib:

This is the same as installing the normal Blinklib. You just need to open the Arduino IDE, go to File -> Preferences, click on the small window icon to the right side of Additional Boards Manager URLs and add this in a line by itself:

https://github.com/brunoga/blinklib/releases/latest/download/package_bga_blinklib_index.json

If you already have the original Blinklib board manager URL there, it is ok to keep both (and then you can alternate between the 2 Blinklibs)

2 - Clone the Hexxagon repository:

This is also almost as usual but I am making use of git submodules, so you need an extra parameter to clone the repository:

git clone --recurse-submodules https://github.com/brunoga/blinks-hexxagon hexxagon

After this, it is business as usual (being made of multiple files will not change anything). In Arduino IDE, select File -> Open and select the hexxagon directory. Instead of a single file being opened, several tabs with all the files will show up.

3 - Make sure you are using the Custom Blinklib:

If you are not, compilation will fail so it will be pretty obvious. Go to Tools -> Move38 -> Blink (Custom Blinklib) (note that you you also have the normal Blinklib installed, there will be 2 Move38 entries. Pick the one that has Blink (Custom Blinklib)).

That is it. Compiling/Uploading is the same process you are used to.

Let me know if you have any questions.

And yes, I will add the intro and other stuff to the repository. I have been working on and off on this mostly due to lack of incentive (not many people trying it out) so posts like your help. :slight_smile:

Thanks.

Forgot to mention that a few replies above I posted the instructions (it is not mentioned there but now you can also self-destruct a Blink in your turn. Just triple-click it when selecting the origin).

I do not have 24 Blinks right now to try, but here is a rule of thumb: When setting the starting positions, Blinks from different players must have at least 3 Blinks between them. Any arrangement that keeps this invariant should work. Keeping it symmetrical is also important for player balance. This is, for example, why I use this arrangement for 12 Blinks (x are player blinks and * are empty Blinks)

x**
 ***
  ***
   **x

It is not very obvious by looking at it here, but there are actually 4 Blinks between the 2 player Blinks.

Hi @BGA

Im answering you all the points you described me:

1 - I asume after doing this i have to search the board and install it. DONE :green_circle:

2 - I’m new on this, i just downloaded the zip of your full blink GIT, and inside hexagon, i’ve replaced the file shortcuts with the originals. Is just ok with that?

3 - DONE But compiling im getting 90% of space used, and i just read that the game is at 97%, maybe i’m missing something? Compiling works perfectly.

Extra question: Should i have the custom blinklib in the other blinks? or if i share the code holding down with a bunch of blinks is ok?
Another Extra question: My game The Hunt go from 88% to 79% with your blinklib, is safe to use it while keeping all the functions of the code?

About updating the Github, yes please, do it!

I will try with 24 blinks and i will give you some feedback :grinning:

Yep. Sorry. Forgot to mention that.

Unfortunately no as the Github zip download does not in clude the submodules. But I am wondering where you got it from as the most current code should not have any symlinks. Here is the correct URL (it changed at some point, sorry):

Here is a zip with everything needed (already includes submodules): https://drive.google.com/file/d/1M_tSGQzaIufsMWH8HYSuYPzKpvBzcY-x/view?usp=sharing

You definitely got the code from the wrong place. Sorry, it was my fault. That code is old. :slight_smile:

The Blinklib is built into the game. It is not Blink specific. So, yes, just sharing the game as usual with the other Blinks will work.

Yep. It is.

Let me know how it goes.

Ok i’m going to write everything step by step just in case this helps you:

Don’t know what are Github submodules, but now with the zip you shared me the code is at 97% storage. DONE! :green_circle:

BTW your code looks awesome, i dont understand anything, my code is like a code from a 5yo (i’m learning) and yours is just awesome! :eight_pointed_black_star:

About the Blinklib, i will keep the differences in mind just in case I need to implement some of your improvements (for me the best is the space optimization and using 256 vs 64 for comunication)

Now let’s talk about the game:
In one word, AWESOME. It works perfect.

Just some notes:

  • Alone Blink pulsing White is not working for me. (Maybe you removed it to save space?)
  • As a sugestion for the setup color, is orange at low bright and it can be hard to see the player colours, also is the same color as the “board” state that is also orange, maybe is better in a light white? Only for the setup, not for the gameplay, for the gamplay orange looks cool :upside_down_face:
  • The “pulse” on your player tiles is not at the same time, maybe is better having it sinchronized to not have a lot of crazy lights? With a big board can be crazy all the flashes (maybe restarting the timmer at the same time?)
  • I just found a bug that afects to the reset function: If you deatatch a blink in “game state” with no player (orange) and reset the board, that blink become unusable until you set the board, chose players and start the game (once he is on the same level of “orange” of the rest, he start responding. (you can also restart it alone and fix it).

Maybe is confusing but I can record a video about what i’m talking about the reset function if you need it.

Now the BIG thing, a propper setup for 24 blinks :thinking:
This is my weird sugestion, leaving 3 attack bridges and space behind the initial position to be coquered by the other player:

Final opinion:

:keycap_ten:

This game will be on one of my blanks forever, i LOVE it. Please, make a sticker for it, i want to print it!

Not kidding, i want a better sticker!

Offtopic, this game remembers me a game that I love and have always installed on all my phones:

I’m pretty sure you have the hability to port this game to blinks game system, it shares some mechanics with Hexxagon, if you do it, you’re my hero.

Bye!

4 Likes

Thanks, it is definitely helpful as I can simply point other people to here when/if needed. :slight_smile:

Sounds right now. Thanks for your patience on figuring it out. :slight_smile: And just in case you might want to know, git submodules let you use code from other projects without copying it to your project. I use this mainly because the game makes use of my blinks-broadcast code which is developed separatelly.

LOL! Thanks. It should be easy to follow when you wrap your head around the multiple files thing. Each .cpp file is implementing a specific part of the code (for example: blink_state.cpp implements keeping track of the individual Blink state while game_state.cpp keeps track of the overall game state. The *.h files are just a way to let one part (file) of the code know what is implemented in a different file. It is a C thing).

You are not alone. I expect 90% of the Blink games around there will get the most benefit out of these 2 things. I expect games will eventually start using datagrams more frequently as they are significantly more robust in the custom Blinklib (and my broadcast code makes Blinks communication using datagrams easier).

Thanks. I am suspect to say this but I agree. I keep playing it with my wife and older kid over and over without getting tired of it. And I currently only have 12 Blinks. :slight_smile:

Yep. I removed it due to space. It had 0 gameplay function so it got to the chopping block. :slight_smile:

I am actually waiting on the Kickstarter Blinks to arrive and will tweak the colors as things look very different on the new Blinks when compared to ones I have. I will keep your suggestion in mind (it makes perfect sense).

I can improve the situation, yes. Currently it seems a bit crazy because I am reusing the same timer for a lot of stuff. But I have memory to spare so I can actually use different timers. I will do it (thanks for the suggestion). But keep in mind they will not be fully synchronized (it is not impossible to do that, but it is also not a trivial problem and I do not have the storage space to do it), but they will not be all over the place as they are now.

That is a known issue. I could easily fix it by advertising the current state on every face and switching any connected Blinks to that state but, again… Storage space… :frowning: The solution is exactly what you mentioned.: Either reset the Blink before connecting or reset all Blinks after connecting.

I loved your setup! Thanks for sharing. I am just not sure about the space behind the Blink. I assume in most games what would happen is that the game progresses in the direction of other planes and the space in the back would be inaccessible to any other player. I guess play testing is the better way to check in any case.

I can only assume the scale is from 0 to 100 at least. :wink: Thanks. I am glad you liked it.

I am actually trying to find someone to make the graphics (I am actually willing to pay for it so if you known someone that would do something like that, let me know).

It appears porting games to Blinks is what I do now. :slight_smile: I will look into it after I finish my current project. :slight_smile:

Here again with more answers:

I tried @Freddicus game, just hitting upload without checking anything, and the custom blinklib was selected, it crashed on compiling (while compiling on the normal blinklib was working):
I received this warning:
'MAKECOLOR_5BIT_RGB' was not declared in this scope
Maybe this can help you to improve your custom blinklib.

You’re right, they are different, I hope you can have them soon and see what i’m talking about the colors, is hard to see specialy with light in the room.

I know that a perfect sync takes a lot of space, but a normal sync with timers should do the trick and help the game with less flashes. (Is just a suggestion! If you like it, keep it!)

Something you can definitely live with :upside_down_face:

Let me clarify. 10 ouf of 10. :stuck_out_tongue_closed_eyes:

I’m nor definitelly an expert in that, but depend what you need/want, maybe I can help you with that, and if I can’t, I know some people (real graphic designers, not an amateur like me) who can help you. Just send me a message and maybe we can do something.

I’m sure you can recycle a lot of things from this game and do that port really fast, blinks have 6 faces so im sure this game can work pretty well! Give it a try to the mobile version so you can see what I’m talking about.

1 Like

Ah, yes. I removed that because somehow I thought it was not part of the public API (but it obviously is as it is in blinklib.h). I will add it back. Thanks for the heads up.

The biggest issue might be how to represent the strength of each Blink. Up to 6 the obvious way would be to light up a led per point but I assume the strength can be higher than 6 in the game so a way to represent it that is easy to read would be required. I will have to think about it.

Sure, but the game is intended to be played in a BIG grid (for the games i normally play on the phone you will need 100 blinks!)
I think a “light” version fillin power up to 6, in a grid with 15-20 blinks should be enough for a funny game for 2-3 players) using faces for power (up to 6) OFF for the grid, one color per player, and even you can implement what I did in The Hunt, if is your turn, you can only see where are your tiles and one ahead, so the rest of the board is black!!

That can be an awesome implementation :grinning:

Behold the Hexxagon sticker!

All credit goes to @Confus3d. If it was not for him, the sticker would be mostly stick-figures (which is all I can draw). :slight_smile:

4 Likes

For anyone that was interested in Hexxagon but did not want to mess with the Custom Blinklib:

https://www.bug-br.org.br/blinks-hexxagon.zip

This package contains a pre-compiled Hexxagon game and a script to upload it to a Blink.

It should work out of the box on Mac/Linux as long as avrdude is in your path.

For Windows, you can manually enter the avrdude command that is on the script file.

4 Likes