Skip to toolbar

Adventures in code

Supported by (Turn Off)

03 it's a start of something

Tutoring 0
Skill 0
Idea 0
No Comments

I did say it was going to be an adventure, right ?
We’ve sat in the tavern, got our quest from the mysterious stranger and now it’s time to look at the map …

A map ?
Yep.

In an application you move from screen to screen to get from where you are to where you need to be in more or less the same way you navigate in a dungeon from room to room via passages and (secret) doors.

And because walking into a dungeon without a map is a sure fire way to get lost we need one for this adventure too.

 

Main entrance

Every dungeon needs an entry point, which is the ‘main menu’ in an app. It is here where we can still return to town and do a bit of prep work before we dive deeper into the dungeon.

First thing I want to know is if I am going to be ‘on-line’ or ‘off-line’.

Why ?
Because I may want to enable different features (like downloading things from the internet). I could hide and lock doors and only open the ones I need, but that feels clumsy and I might forget to lock them which can cause problems.

This makes the entrance room pretty easy :

  1. use off-line
  2. go on-line

A wizard could cast a ‘detect internet’ and immediately teleport to the correct room, but because we’re low level wizards at this point we’re not going to do that. Fancy tricks are for when we’ve got time and a bit more experience.

Opening the door

Of course we can’t let anyone enter our dungeon as that’s where we’re keeping our treasures, so we need to lock the door. It won’t stop any thieves from breaking in, but it will keep the vast majority of the roaming monsters out.

It does create a bit of a conumdrum, because without a key you can’t enter. Someone has to hand out the key to worthy adventurers if they haven’t gotten theirs yet.

The trick is for these adventurers to create their own key. The lock in the door will be imbued with a bit of magic to remember this key the next time they enter, but to enable that magic they first need to recite their name and the chant the magic words.

And what if said adventurers lose their key ?
That requires a bit of advanced wizardry and a different spell.  It does require the adventurers to tell us the where they can be reached by spirit courier.

Supported by (Turn Off)

Leave a Reply

Supported by (Turn Off)