vendredi 10 janvier 2014

congratulations, it's a puzzle!

My first idea was to get inspiration from the classical board game "mastermind"[1]
and to apply it to american football in a tile-based environment. Players would be team coaches  trying
to figure what tactics their opponent would try to employ, and find the best defense. I ran some tests ont paper but found out that fine tuning even a simple system would take me much more than 48 hours.

Instead, I decided to go for a turn based infiltration game. One player is a secret agent, the other controls from one to three soldiers.

The trick is : if you play in the same screen, how is it possible for the secreat agent to remain
concealed ? My first idea was to make each player wear color glasses that would filter some screen content, but requiring extra material is not really a cool thing.

Then I thought that most people have access to headphones, and that I could communicate
information to only one of the players by acting this way.

So this is where I'm heading!

There is a tool that I find absolutely fantastic called puzzlescript[2], which, as its name states,
makes it possible to easily create puzzle games(One of my favorite is the party leaver[3]). And I've decided to make my game with the engine. The only problem is that it is NOT suitable for multiplayer and provides no functionality for multiplayer games. I'm a really stubborn person, and I think I found a really dirty trick that should allow me to make it work anyway.


UPDATE:
Hehe, so I managed to make to have from 1 to 4 players walking in turn.

NEW UPDATE: actually there is a much more easier way to do this, as explained here...

The problem with puzzlescript is that, while you can have keyboard inputs binded to several entities in your game, you can not control only one of those at a time.

To overcome this, I use the "background tiles" as states for my game.
At each turn, each tile is transformed into another tile with wich only one player entity can interact. But given the particular rule evaluation system of puzzlescript this is a little tricky to do, and actually require 4 states.

Indeed, if we considered two states B and D, and naively wrote the following rules:

[B] -> [D]
[D] -> [B]
Well obviously, we would never leave the state D.

For instance, if I want to allow 2 players to play, I create 4 tiles of type A, B, C, D.

Now considering that the rules are applied in the order in which they are defined I create the following rules:

[B] -> [C]
[D] -> [A]
[A] -> [B]
[C] -> [D]

In the first turn, (if we start say in state B), the first rule  [B] -> [C] applies, which leads us to the state C. Then rule fourth [C] -> [D] also applies. This leads us into state D. No other rule is applied,
 and the player moves.
 The next turn, rule 2 [D] -> [A] and 3 [A] -> [B] apply and we end up in state B.
And this goes on, allowing us to alternate between states B and D.
How to exploit this then ?

We add a rule such as

[>  player1 | B] -> [player1 | B]
[>  player2 | D] -> [player2 | D]

that will prevent the engine from moving one player each turn.

This can easily be extended to integrate more players.

Anyway, that makes a lot of rules :)


[1] http://en.wikipedia.org/wiki/Mastermind_(board_game)
[2] http://www.puzzlescript.net/
[3] http://gamejolt.com/games/puzzle/party-leaver/18980/

Aucun commentaire:

Enregistrer un commentaire