New Game: The Hunt

Hi everyone!

I´m new into the forum. I´m following actively the Move38 campaign on Kickstarter.
I´ve always wanted to learn how to code and with Blinks i just said: Is now or never!

I´ve been working on a game idea, a Strategy Game based on capture the enemy and detect enemy position.
SHORT DESCRIPTION:
MONSTER have to capture the CITIZEN.
CITIZEN must survive 25 rounds without being captured.
BOTH players can move to a new spot or spend the turn checking the surroundings.

Is my very first attempt in coding and I learned how Blinks work in just 2 days, so please be nice =D
Probably is something wrong with the code but I ´don´t have Blinks to try it, so please if someone can upload it to a Blink and, if it works, share a video, can be great!

Here is the code and instructions of how the game should work:

I´m worried about Comunications part, cause I´m not sure if all BITS are correctly asigned.

Thanks!

7 Likes

Update:

-Updated graphics with random face glows and changed colour to simulate a cornfield.
-Updated Detection of surrounding tiles.
-Updated Github with a small story/comic of the game.

Still not sure if the game works so if someone can try it for me that would be great!

Nice playing!

1 Like

Excited to load this up and play through, will post thoughts once I’ve had a chance. Enjoy the 4-frame comic a lot, think a lot of Blinks games could benefit from similar :slight_smile:

1 Like

Thanks for trying it!
As I said I’m not used to programing so maybe there is something wrong with the code. I checked it a lot of times so I hope everything is ok…
But you know, to check it you have to try it, and I don’t have blinks yet! I have to wait until August to have them! =D
Just let me know if it works (or if it crashes and when it crashes) so I can keep working on it!

Thanks Jonathan!

I loaded it up, read through the instructions, and it appears that the latest version in the repository does not reveal the Farmer or Monster when the Key is attached.

I am not sure if this is user error, since the one part of the game I am a little uncertain about is the start of the game. I imagine that for the first two moves:

  1. The Farmer, places the Green Key tile against the Cornfield and then presses the tile on which to enter the Cornfield.
  2. The Monster, places the Red Key tile against the Cornfield and then presses the tile on which to enter the Cornfield.

I imagine from there the following takes place:
Once both players are on the Cornfield, the Key should reveal the players location and allow them to make one of two possible actions

  1. move to the adjacent tile pressed, OR
  2. check to see if a neighbor is the other

In my attempt it looks like the Key is registering an action when none is taken since the Key turns Blue instantly when attached. I imagine this is the part that needs working through, since I assume the desire is to have the entire Cornfield reveal the game state and wait for the player’s move or the key to be removed.

A very impressive start.

p.s. a few conveniences you’ll appreciate:

  1. isAlone() might make the code a little more legible
  2. if there are some more comments even just ones above the functions to describe the behavior, might help the debug process from others.
  3. variables for durations with timers will make changing these globally much easier, we commonly use #define for this kind of thing

:heart: Keep it coming! :slight_smile:

Hi Jonathan.

Thank you for trying it, as i said i´m new in this and is difficult without trying the code!

You get the instruction pretty well, First two moves are for the starting position, you have to press on an adjacent tile of the KEY to put that character into the pressed tile. And then do the same with the second character.

I think I figured out the error, is because I don´t understand yet some behaviours of Blinks, and they were reciving two game states at the same time, causing it to turn blue instantly.

Just a question about setValueSentOnAllFaces(sendData); not related to the game:
¿It keeps sending data for 100ms right?

:triangular_flag_on_post: The “Extra Feature” was causing this, but i think i solved it just adding a new game state (I was using 15 o 16 gamestates, so i had one free space =D).

Right now is :green_circle:UPDATED :green_circle: on Github with this fix if you want to give it a second try also with some other changes thanks to your comments =D

:x:1 - How is isAlone() used?
It works as FOREACH_FACE(f) if ( !isValueReceivedOnFaceExpired( f ) ) ?
It detects (getLastValueReceivedOnFace(f)) ?
:ballot_box_with_check:2 - I´ve added more comments so the code can be easily readed.
:ballot_box_with_check:3 - You mean #define ROUNDTIME 2000 and then using roundTimer.set(ROUNDTIME); every time i´m using it so if you change the define it changes all the code, right? If is the case, DONE.

Thank you!

If all 6 faces are expired values, then it returns true. It is the equivalent of the following:

FOREACH_FACE(f) {
  if( !isValueReceivedOnFaceExpired( f ) ) {
    return false;
  }
}
return true;

in fact, the source code might just be this :slight_smile:

Yeah, awesome. In this example, the compiler simply replaces all instances of ROUNDTIME with 2000.

:raised_hands:

Thanks for the help Jonathan!

So I can do something like this right?:

if isAlone() {
   //THINGS TO DO IF IS ALONE
}

OR even change numNeighbor == 0 for isAlone() in more complex combinations.

I will check it and update it, as you said, to make the code more legible and clean =D

Anyway now it should work with the last fix and the KEY shouldn´t turn BLUE instantly. Just tell me if you can give it a try!

And if it works… Enjoy the game!

:no_entry:need parens for the if statement :+1:


if( isAlone() ) {
    //THINGS TO DO IF IS ALONE
}

:white_check_mark: isAlone returns a Boolean value

1 Like

You´re right! :sweat_smile:

FIXED:
Changed all numNeighbor == 0 references for isAlone()
Corrected Advanced Mode (Was mising numNeighbor++ in the loop)
Cleaned the code a little bit.

If someone tried please share feedback so i can keep improving it =D

1 Like

Just tried it out and looks like the mechanics are working! Starting to feel pretty cool and I can imagine some cool cinematic effects during game play. I’ll make a couple notes of them below. Here is a quick lists of items that I believe are bugs:

  1. I did have an occasion or two where a player action wouldn’t occur, i.e. a player couldn’t move to an adjacent tile,
  2. the ability to teleport to another tile rather than only move to an adjacent tile.
  3. reset of the cornfield on long press require Blinks to be alone to then return to cornfield state

Visual embellishments for later:

  1. The random pulsing of the corn field is nice, I think using a sync across the entire field could be used for dramatic effect (i.e. only have them sync up and do something together to signal danger or something similar
  2. When searching the field, I could see a visual sweep of a flashlight radially from the central player Blink and cascading through surrounding Blinks.

Enjoying seeing this evolve, I can shoot some video of playing through so you can see what it looks like at this stage :slight_smile:

Hi Jonathan!

Thanks for tying it! That feedback is great to keep working on the game, as I can´t try it yet =D

Answering your bugs:

  1. :green_circle: ¿FIXED? I fixed a behaviour where user can cheat and teleport using KEY and clicking an adjacent tile, now you can not cheat. Maybe this can fix movement problems?? I’m not sure to be able to identify it as it only happens sometimes but all seems ok :thinking:

  2. :green_circle: FIXED in the first point :grinning:There shouldn´t be hability to teleport!! You can only reshape the cornfield moving an empty Blink. If you use it for teleport it can be too easy for Farmer player so there is a limitation, made on purpose, you can move phisically any blink EXCEPT the blink you are on to avoid teleport. (But you CAN move the blink in where the other player is, as you don´t know WHERE it is, and use this as an strategy =D)
    Actually in the code for the advanced mode is this coment:

//Prevent cheating avoiding to move tile if you are there

I will explain this better in the instruction as I just checked is not well explained (It was only in my head) and can be confusing.

  1. :green_circle:FIXED!!! I just identified the problem, thanks for detecting it! (Now it should work with all blinks together, if doesn´t work please just tell me)

About the visuals:

  1. I tried to do it randomly to represent the wind moving the cornfield, I just thinked it was cool. About the danger, I don´t really want to show danger if the monster is close to you cause this can be maybe too easy? I think the point of the game is just to be completely blind, also I don´t have more space for comunications :frowning_face:
  2. :green_circle: Added a small circular animation if you detect and random glow on adjacent tiles. Added a yellow flash if you don´t detect. I can´t do a propper animation for the surrounding tiles and sync them cause i don´t have more space for comunications :frowning_face:

If you can do a short video that will be amazing for sure! Thanks for your support! I hope people enjoy the game as much as I´m enjoying making it.

Nice playing!

Ah the communication part is always tricky, we often find ways to squeeze something in, perhaps we can brainstorm some ideas. My thought was that this danger is only visible during a players move so that this is not global information, just reinforces information that you get when you click to listen. I think the aspect of the wind is a nice touch… you might even be able to have a nice flow field (but once again, could be tight for communication :slight_smile:

I always like to get lost in the details, but best to first get the gameplay dialed in :+1:

1 Like

I’ve been thinking a lot on communications, actually I’m very limited because the game is using 16 gamestates, what uses 4/6 of the communications. I will try to write everything on a different way with less gamestates, probably I can reduce it to 8 and use 3/6 of communications, but anyway I will need 2/6 for the interaction between two players so I don’t know if having a free slot on communications can be enough for a good sync for animations. :sweat_smile: Also another option is to use that 2 extra spaces to sync the field as I’m not using them when blinks are in that mode, can be an option!

Anyway if someone wants to read the code and find a good way to optimize it is welcome, I’m using 92% so there is some room for improvement.

With the last fixes the gameplay should work 100% fine and the animations now should look better. If you can give it a try I’m sure now you can enjoy the game 100% working :grin:

It was awesome to see the game on the Livestream!

Definitely I have some work to do but thanks to that I can see where are the bugs and try to solve them!

I think you were using a previous version, I changed some graphics for the detection (Smell/Hear) and also revised the code and changed a little bit, anyway now I see it working, these are my next steps:

  • Solve moving bug (it seems only affects to green player)
  • Solve teleport bug
  • Change graphics! I think I can do the “wave” thing with the wind.
  • Add a new player? Maybe, who knows.
  • Think on mechanics to help green player (as directional hearing)

Stay tuned for the next version!

1 Like

Shame on me!

I detected the movement bug, it was completely my fault!

Even with the couple small bugs, that was really good. Seriously. For not having any Blinks to test on as you wrote it, that was great. Good job, man. I mentioned Scotland Yard for possible update ideas. It was a good “blind chase” style game from the 80s. It might give you some ideas for other players or fast travel options? Who knows. https://www.youtube.com/watch?v=ZxqTNY9IQVA

1 Like

Thanks @Dudepants !!! Nice to hear that!
I checked the mechanics of the game you said, and is a pretty interesting game i didn’t know that existed! Is more complex and with a bigger map, and use the transports to move faster. I almost used the same number of rounds! (BTW is 25 rounds for EACH player)
In The Hunt I think is difficult to make it move faster cause the board is actually pretty small (and I dont recommend playing it with more than 18 blinks) and if you do a fast move, the game can be pretty difficult for red player.

Actually The Hunt is inspired by a Pen & Paper game called “Escape from the Aliens in Outer Space”, a multiplayer hunting game with hexagonal cells (with a bigger map).

Also NOTE that, as mentioned in the GitHub page, the first movement of every player is visible for both players! and every player should start in a side of the board… or not! you can play as you want! :sweat_smile:

About the “teleport” thing, i must say, is also part of the game as an advanced mode (Recomended with 18 blinks):
As your movement, you can reshape the Cornfield, you can move any tile except the tile you are on.
This can be used as a teleport, not to teleport yourself, but you can teleport the other player! (This hability was not showed in the livestream)

Update v6:
:ballot_box_with_check: Fixed reset function (It was fixed previously in v5, version showed in the livestream i think was v4 without the fix)
:ballot_box_with_check: Fixed teleport (Now is REALLY fixed :sweat_smile:)
:ballot_box_with_check: Fixed Green player movement! (Tip: Don´t copy paste loops without checking them!)
:ballot_box_with_check: Increased showing time from 2 to 3 seconds

Still working on:
:ballot_box_with_check: Graphics!!! :upside_down_face:
:ballot_box_with_check: As part of the graphics, improve the Hear function to help green player (as it seems is more difficult to win for green player)

2 Likes