{"id":30303673,"url":"https://github.com/captainsly/consolejavaengine","last_synced_at":"2025-08-17T06:04:20.786Z","repository":{"id":305272914,"uuid":"929776475","full_name":"CaptainSly/ConsoleJavaEngine","owner":"CaptainSly","description":"A little Terminal \"Engine\" based off of JavidX9's olcConsoleGameEngine","archived":false,"fork":false,"pushed_at":"2025-07-26T08:39:36.000Z","size":156,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-26T14:44:19.047Z","etag":null,"topics":["ascii-game","ascii-game-engine","ascii-graphics","cli-game","game-dev","game-engine","java","java21","lanterna","terminal-engine","terminal-game"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CaptainSly.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-09T11:29:31.000Z","updated_at":"2025-07-25T07:21:44.000Z","dependencies_parsed_at":"2025-07-19T09:48:05.667Z","dependency_job_id":"064eb2d9-426a-4bcd-b997-5c1c7adf5477","html_url":"https://github.com/CaptainSly/ConsoleJavaEngine","commit_stats":null,"previous_names":["captainsly/consolejavaengine"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/CaptainSly/ConsoleJavaEngine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaptainSly%2FConsoleJavaEngine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaptainSly%2FConsoleJavaEngine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaptainSly%2FConsoleJavaEngine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaptainSly%2FConsoleJavaEngine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CaptainSly","download_url":"https://codeload.github.com/CaptainSly/ConsoleJavaEngine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaptainSly%2FConsoleJavaEngine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270811911,"owners_count":24650075,"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","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ascii-game","ascii-game-engine","ascii-graphics","cli-game","game-dev","game-engine","java","java21","lanterna","terminal-engine","terminal-game"],"created_at":"2025-08-17T06:04:18.158Z","updated_at":"2025-08-17T06:04:20.776Z","avatar_url":"https://github.com/CaptainSly.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Console Java Engine - Version 0.1.20-Jyggalag\n[![](https://jitpack.io/v/CaptainSly/ConsoleJavaEngine.svg)](https://jitpack.io/#CaptainSly/ConsoleJavaEngine)\n\nThe Console Java Engine is based off of JavidX9's PixelGameEngine.\n\nUses Lanterna to emulate a terminal, also comes with a Pair class that is a basic copy of C++s pair class.\n\nRequires Java 17+\n\n## What does it provide? \n\nIf you decide to use Console Java Engine to make your game with, first off thank you for using my project to make yours, secondly you might want to know what it provides. \n\nAs of version 0.1.20-Jyggalag the following is provided:\n\nA Scene system\n\nA Pair class that emulates the C++ Standard Library's. (I thought it'd be nice to have when I first wrote this, this might be removed later)\n\nA Colors class that holds RGB colors. These colors were sourced from the [website](html-color.codes) \n\nA very basic Camera class. It's really basic camera.\n\nAn Immediate Mode UI - I emulated how DearImGui works and currently adding features to the it as I go. \n\nAn Input class - It handles keyboard input. I've been trying to implement a `justPressed` feature, but Lanterna only let's you know a key was pressed and not when it was released, held or pressed. So I might have to dig deeper and develop a separate input system from Lanterna. \n\n## How to use\n\nUnder the hood, Console Java Engine uses Lanterna to create a Swing based Terminal for drawing to. \n\nTo utilize the Console Java Engine in your project, create a class that extends the `ConsoleJavaEngine` class. The Console Java Engine uses scenes so you will also need to create a class that extends `AbstractScene` class. The `AbstractScene` class provides methods for you to override so you can update, render to the screen, render ui, and process input. You can draw to the screen using the provided `ConsoleRenderer` object, and draw UI using the `UIContext` object pass through. `UIContext` uses an Immediate Mode gui system so you're able to create UI kinda like DearIMGui does. \n\nA Skeleton is provided below for both a class that extends the `ConsoleJavaEngine` and a class that extends `AbstractScene`\n\nThe default font included is ascii-sector-16x16-tileset. This means that each cell will also be 16x16 \"pixels\", if you will, so when you specify you're width and height for creating your game, it'll be multiplied by the font's character width and height. 80, 48 is used here which would translate to a window size of 1280 by 768. This font was chosen because of it's ability to use Code Page 437. By utilizing '\\u' then a number, you can use symbols from the code page. \n\n```Java\n\nimport com.spireprod.cje.ConsoleJavaEngine;\n\npublic class Adventure extends ConsoleJavaEngine {\n\n\tpublic Adventure() {\n\t\tsuper(\"Adventure\", 80, 48);\n\t}\n\n\t@Override\n\tprotected void onGameCreate() {\n\t\tsetScene(new GameScene(this));\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tAdventure venture = new Adventure();\n\t\tventure.run();\n\t}\n\n}\n\nimport com.spireprod.cje.ConsoleJavaEngine;\nimport com.spireprod.cje.core.ConsoleRenderer;\nimport com.spireprod.cje.core.input.Input;\nimport com.spireprod.cje.core.scenes.AbstractScene;\nimport com.spireprod.cje.core.ui.UIContext;\n\npublic class GameScene extends AbstractScene {\n\n\tpublic GameScene(ConsoleJavaEngine cje) {\n\t\tsuper(cje);\n\t}\n\n\t@Override\n\tpublic void onSceneUpdate(float delta) {\n\t}\n\n\t@Override\n\tpublic void onSceneRender(ConsoleRenderer renderer) {\n\t}\n\n\t@Override\n\tpublic void onSceneUIRender(UIContext ctx, ConsoleRenderer renderer, Input input) {\n\t}\n\n\t@Override\n\tpublic void onSceneInput(float delta, Input input) {\n\t}\n\n}\n\n\n```\n\n\n### Jitpack\n\nConsoleJavaEngine is available through [Jitpack](https://jitpack.io). Here's what you want to use:\n\n```gradle\n\n\tdependencyResolutionManagement {\n\t\trepositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)\n\t\trepositories {\n\t\t\tmavenCentral()\n\t\t\tmaven { url = uri(\"https://jitpack.io\") }\n\t\t}\n\t}\n\t\n\tdependencies {\n\t        implementation(\"com.github.CaptainSly:ConsoleJavaEngine:{VERSION}\")\n\t}\n```\n\n## Known Bugs\n\nCurrently has a flickering bug.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaptainsly%2Fconsolejavaengine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaptainsly%2Fconsolejavaengine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaptainsly%2Fconsolejavaengine/lists"}