Technical Articles
Discover a Magical World in ABAP
Presenting The Quest, A Wizard Adventure Game
Hello, ABAP community,
I’m excited to share with you a project that originated from the SAP Developer Code Challenge held in May this year. This challenge provided an opportunity for exploring open-source development in ABAP, truly pushing the boundaries of what we can achieve with this versatile language.
During the fourth week of the challenge, we delved into the AXAGE open-source game engine for text adventures by Enno Wulff. Inspired by this, I built upon Thomas Jung’s version that leverages the abap2UI5 open-source package, enabling the creation of UI5 applications written purely in ABAP.
In recent times, I have been using abap2UI5 to port the Workbench for my Scheme interpreter in ABAP to UI5. Scheme, a LISP variant, intrigued me and I remember being captivated by the brilliance of LISP through the book “Land of Lisp” by Conrad Barski. The book’s approach of using games for teaching resonated with me. In fact, I had already handcrafted the Wizard’s adventure game in abapScheme. So, I decided to use the AXAGE engine in tandem with abap2UI5 and create a text adventure with a similar theme.
For the game narrative, scenarios, and many texts, I turned to ChatGPT (as a note, I also used it to review this blog). The result is The Quest, a journey where the objective is to gather three magical items: the Orb of Sunlight, the Potion of Infinite Stars, and the Staff of Eternal Moon. These mystical objects need to be combined to open a portal to the Wizard’s Guild. The player, an apprentice, will then finally gain recognition as a full-fledged wizard. The path to victory involves exploration and I look forward to your feedback to make this journey even more captivating.
Welcome to The Quest
To bring more vibrancy and visual appeal to the text-only game, I used Stable Diffusion (the DreamStudio online version) to generate images from text prompts. These images have been incorporated into the game, along with a wizard ASCII art sourced from the internet.
Accommodating the game’s intricacies required enhancing the engine significantly, a task that called for some ABAP wizardry. You can discover the details for yourself in the game. I’m thrilled to present a release of the game that provides a complete gaming experience.
Code
- On Premise/Cloud at github: nomssi/axage: ABAP teXt Adventure Game Engine (github.com)
References
- Prerequisites: abapGit, abap2UI5
- DreamStudio (Stable Diffusion)
- ChatGPT
I invite all developers to immerse themselves in this magical world and try out the game. Your feedback, suggestions, and ideas for improvements would be greatly appreciated. I believe this project could inspire more creative ventures and serve as a springboard for your own text-based adventures in ABAP.
For those who manage to complete the quest, I encourage you to post a screenshot of your victory. As an ABAP wizard, you might read through the code for hints.
However, a word of caution before you dive in – I won’t be held responsible if your productivity declines because you enjoy the game too much! Jokes aside, this project stands as a testament to the fun and educational possibilities of coding, redefining what can be achieved with ABAP.
I eagerly await your thoughts and feedback on this endeavor.
Happy gaming and coding, everyone!
Ah, "The Land of Lisp". Fond memories :-).
I think all of you should know that there's also a great song 😉
Need to try out your game soon.
Many thanks for that.
Christian
And also not to forget this song about LISP 🙂
Btw. are there any new songs about programming languages?
Adding audio and video to the game would be nice. HMTL5 has the <video> tag, but I need a custom control for UI5.
Btw is there any possibility to draw pixels in abap?
Mission completed