Python desktop application to create, distribute, discover, and run codegames

Overview

Overview

The Codegame Platform is a Python desktop application to create, distribute, discover, and run codegames.

A codegame is a serious game made of levels written in Litemark, a lightweight Markdown dialect.

A level is typically a hypertext that gratifies intellectual curiosity, with an embedded programming problem to solve.

The person who produces a codegame is the creator. The one who consumes a codegame is the user.

The creator can safely insert problems testing specifications in a level. The Codegame Platform evaluates the solution submitted by the user then unlock the next level if the solution is correct.

This project is suitable for:

  • teaching programming, algorithms, data structures;
  • teaching ethical hacking;
  • building a well-articulated chain of puzzles with an exciting story behind it;
  • automating coding interviews;
  • fun, and more...

Now, let's build a codegame demo with the Codegame Platform.

Installation

For the first time

$ pip install codegame

Upgrade

$ pip install codegame --upgrade --upgrade-strategy eager

Codegame creation

The Codegame Platform has a command line interface to create, build and publish codegames.

Initialization

Change the current working directory to the folder of the new codegame project. Then use the command init to initialize the folder.

$ cd /home/alex/cgame-demo
$ codegame init

Now you have a basic codegame project structure.

Basic codegame structure

This is the root directory of the codegame project:

cgame-demo/
    assets/ # [1] this is where you store images
    dist/ # [2] folder to keep distribution packages
    source/ # [3] the main folder to store levels !
    CHANGELOG.md # [4] automatically updated
    codegame.json # [5] the config file of the project
    LATEST_RELEASE.md # [6] latest release
    README.md # [7]
  • [1] this is just a convention, you can ignore this folder and put your images somewhere else.
  • [2] distribution packages are just ZIP archives generated by the Codegame Platform when you issue the command build. You won't need to enter this directory since it's managed by the Codegame Platform.
  • [3] this is where you store the Litemark files that represent the levels of your codegame.
  • [4] this file is managed by the Codegame Platform.
  • [5] when you issue the command init for the first time, you will be asked to submit some information (author name, github repository...). This information is stored in this config file that you can edit.
  • [6] when you issue the command publish, the content of this file is automatically cut and pasted in CHANGELOG.md.
  • [7] there are some basic README text in this file that you can edit.

Note: don't forget to add a license file in the root directory of the codegame project.

Levels for this demo

Let's edit the folder source:

source/
    1.md # level 1
    2.md # level 2
    3.md # level 3
    index.json # we will store levels titles here

This is the content of index.json:

[
    "Welcome Dear Stranger !",
    "Time Is Money...",
    "The Year Of The Four Seasons"
]

Each level is just a file with Litemark text inside. You can preview the rendered level with the command preview:

# cd to the root directory of the codegame project
$ cd /home/alex/cgame-demo
# without any argument, this command will open the first level
$ codegame preview
# preview level 3
$ codegame preview 3

Embed a problem in a level

The Codegame Platform introduces a new level to the user when they complete the problem defined in the previous level. To insert a problem into a level, all you need to do is insert the test specifications to evaluate the solution in a special codeblock called codegame-test. The Codegame Platform will insert a SOLVE ME ! Button at the bottom of the level page. If the user clicks on the button, they will be prompted to submit a solution in an editor that will open. If the solution passes the tests, a NEXT LEVEL button will be inserted at the bottom of the level page.

Let's explore the content of the 3 levels in this codegame demo project.

Codegame demo levels

You can clone the codegame demo project to study it:

$ git clone https://github.com/pyrustic/cgame-demo

Level 1

$ cd /home/alex/cgame-demo
$ codegame preview 1
Figure

Rendered - Codegame demo - Level 1 (Preview)


Figure

Plain text - Codegame demo - Level 1

Level 2

$ cd /home/alex/cgame-demo
$ codegame preview 2
Figure

Rendered - Codegame demo - Level 2 (Preview)


Figure

Plain text - Codegame demo - Level 2

Level 3

$ cd /home/alex/cgame-demo
$ codegame preview 3
Figure

Rendered - Codegame demo - Level 3 (Preview)


Figure

Plain text 1/2 - Codegame demo - Level 3


Figure

Plain text 2/2 - Codegame demo - Level 3

Distribution

Build

$ cd /home/alex/cgame-demo
$ codegame build

Publish

$ cd /home/alex/cgame-demo
$ codegame publish

Check downloads and stargazers

$ cd /home/alex/cgame-demo
$ codegame info remote
# or
$ codegame info https://github.com/pyrustic/cgame-demo
# or
$ codegame info pyrustic/cgame-demo

Install a new codegame from the GUI

Open the GUI of the Codegame Platform:

$ codegame

Then copy-paste in the search bar the GitHub repository URL (or the shortcut "owner/repository") of the codegame to install.

Figure

The Codegame Platform GUI


Figure

Installing the codegame demo


Figure

Solving the Level 1 of the codegame demo


Figure

Solved Level 1 of the codegame demo

The GUI of the Codegame Platform is inspired by Hubstore. Visit Hubstore !

This project is a work in progress...

Owner
Pyrustic Open Ecosystem to develop and distribute Python apps
Allows you to email people wordle spoilers. Very beta, not as many features

wordlespoiler Allows you to email people wordle spoilers. Very beta, not as many features How to Use 1.) Make a new gmail account. Go to settings (Man

0 Jan 04, 2023
View your VALORANT performance in different areas of every map in the game!

Valorant-Zone-Stats Inspired by Leetify's awesome Map Zones Tool for CS:GO A simple desktop program to view your VALORANT performance in different are

Louis 76 Jan 01, 2023
A small Python Library to process Game Boy Camera images

GameBEye GameBEye is a Python Library to process Game Boy Camera images. Source code 📁 : https://github.com/mtouzot/GameBEye Issues 🆘 : https://gith

Martin TOUZOT 4 Nov 25, 2022
Game using Python

🎡 Rock-Paper_Scissor Game Using Python Beginner Friendly Easy to use ♟ Want to Play this? Clone this repository Open in any IDE(for eg. VS Code, PyCh

Akash Kumar 1 Oct 17, 2021
A Game Engine Made in Python with the Pygame Module

MandawEngine A Game Engine Made in Python with the Pygame Module Discord: https://discord.gg/MPPqj9PNt3 Installation To Get The Latest Version of Mand

Mandaw 14 Jun 24, 2022
Nerdle - a nerd's approach to solving Wordle

Nerdle - a nerd's approach to solving Wordle

4 Nov 28, 2022
Finding a method to objectively quantify skill expression in games, using reinforcement learning

Analyzing Skill Expression in Games This is a repo where I describe a method to measure the amount of skill expression games have. Table of Contents M

Marcus Chiam 4 Nov 19, 2022
Client-Server design (guess the closest number to the average score game)

Multiplayer game (enter the number closest to the average) Design Client-Server design The client's side is responsible for sending numbers from the g

Adam Piszczek 0 Jun 29, 2022
中文版本的ai地牢,一个使用GPT-2的文字冒险游戏,使用清源CPM预训练模型finetune而成。

中文版本的ai地牢,一个使用GPT-2的文字冒险游戏,使用清源CPM预训练模型finetune而成。

icybee 178 Jan 03, 2023
Automatic game data translator for RPGMaker-MV

RPGMaker-MV Translator 🕹️ 🎮 Use AI to translate all the dialogs and texts of your RPGMaker automatically. 👊 You worked hard to make your game, now

Davide Liu 11 Dec 26, 2022
Easily manage wine prefixes in a new way. Run Windows software and games on Linux

Bottles Easily manage wineprefix using environments Documentation · Forums · Telegram group · Funding 📚 Documentation Before opening a new issue, che

Bottles 4.1k Jan 09, 2023
A menu for pygame. Simple, and easy to use

pygame-menu Source repo on GitHub, and run it on Repl.it Introduction Pygame-menu is a python-pygame library for creating menus and GUIs. It supports

Pablo Pizarro R. 411 Dec 27, 2022
This is a python interactive story game that I made to show off what I've learnt in python coding for a month

Purpose The files in this repository are for that of a story game created with python version 3.8.5 The purpose of this project was to get familiar wi

0 Dec 30, 2021
A 16x16 clone of Minecraft Classic, written in Python with the Ursina Engine

VoxelCraft A 16x16 clone of Minecraft Classic, written in Python with the Ursina Engine Features:Trees, Water(But there's no gravity, so if you break

2 Jun 23, 2022
A project to san the internet of all open Minecraft servers.

MC-Server-Finder A project that scans the internet to find open Minecraft servers. Install the dependencies by running pip install -r requirements.txt

drakeerv 8 Mar 12, 2022
Open source Brawl Stars server emulator for version 29 of the game!

Welcome to Classic-Brawl v29 Remake 👋 Open source Brawl Stars server emulator for version 29 of the game! (Remake) What's working ? Battles Trophies

CrossFire 4 Jan 19, 2022
Tic Tac Toe game developed in python; have 2 difficulty levels

Tic Tac Toe Game This is a code for Tic Tac Toe game in python. Game has 2 difficulty levels. Easy Hard To play the game, use this command in a LINUX

Akshat Mittal 1 Jun 25, 2022
AWBW Replay Parser - a Python package to open and step through AWBW game replays.

AWBW Replay Parser This repository is home to the AWBW Replay Parser, a Python package to open and step through AWBW game replays. This project is una

Tarkan Al-Kazily 2 Feb 09, 2022
Pygame for humans (pip install hooman) (25k+ downloads)

hooman ~ pygame for humans pip install hooman join discord: https://discord.gg/Q23ATve The package for clearer, shorter and cleaner PyGame codebases!

Abdur-Rahmaan Janhangeer 31 Nov 08, 2022
This is a simple Tic Tac Toe game built with Python.

This is a simple Tic Tac Toe game built with Python.

⚝αикιт кυмαя⚝ 6 Sep 01, 2022