HueHue: a colourful degradee game


This post's project was made by me and a colleague of mine, Inês Marques. We programmed a small puzzle game, based solely on colours and not on images, that we called HueHue (please mind that the idea for how the game works is not ours). The way the game works is pretty straightforward: you start with a bunch of coloured tiles all mixed up, like in the left image above, and then you want to organize them to create a degradee like the one in the right! The only thing you can take for granted is that the four corners are already correctly placed (and you can't move them, just to prevent accidents).

The instructions are also quite simple: you use left and right clicks to swap tiles. Whenever you left-click a tile, you are telling the game that you will want to swap that tile. Whenever you right-click a tile, that tile gets swapped with the last tile you left-clicked! Simple, right? When you finish the puzzle and rearrange the degradee, the window caption changes and you can't swap any more tiles. To change the number of tiles in the puzzle or their sizes, edit the file HueHueConfig.py.

When we had the game logic already implemented but were still testing the way we would create the degradee, I created another small script that just populates the screen with a random degradee. An example of running said script is given in this image:


You can find the code for the game and for the random degradee generator in this GitHub folder, and you can download the executables from here. Have fun!

[Pt] O projeto deste post foi feito por mim e por uma colega minha, a Inês Marques. Nós programámos um puzzle que funciona à base de cores, em vez de à base de imagens, a que chamámos HueHue (a ideia base do jogo não é original!). O objetivo do jogo é simples: começar com uma grelha colorida toda misturada, como na primeira imagem à esquerda, e organizá-la para criar um degradee, como na primeira imagem à direita. A única garantia que o jogador tem à partida é que os quatro cantos estão nas suas posições corretas e não vão sair de lá.

As instruções são simples: carregar numa telha com o botão direito troca essa telha pela última telha onde carregámos com o botão esquerdo. Assim, para trocar duas telhas carregamos numa com o botão esquerdo e de seguida na outra com o botão direito do rato. Quando o degradee fica completo, deixa de ser possível trocar telhas e o nome da janela altera-se. Para sair do jogo há que fechar a janela. Para se mudar o número de telhas na grelha ou o seu tamanho em pixéis, basta editar o ficheiro HueHueConfig.py.

Quando a lógica do jogo já estava implementada, criei um pequeno script que gerasse degradees aleatórios para perceber qual seria a melhor maneira de o fazer. Um exemplo de um degradee aleatório pode ver-se na segunda imagem deste post.

O código do jogo e do gerador aleatório de degradees pode ser obtido nesta pasta no GitHub. Os executáveis podem ser obtidos aqui. Divirtam-se!

Let me know what you think!

-RGS
HueHue: a colourful degradee game HueHue: a colourful degradee game Reviewed by Unknown on November 24, 2017 Rating: 5

No comments:

Powered by Blogger.