← All projects

Games

Text adventure

Rewrite of a game from my studies: a text adventure (places, items, fights), in Java.

Done Sprint S20 · 5 points
In short, no jargon for non-developersRead the summaryClose
What it is
A text adventure, “The night lab”: you type commands to explore, pick up objects and get out, playable in the page.
What it is for
A game from my studies, rewritten from scratch with the methods of a professional project: automatic tests, versions for several systems.
What it shows
Programming in Java, and one program that runs on a computer as well as in the browser.
Source code

How the pieces fit together

Diagram: Texts → Engine (sentences) ; Terminal → Engine (each line typed) ; Tests → Engine (play) ; Browser → Engine. sentences each line typed play Texts French and English Engine Game.respond(line) Terminal Main, Java Tests JUnit, whole games Browser compiled to JavaScript

Play in your browser

The game's engine, written in Java, compiled to JavaScript by TeaVM: type your commands as in a terminal (for example "north", "take the badge", "talk").

Tech stack

  • Java
  • Maven
  • JUnit
  • TeaVM

Who does what

Java
The engine of "The night lab": the whole game behind one method, in French and English.
Maven
Building, tests, and a web profile that runs TeaVM.
JUnit
The tests: texts in both languages, command parsing, items, the badge door, whole games played.
TeaVM
Compiles the Java to JavaScript: you play in a terminal on the project page.

Definition of Done

  • Code reviewed, diff by diff
  • Unit and integration tests green
  • Green CI on Linux, Windows and macOS when compiled
  • README, REVIEW.md and DECISIONS.md up to date
  • Texts in French and English
  • Demo deployed and tested on mobile