{"id":15048709,"url":"https://github.com/pyrustic/codegame","last_synced_at":"2025-07-02T07:07:06.766Z","repository":{"id":57417372,"uuid":"411810891","full_name":"pyrustic/codegame","owner":"pyrustic","description":"Python desktop application to create, distribute, discover, and run codegames","archived":false,"fork":false,"pushed_at":"2022-03-21T20:28:16.000Z","size":70,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-02T07:07:05.618Z","etag":null,"topics":["challenge","codegame","desktop","game","litemark","markdown","programming","puzzle","pyrustic","riddle","serious-game","test"],"latest_commit_sha":null,"homepage":"https://pyrustic.github.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pyrustic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-29T19:53:25.000Z","updated_at":"2024-01-22T10:41:43.000Z","dependencies_parsed_at":"2022-08-30T04:11:15.923Z","dependency_job_id":null,"html_url":"https://github.com/pyrustic/codegame","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/pyrustic/codegame","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrustic%2Fcodegame","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrustic%2Fcodegame/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrustic%2Fcodegame/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrustic%2Fcodegame/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyrustic","download_url":"https://codeload.github.com/pyrustic/codegame/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrustic%2Fcodegame/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263091027,"owners_count":23412344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["challenge","codegame","desktop","game","litemark","markdown","programming","puzzle","pyrustic","riddle","serious-game","test"],"created_at":"2024-09-24T21:15:36.252Z","updated_at":"2025-07-02T07:07:06.743Z","avatar_url":"https://github.com/pyrustic.png","language":"Python","readme":"## Overview\nThe `Codegame Platform` is a Python desktop application to create, distribute, discover, and run `codegames`.\n\nA `codegame` is a [serious game](https://en.wikipedia.org/wiki/Serious_game) made of levels written in `Litemark`, a lightweight `Markdown` dialect.\n\nA level is typically a hypertext that gratifies intellectual curiosity, with an embedded programming problem to solve.\n\nThe person who produces a `codegame` is the `creator`. The one who consumes a `codegame` is the `user`.\n\nThe 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.\n\nThis project is suitable for:\n- teaching programming, algorithms, data structures;\n- building a well-articulated chain of puzzles with an exciting story behind it;\n- automating [coding interviews](https://en.wikipedia.org/wiki/Coding_interview);\n- fun, and more...\n\nNow, let's build a codegame demo with the Codegame Platform.\n\n## Installation\n### For the first time\n```bash\n$ pip install codegame\n```\n\n### Upgrade\n```bash\n$ pip install codegame --upgrade --upgrade-strategy eager\n```\n\n## Codegame creation\nThe Codegame Platform has a command line interface to create, build and publish codegames.\n\n### Initialization\nChange the current working directory to the folder of the new codegame project. Then use the command `init` to initialize the folder.\n\n```bash\n$ cd /home/alex/cgame-demo\n$ codegame init\n```\nNow you have a basic codegame project structure.\n\n### Basic codegame structure\nThis is the root directory of the codegame project:\n\n```bash\ncgame-demo/\n    assets/ # [1] this is where you store images\n    dist/ # [2] folder to keep distribution packages\n    source/ # [3] the main folder to store levels !\n    CHANGELOG.md # [4] automatically updated\n    codegame.json # [5] the config file of the project\n    LATEST_RELEASE.md # [6] latest release\n    README.md # [7]\n\n```\n\n- `[1]` this is just a convention, you can ignore this folder and put your images somewhere else.\n- `[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.\n- `[3]` this is where you store the Litemark files that represent the levels of your codegame.\n- `[4]` this file is managed by the Codegame Platform.\n- `[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.\n- `[6]` when you issue the command `publish`, the content of this file is automatically cut and pasted in CHANGELOG.md.\n- `[7]` there are some basic README text in this file that you can edit.\n\nNote: don't forget to add a license file in the root directory of the codegame project.\n\n### Levels for this demo\nLet's edit the folder `source`:\n```bash\nsource/\n    1.md # level 1\n    2.md # level 2\n    3.md # level 3\n    index.json # we will store levels titles here\n```\nThis is the content of `index.json`:\n```bash\n[\n    \"Welcome Dear Stranger !\",\n    \"Time Is Money...\",\n    \"The Year Of The Four Seasons\"\n]\n```\n\nEach level is just a file with Litemark text inside.\nYou can preview the rendered level with the command `preview`:\n```bash\n# cd to the root directory of the codegame project\n$ cd /home/alex/cgame-demo\n# without any argument, this command will open the first level\n$ codegame preview\n# preview level 3\n$ codegame preview 3\n```\n\n### Embed a problem in a level\nThe Codegame Platform introduces a new level to the user when they complete the problem defined in the previous level.\nTo 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.\n\nLet's explore the content of the 3 levels in this codegame demo project.\n\n## Codegame demo levels\n\nYou can clone the [codegame demo](https://github.com/pyrustic/cgame-demo) project to study it:\n```bash\n$ git clone https://github.com/pyrustic/cgame-demo\n```\n\n### Level 1\n\n```bash\n$ cd /home/alex/cgame-demo\n$ codegame preview 1\n```\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/pyrustic/misc/master/media/cgame-preview-1.png\" alt=\"Figure\" width=\"674\"\u003e\n    \u003cp align=\"center\"\u003e\n    \u003ci\u003e Rendered - Codegame demo - Level 1 (Preview) \u003c/i\u003e\n    \u003c/p\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/pyrustic/misc/master/media/cgame-plain-text-1.png\" alt=\"Figure\" width=\"681\"\u003e\n    \u003cp align=\"center\"\u003e\n    \u003ci\u003e Plain text - Codegame demo - Level 1 \u003c/i\u003e\n    \u003c/p\u003e\n\u003c/div\u003e\n\n\n### Level 2\n\n```bash\n$ cd /home/alex/cgame-demo\n$ codegame preview 2\n```\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/pyrustic/misc/master/media/cgame-preview-2.png\" alt=\"Figure\" width=\"674\"\u003e\n    \u003cp align=\"center\"\u003e\n    \u003ci\u003e Rendered - Codegame demo - Level 2 (Preview) \u003c/i\u003e\n    \u003c/p\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/pyrustic/misc/master/media/cgame-plain-text-2.png\" alt=\"Figure\" width=\"681\"\u003e\n    \u003cp align=\"center\"\u003e\n    \u003ci\u003e Plain text - Codegame demo - Level 2 \u003c/i\u003e\n    \u003c/p\u003e\n\u003c/div\u003e\n\n\n### Level 3\n\n```bash\n$ cd /home/alex/cgame-demo\n$ codegame preview 3\n```\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/pyrustic/misc/master/media/cgame-preview-3.png\" alt=\"Figure\" width=\"674\"\u003e\n    \u003cp align=\"center\"\u003e\n    \u003ci\u003e Rendered - Codegame demo - Level 3 (Preview) \u003c/i\u003e\n    \u003c/p\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/pyrustic/misc/master/media/cgame-plain-text-3-a.png\" alt=\"Figure\" width=\"681\"\u003e\n    \u003cp align=\"center\"\u003e\n    \u003ci\u003e Plain text 1/2 - Codegame demo - Level 3 \u003c/i\u003e\n    \u003c/p\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/pyrustic/misc/master/media/cgame-plain-text-3-b.png\" alt=\"Figure\" width=\"681\"\u003e\n    \u003cp align=\"center\"\u003e\n    \u003ci\u003e Plain text 2/2 - Codegame demo - Level 3 \u003c/i\u003e\n    \u003c/p\u003e\n\u003c/div\u003e\n\n\n## Distribution\n### Build\n```bash\n$ cd /home/alex/cgame-demo\n$ codegame build\n```\n\n### Publish\n```bash\n$ cd /home/alex/cgame-demo\n$ codegame publish\n```\n### Check downloads and stargazers\n```bash\n$ cd /home/alex/cgame-demo\n$ codegame info remote\n# or\n$ codegame info https://github.com/pyrustic/cgame-demo\n# or\n$ codegame info pyrustic/cgame-demo\n```\n\n### Install a new codegame from the GUI\nOpen the GUI of the `Codegame Platform`:\n```bash\n$ codegame\n```\nThen copy-paste in the search bar the GitHub repository URL (or the shortcut \"owner/repository\") of the `codegame` to install.\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/pyrustic/misc/master/media/codegame-screenshot.png\" alt=\"Figure\" width=\"674\"\u003e\n    \u003cp align=\"center\"\u003e\n    \u003ci\u003e The Codegame Platform GUI \u003c/i\u003e\n    \u003c/p\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/pyrustic/misc/master/media/codegame-installer.png\" alt=\"Figure\" width=\"658\"\u003e\n    \u003cp align=\"center\"\u003e\n    \u003ci\u003e Installing the codegame demo \u003c/i\u003e\n    \u003c/p\u003e\n\u003c/div\u003e\n\n\n\n\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/pyrustic/misc/master/media/codegame-solving.png\" alt=\"Figure\" width=\"661\"\u003e\n    \u003cp align=\"center\"\u003e\n    \u003ci\u003e Solving the Level 1 of the codegame demo \u003c/i\u003e\n    \u003c/p\u003e\n\u003c/div\u003e\n\n\n\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/pyrustic/misc/master/media/codegame-solved.png\" alt=\"Figure\" width=\"674\"\u003e\n    \u003cp align=\"center\"\u003e\n    \u003ci\u003e Solved Level 1 of the codegame demo \u003c/i\u003e\n    \u003c/p\u003e\n\u003c/div\u003e\n\n\n\nThe GUI of the `Codegame Platform` is inspired by `Hubstore`. Visit [Hubstore](https://github.com/pyrustic/hubstore) !\n\n\nThis project is a work in progress...\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyrustic%2Fcodegame","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyrustic%2Fcodegame","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyrustic%2Fcodegame/lists"}