Buscar este blog

sábado, 12 de noviembre de 2016

Blocks - The Game!

Hej Folks!

Long time no update. I know. Life makes me not have time to post, which usually means that either I have much to do or I'm doing well (in my case, both applies :D).

Today's project is about a game I developed recently. The game itself is similar to the classic "Connect Four", but instead of having a 7x6 board, it simply is 4x4, thus being harder to win! You can either play against another user or to the machine. Among other options/input parameters to the game that you can easily see by running the -h flag when launching the game from the terminal, there are two "graphic", runtime options that can be enabled/disabled: debug logging and timer enabled. If the first is enabled, prints info in the terminal, and if the timer is enabled, each player, either human or machine, will have 10 seconds to make a move. If time expires, then it's the oponent's turn. To navigate through the board use the direction arrows and to select a position, simply press ESC.

The project was made using Qt, a powerful set of libraries which implement a high-level API in C++. Itś just some kind of "Legoland" to programmers, the number of things you can do with these libraries is countless! Here is a link to QT's main site, worth a read if you like programming.

From now on I won't be posting the codes directly to my blog since I have ported all my projects to my Github account, so instead I will be posting a link to the Git Repo and some screenshots.

Here is the link to the repo: https://github.com/eiger824/Blocks_The_Game
And here are the screenshots:

If man vs. machine option is not selected, both users write their names and press Start (or press ENTER) to start the game.
If one of the users selects a position that is already taken, a popup appears indicating that another position shall be chosen.


This is a normal screenshot of the game. If the block has a white frame on the border, it means that the user is moving the block and has not decided the position.

Hope you enjoy!

No hay comentarios:

Publicar un comentario