Treasure Hunt
April 1, 2020
Description: Android app in the form of a game which uses the Lambda backend MUD server to send and receive network requests to progress the player character through the storyline. Beyond having fun, the purpose is to improve blockchain mining abilities, 8-bit computer programming skills, and honing breadth-first searching algorithms.
Tech: Android • Kotlin • Activities • Fragments • RecyclerViews • Retrofit • Shared Preferences • Custom View • Clipboard • Callbacks • Coroutines
Highlights: Solo project built as the player progressed through the game. Various mechanisms attempted for the automatic traversal functionality including callbacks, synchronous calls, and Timers. The best solution turned out to be the flexibility of Kotlin Coroutines. They ended up being smooth and extensible.
The activity showing the main game screen. The bottom portion shows a map drawn with a custom view. The top portion is where information and commands are executed. The status, movement direction, cooldown display, list of commands, and the log are located here. In the middle is a toast showing the status of an executed command.
One of 3 possible dialog fragments is showing here, each with a different border. This one allows the user to select from a list where each item are bound to a ViewHolder in a RecyclerView. The "Confirm" button has a listener attached which activates a callback so that the game can still be running in the background.
Every room on the map is interactive. Selecting a room will bring up the room information stored in a HashMap and loaded from Shared Preferences. When the "Confirm" button is pushed, the room number is set as the destination for the room-by-room automatic traversal using a breadth-first search (BFS).
Link: GitHub Source Code
