ProjectMindCraft is a programming video game online.
Download a release zip file corresponding to your platform and decompress the archive.
On windows, run MindCraft.exe; on OSX run MindCraft.app; and on Linux run MindCraft.
Pressing Escape opens the main menu with the following choices:
- Enter
Camera Modeto explore the world. - Enter
Editor Modeto write and upload code that will modify the behavior of the objects in the world. - Enter
Console Modeto show the latest error messages from the server. - Enter
Stats Modeto display statistics about events in the game.
The bot.h file defines how the bot's data is structured.
A bot knows its position, its orientation and the objects visible in front of it.
At each tick (second), the bot has to take an action such as WALK or TURN.
It is up to the player to write a program that will take the decision for the bot.
Programs are single functions that take a bot as an argument and return an error code.
For example, the following program will always take the decision to WAIT:
#include <mindcraft/game0/bot.h>
uint64_t idle_bot(struct bot *bot) {
bot->rw.action = BOT_WAIT;
return 0;
}
Beginners are invited to try bot_coroutine.h:
#include<mindcraft/game0/bot_coroutine.h>
BEGIN_BOT
while (true) {
TURN_RIGHT
WALK
WALK
}
END_BOT
More examples are provides in the bots directory.
Daily updates/chat on discord
Submit your solution to a challenge with a pull request: