🎮 A Text Based Game: Steemit City

Thank you to everybody who took the time to read and comment on my initial brain dump on creating a text-based game for Steemit. Since writing that post, almost no other thoughts have entered my mind and if the game proves to be popular, I could move on to other, similar ideas that could integrate well with the Blockchain.

Some ideas (e.g. a twist on Fantasy Football) could also work well with an accompanying website to attract users unfamiliar with Steemit. But before I get too far ahead of myself, I'll update you on progress and share a few of my ideas with you...

👇 Source 1, Source 2 + Photoshop
image.png

Separator-code.png

The Game Idea

Let's see how exciting I can make it sound having not written any of the game text yet... I'm too tired to think of anything exciting.

It's a classic "Choose Your Own Adventure" zombie apocalypse game.

I'm going to start by releasing Level 1 and all being well, I can release future levels which will form a continuation of the story (with your character advancing too) so I've started to put my thoughts into how Level 1 can work.

Since it's going to be a game exclusive to Steemit, I thought I'd add a few "doffs of the cap" to the platform that's hosting it all so Level 1 starts in your home - No. 20 Steemit Apartments, a 3rd Floor flat in Steemit City. The objective at this point is fairly simple, to get out of the building alive.

Level 1 is split into 44 "zones" - 23 flats in total and a stairwell at the end of each corridor. There will be a varying number of zombies on each floor and whilst you might have the option of running away, this won't always be possible and you'll have to overcome the ravenous beings.

Throughout your journey, you might be lucky and find some food (for energy) or maybe even a weapon to help you fend off the zombies.

How many zombies, how much food, how many weapons and the other random things I'm planning to include are details that you'll need to discover for yourself as you play. No 2 games will be the same with your character, each zombie, etc. all being randomly generated when you start your own adventure.

I'm hoping to include some graphics along the way which it appears that some clever AI can help me with 🙂

👇 Image Created with Dall-E
image.png
Separator-code.png

Progress

I started off by mapping out the landscape and jotting down a lot of ideas on what can be included in the game, as well as future ideas on how it could become a multi-player co-operative game too. I'd also like to include some dynamically generated graphics into the game so one of my questions (which I'll also include at the end) is how to upload an image to https://steemitimages.com/ in code.

Since putting the plan together, I've got a clear path in mind and have been able to start writing some code - something I've spent far too much time and stayed up far too late doing!

👇 Image Created with Dall-E
image.png
Separator-code.png

The first thing that I did was create a "Data Storage" structure for each of the game components. Each of the characters and their attributes need recording, along with each of the items that you can come across as well as where they all are in relation to the environment. I've also written the code to create all of these things to ensure that each game is different in enough ways to make the game something that you can return to.

Once I knew how to generate all of the characters and items and record their location in the apartments, I then moved on to storing this on the Blockchain. I'd already "proven the concept" of this in my last post and I have now been able to expand on its complexity, storing a JSON object which contains what I call the Gamestate - every item and their attributes which can be modified as the game progresses.

I've also generated a "Master Post" which stores all of the active games which will be used as the "Trigger" to start a new game. So a user can reply "{Play}" to my game post which will Trigger my code to generate the Gamestate and assuming that the user doesn't have an active game, generates a New Game Post, updates the Master Post and replies to their comment with their game location. I've included various checks and another level of complexity to make sure that only relevant comments are processed. If somebody replies to a {Play} comment to wish them luck (for example), this will be ignored.

Since I don't trust people not to cheat and knowing that this data is all available on the Blockchain (if you know where to look for it), all of the important Gamestate information is encrypted. Not that cheating will gain them much, the random elements could kill them anyway 😆

👇 Image Created with Dall-E
image.png
Separator-code.png

Next Steps

I think that's as far as I've got - in simple terms, I can create a new game on the blockchain from a simple trigger.

My next objective is to review the active games (from my Master Post) to see if they have received any new comments. These comments will need to be processed, the Gamestate updated, along with the Master post and a reply comment made. This is all similar to what I've had to do to get the initial game generated so I should be able to reuse a lot of the code I've already written.

Then it's the task of writing the text for each of my 44 Game Zones, taking each of the games' items' characteristics into account... one floor at a time...

Oh, and graphics. I should try to make it look pretty.

Footer-Top-green.png

As always, I appreciate your input so please share any thoughts that you have, along with any suggestions.

I'm especially interested in how I can upload an image to https://cdn.steemitimages.com that I can use in my posts / comments.

H2
H3
H4
3 columns
2 columns
1 column
10 Comments