🎮 Text Based Games on Steemit

in Steem Dev2 years ago

Just a few days ago, I wrote a post about identity and within it, I alluded to the fact that the work I do contributes to my sense of "who I am". Despite the fact that raising a family is the most important job I'll ever have, it's not even remotely challenging on an intellectual level. There's also the issue of not wanting to work for somebody else!

👇 Source
image.png
Separator-code.png

In the comments, @o1eh said:

I would try to create my own business based on the Steem blockchain.

I pondered this for much longer than I should have.

I don't know a lot about blockchain technology although I do find it interesting. I learnt about Solidity and building smart contracts on the Ethereum blockchain which got me wondering about Steem's actual blockchain. Not the Condenser based steemit.com interface nor the steemit API but how I can publish directly onto the blockchain. Is this possible? Where would I start if I wanted to do this? Comments from people who understand this would be greatly appreciated!

Having parked that idea for now, I thought about games. In my younger days, I wrote a fairly simple yet highly addictive website for Connect 4 (some might know it as 4-in-a-row). It was too popular and crashed my free hosting before I'd figured out how to monetise it so I binned it off. This highlights to me that the idea doesn't need to be particularly sexy to be popular.

I also know how to publish and interact with content from outside of Steemit and have explored some of the possibilities This biggest challenge is that most game ideas (including the aforementioned Connect 4) require some kind of "secrecy" (i.e. one player not knowing what the other player is doing) and without capturing a user's key, I've got no way of validating that the correct person is seeing the correct thing.

I don't really want to start using user's keys, although @stmpak.wit recently shared this post with me which would use the less risky memo key for validation. I don't want to go down this route yet though so stepped away and let my subconscious think for a while.

👇 Source
image.png
Separator-code.png

Text Based Games

Fortunately, my subconscious is much smarter than me and returned to games and books from my childhood - which is where the idea (that I'm not going to share with you yet) came from. In book format, it was extremely immersive and I see little reason for it not to translate well to Steemit.

It also reminded me of a game that I played on an old BBC computer called "Tea Shop"...

👆 Source

I was really young when I played this but can still remember that you can sell a lot more tea on hot days.

I digress. The game concept is quite simple really - the user makes a decision and the game responds to that decision.

👇 Source
image.png
Separator-code.png

Proof of Concept

I've probably given you a few hints as to what I'm thinking...

As with most things that I code, I like to produce a Proof of Concept first so that I know each component will work before piecing it together and adding detail.

I'll need to run some code on my own server which will need to respond to a user input - in my case, a comment posted on Steemit by the "Game Player". I've not proven this part yet but it's next on my to-do list.

I'll need to record the player's "Game State" which I'll also need to retrieve and update. I've been able to do this surprisingly easily and Steemit's a surprisingly good tool for storing, retrieving and updating data, especially when there's nothing of any sensitivity.

Of course, I'll also need to write the game itself so that the user's choices actually do something. I've achieved this too and started to introduce plenty of random factors so that each iteration of the game can end differently.

So good progress already and the bulk of my time will be spent writing the various game scenarios to ensure that it's not too repetitive and not too easy or difficult. I could even add some pictures to liven things up.

I've also thought about how each Steemit user's profile (posts, comments, STEEM Power, etc.) can be integrated into the game.

I've even thought about how to continually increase the complexity of the idea and push what Steemit's API is capable of achieving but I'm far too far ahead of myself here - you might all think that the game's rubbish and I'll never step foot into this world again.

Footer-Top-green.png

So before I get too deep into this, has anybody written a text based game on Steemit before - one that's interacted with solely through your blog and if so, can you point me to it please?

I've also thought that if somebody completes the game, there should be a reward in the form of a decent upvote (constraints will apply to prevent abuse of this) and (as I'm ye of little power at the moment) I welcome thoughts on how this could be achieved. Although if the game's good enough, this incentive might be little more than an added bonus.
Sort:  
 2 years ago 

These are questions I have asked myself a few times. However, I am not as advanced as you :-)

I also think that the blockchain itself would be very well suited for this. The problem of secrecy has also bothered me a lot so far.
In my view, the "added value" of such a game would not be the implementation on a blockchain alone, but the combination with voting, in other words, a reward. For this, however, the interaction in the game must be prepared in such a way that it fits into the post/comment system and could be displayed meaningfully on Steemit or other frontends...

The conclusion of my reflections is that it is the idea of the game that matters. The technical implementation is then (probably) only a formality. In any case, these are my thoughts so far.

 2 years ago 

I've mapped out how "Level 1" of the game will work and initially, it'll be a single player game, although I have thought of some amusing side-stories that could add a bit of melee style fun 🙂

I didn't really pay attention to drugwars but I could imagine the voting working in a similar way. Also the story could work as interactive comments. You "Start" the game, and receive a reply with the initial scenario. This might be in the form of a new post per game and if you complete the level, you receive the liquid rewards from that post. If you fail - you don't and have the opportunity to start again.

So many idea jumping around my head. I need to get a draft up and running before fleshing out the story. The story's going to be the hardest bit because the temptation is to say "you're in a room, do you want to (A) go out of the door or (B) jump out of the window". "B". "You were on the 22nd floor and fell to your death".

Why not i say, i will leave the tech stuff to you though lol

Games on Steemit could be an opening to getting new users on the blockchain.

 2 years ago 

Are you sure that you can't help with a bit of coding?

My target audience to start with is the existing Steemit userbase but there's no reason why in the future, some of my ideas can't become standalone websites too. Especially my FPL integration idea - it could change the way people think about FPL 🙂

I could be a tester

 2 years ago 

I might just take you up on that! 👍

There are many people who enjoy gaming and that is something that attracts people. I have no idea how difficult to write a program for games, but that always fascinated me.

 2 years ago 

I'm excited to see how popular it is. I've put a huge amount of thought into it today so hopefully it won't take me too long to write everything 🙂

 2 years ago 

Don't have time to read the full article atm, but a few years ago, Eric S. Raymond made an open source version of the classic game, Colossal Cave Adventure. I have often thought that it would be a fun project to connect that up with a bot on Steem.

 2 years ago 

It's been a long time since I've done anything in C - unless that awful objective-C thing that iPhone apps needed to use! It's interesting to see so many "goto" commands in the code. That was the first thing that my school IT teacher drummed into us - don't use "goto". I have no idea how you'd go about integrating that into a Steem bot!

It's definitely along the lines of what I was thinking - I'm not sure my game will reach that level of complexity although my new plan as of today is to release 1 level at a time. Like Candy Crush do 😆

 2 years ago 

That was the first thing that my school IT teacher drummed into us - don't use "goto".

I didn't learn this until college. And I resisted it for a while. But yeah, "goto" seems strange to me now, too.

I think the original Collosal Cave code was written in the '60s or '70s (I'm pretty sure I was playing it on a Honeywell mainframe and family member's teletype & dial-up modem by the late '70s), so ESR probably just brought the GOTOs forward from the original.

AoE or nothing… 😂
Go ahead - I love Text based games and… braingym… Scrabble or something… 😉

 2 years ago 

I could maybe do a AoE in text. Although it might be a little bit complicated!

I looked at the last scrabble board and found nothing 😟

I'll remind you about AoE in due course, because I feel kind of left out at a football game... 😂

Scrabble is in its final throes, the letters have been atrocious the past two rounds. Get back in the next match, there'll be more options again.... 😁

 2 years ago 

I shall try 🙂

A little bit of "entertainment" is always good!
It reminds me of when we still had our business and our worst business enemy was Property24 (Media 24 or Naspers).
For a bit of entertainment I asked our developers to develop a game that we could play. They created a game of 24 pigs flying over your screen, and you then had to shoot them. It was hilarious and enjoyed by all. Believe it or not, it resulted in better work performance.
Anyway, I made a big poster (3m x 2m) of the game and hung it in our boardroom. Then one day we got a visit from P24. They came to us with a business proposal. Well... I cleanly forgot to take the poster down. Now, I don't know if they noticed it or if, out of courtesy, they kept quiet. Maybe in their minds, they played along. (•ิ‿•ิ)

 2 years ago 

If the pigs looked like their employees, then I'm pretty sure they noticed 😉

The web agency I worked at did similar with a Christmas card one year. I can't remember if you had to shoot santa out of the sky (with snowballs) or any of the details but it was fun.

My game will be nothing like that 🤣

My game will be nothing like that

I'll be watching you with a keen eye. (•ิ‿•ิ)

 2 years ago 

Not the Condenser based steemit.com interface nor the steemit API but how I can publish directly onto the blockchain. Is this possible? Where would I start if I wanted to do this? Comments from people who understand this would be greatly appreciated!

I might be wrong, but my understanding is that the most common alternative to using the Steemit API would be to set up your own node and connect to the blockchain through your own API on your own node. The best reference I've seen for setting up a node is the series by @rexthetech. That link goes to the last post, which has links to the entire series near the end.

This isn't all bad 'cause you could also bring in revenue as a witness.

One other piece is that you'd probably want your own hivemind server, eventually, which you would interact with using standard SQL, but I don't know much else about that. AFAIK, there are no public hivemind servers (or if there are, I haven't learned of them).

steemd also comes with a cli_wallet, but I can't imagine that you'd want to use that for any sort of programmatic interface.

 2 years ago 

This isn't all bad 'cause you could also bring in revenue as a witness.

I've heard that for most people, the costs far exceed the revenue (until they reach the top 20). I've considered setting up a node but I don't trust myself to lose interest 😆

I heard about Hivemind in some of the old Steemit interview videos and it sounded like something worth looking into. When I tried to learn more about it though, I hit a dead end fairly quickly. It's as though it's a mythical thing that disappeared with the old Steemit team.

 2 years ago 

I've heard that for most people, the costs far exceed the revenue (until they reach the top 20).

That's my understanding, too. For this scenario, the witness would definitely be secondary to having a local API.

Hivemind setup info is here - https://developers.steem.io/tutorials-recipes/using-hivemind. I've never done anything with it, though, because I assume the storage cost would be fairly high.

 2 years ago 

I think it's gonna take me a while to get my head around all of this and thanks for being my fount of all knowledge.

Not the Condenser based steemit.com interface nor the steemit API but how I can publish directly onto the blockchain. Is this possible?

The API has code for constructing transactions and broadcasting them to the blockchain. Is there a reason you wouldn't want to use that?

So before I get too deep into this, has anybody written a text based game on Steemit before - one that's interacted with solely through your blog and if so, can you point me to it please?

Well, they were done manually rather than with software and written on-the-fly in reaction to the chosen prompt rather than pre-written, but years ago I participated in some choose-your-own-adventure-esque acitivities that someone ran as a series of posts:

The Cave (an interactive rhyming adventure)

The Island: (interactive rhyming adventure)

(Unfortunately I think the user turned his account over to a spammer at some point after doing these)

As I was hunting through my old posts to try to find a link to that, I came across this old post of mine: Pick four sentences: a simple creative writing game and it occurred to me that somebody could turn that into a Steem activity (find some way to query public domain books to generate the four random sentences, provide a UI for writing the story around them). It's more of a creative writing exercise than what most people would consider a game, but that's not necessarily a bad thing.

 2 years ago 

The API has code for constructing transactions and broadcasting them to the blockchain. Is there a reason you wouldn't want to use that?

It's more curiosity about what the blockchain itself is capable of which might inspire a different idea of how I can interact with it (rather than as a blogging platform).

My current plan is to use the existing brodcast functionality with data stored in the meta data of a post which I'll retrieve, manipulate, save and then broadcast a response. No doubt with huge timing and scaling problems along the way.

Pick four sentences: a simple creative writing game and it occurred to me that somebody could turn that into a Steem activity (find some way to query public domain books to generate the four random sentences, provide a UI for writing the story around them).

You could probably get ChatGPT to generate that for you these days - it could probably also generate the story too but that would ruin the fun somewhat.

I had no doubt that you would come up with something spectacular👍. There are no games on Steemit yet. This is something new and very necessary for this area. And yes, I love games too.

Perhaps instead of voting, you can think of a game where there would be its own economy and players would have to pay symbolic contributions, and the winner would take everything. Or something like that.

I would like you as a developer to get some profit from the game. This would ensure that you would not lose interest in the further development of the game and your lost time would not look wasted in the eyes of your wife😈.

Anyway, I want to play🎮.

 2 years ago 

Players can make money by winning matches (via the reward pool). I can make money by setting up the matches and having a player transfer market. Users can upgrade their squads to increase their chances of winning matches and at the end of each "season" (which might not be a full calendar season), the champion takes the liquid STEEM accumulated over the season. All stored, managed and run through the blockchain but automated via code that I run (after each Gameweek deadline). Once the league's full, I can auto-generate another division. You get 1 "outgoing challenge" each Gameweek for free. If you want to make more challenges (and therefore play more games and increase the opportunity to win more rewards), you purchase more games (up to a specified limit).

Somebody could buy their way to the title but... people won't want to challenge them so it's not guaranteed. Plus - it's based upon real world events so upsets are possible and there'll be a maximum squad size.

I love the idea. I want to write it now but I need to sleep!!

It's really brilliant. I've been dreaming of playing something like this for a long time. I even tried Sorare, but the prices are too high. With STEEM, everything will be much more accessible and interesting.

I look forward to your development. Only, I don't understand how users will receive rewards from the reward pool?

 2 years ago 

Only, I don't understand how users will receive rewards from the reward pool?

It will rely upon people upvoting posts but if there are 16 fixtures, or 16 users playing in a round of matches, then you'd expect all 16 to upvote the post + other supporters of the initiative. Then that post's liquid rewards could be split equally between everybody who won their match.

It's similar to Sorare in some respects although every player will be unique and if somebody's willing to pay over the odds, you can't prevent them from buying your man. E.g. Salah starts at £13m - which could be a STEEM value of 13. There will always be a release clause of x% more (let's say 50%) so somebody could buy him for 20.5 STEEM and you can't stop it. His value then increases to 20.5 STEEM and to buy him back, it'll cost you 30.75 STEEM, etc. So players have potential to earn STEEM through transfers if there's a particularly wealthy player - or a successful player that wants to reinvest their winnings.

I've got a few more ideas and I think I'll aim to get it developed and tested throughout the 2023/24 season with a view to releasing it for 2024/25.

Understand. It is necessary to make a correction for the avarice and inactivity of people. But in general, everything looks flawless. Looking forward to the game :)

 2 years ago 

Perhaps instead of voting, you can think of a game where there would be its own economy and players would have to pay symbolic contributions, and the winner would take everything. Or something like that.

I’ll reply properly tomorrow but my brain’s keeping me awake because it’s excited about an idea along these lines - combining an element of FPL into it with player transfers. A combination of what the Premier League and La Liga fantasy does, but unique to Steemit.

It could be genius…

🤗

What you think login in to steemchat web via memo key is not good ?

as you know we are totally avoiding to use private posting key to login

memo keys is just for verifying that user is real or not

 2 years ago 

I think the idea of using the memo key is a good one.

I don't know what the risk is if the private memo key gets stolen though!

we are not storing keys in our DATABASE i can show this publicly

memo key is the small part of identification this user is steemian or not

Once again thankyou to showing your interest

Your @blockseater

Coin Marketplace

STEEM 0.20
TRX 0.25
JST 0.038
BTC 96656.73
ETH 3341.70
USDT 1.00
SBD 3.20