Unique challenges building my first crypto game

avatar

image.png

I just finished my first crypto game today. I am just doing some decisions on the math and some testing before I am ready to announce it.

I really enjoyed building this game as I ran across a lot of issues I had to solve.

The first is I don't do web development, I mean I know the basics, but I generally stay as far as I possible can from front end development. This posed a major problem for me to going ahead and building something, but surprisingly I made a lot of progress starting from zero in a very short period of time. I am very happy with how it came out.

One thing that was critical to this project was real-time UI. It wasn't required but I really wanted to do it as it makes the game a lot more interesting but it was the stumbling block for not finishing my first game. I decided to shift gears and start this project as it didn't depend on real-time UI so I could add it in as I went along but I ended up making every element of the game real-time giving a lot of experience for my next game.

Every little detail in the game has real-time elements. There are a ton of small details most people will likely never notice directly to make the experience better. There is a lot of ticking behind the scenes to provide real-time data and allow elements to react and handle input with intelligence. I'll be the first to admit the game isn't complex, it is in fact more of an idle game than an interactive one. I still wanted to go the extra mile to make the experience better.

One of the biggest hurdles is the main aspect of the game. It potentially can send thousands of transactions more than once per block if enough users are playing. I wanted to prepare for that situation from the start so it isn't an issue.

I am using Postgres database to handle daily transactions and submit payouts to the blockchain at midnight UTC daily. The biggest reason for this is the computational load of some of the functions. One particular function requires looking at Hive Engine API to find all holders of the APE token. While this is sub second while there are no holders of the token, profiling other tokens like STEM it can take as long as 8-10 seconds to get that list. Like I said earlier, there may be two or more of these transactions per block, that's 16-20 seconds of computation in 3 seconds worth of block time. This can add delays to the game when sometimes it is quick and sometimes there is a delay.

By maintaining the state of APE token holders in real-time I am able to do this update to hundreds or thousands of users in under a second.

Another concern to me was recovery and atomic transactions. I put a lot of the important logic in stored procedures so I can process all game transactions for a single block in one transaction. If for whatever reason the game engine has to restart, it pulls the last block processed in the database and starts one block later. Under no circumstances will any transactions in that block be partially completed. Either all transactions for that block are written to the db, or none. Restarting just kicks off where it was without any worry about duplicate transactions. This has the added benefit of making the error handling a lot easier, if there is any problem just restart.

I will be providing more information about the game really soon. I could literally launch it in 5 minutes from now if I really wanted to. There will be plenty of warning to get in on the game when it is ready. I will make an announcement and give people at least 24 hours to get prepared for opening hour.

image.png
    Never go full ape!

Posted Using LeoFinance Beta



0
0
0.000
59 comments
avatar

Really looking forward to it and thank you :-)

0
0
0.000
avatar

Great job and especially because you are not a developer and don’t like to code. I can relate because I know basics of coding but never got into the depth due to lack of interest. It is very difficult to write thousands of line of code and then debug and what not.

I am eager to see what you got!


Posted via proofofbrain.io

0
0
0.000
avatar

I've been coding since I was probably 12 years old. I don't do it as a full time job, so I usually need more time to figure things out. Web development though I have avoided like the plague. I hate it and I hate trying to make it work for every platform, but things have come a long way with frameworks like Vuejs.

0
0
0.000
avatar

What is your field of work if you don't mind me asking. I am a student at the moment not much tech related, I would like to know what would it be like if I try to jump the ship

0
0
0.000
avatar

Primarily, I work in Information Security. I want to close down my company as I mostly do crypto these days, luckily my business is 99% automated.

I've done Network Admin and PC Systems for most of my life.

0
0
0.000
avatar

So technically you already work in the it field. Now I became the ape🦧

0
0
0.000
avatar

Even though I am not a gamer, I am excited to see what you've put together.

I do have a vintage 1982 cocktail-version Pac Man machine, though (that my grandfather had in the break-room of his lithograph business, that he and I used to play together after the work was done, when I spent my summers working for him).

0
0
0.000
avatar

Since you used an image of someone trying to solve a Rubik's cube, that reminded me of the time my son solved a Rubik's cube blindfolded:

0
0
0.000
avatar

Check out this one, always blows my mind.

0
0
0.000
avatar

it took longer to count than to make the rubik's block.

0
0
0.000
avatar

That's impressive, I can't even solve one normally without removing the stickers

0
0
0.000
avatar

Lol, it's an old trick, the video was replayed backwards. He is actually messing up the cube whilst blindfolded. Which is why quite a few of the movements look unnatural.

Cg

0
0
0.000
avatar

What type of games it is gonna be?
!ALIVE

0
0
0.000
avatar

I'd say it's closest to an idle game.

0
0
0.000
avatar

I see. Will this Idle game give us profit also aka #play2earn, besides passing time?

0
0
0.000
avatar

The first is I don't do web development, I mean I know the basics, but I generally stay as far as I possible can from front end development. This posed a major problem for me to going ahead and building something, but surprisingly I made a lot of progress starting from zero in a very short period of time. I am very happy with how it came out.

Rate at which back-end devs pick up front end skills from scratch is something that will never cease to amaze me

0
0
0.000
avatar

It is only surpassed by their reluctancy to do it

0
0
0.000
avatar

I'm not even sure I'd call myself a backend dev. I just sort of build anything I need. Usually some sort of automation so I can avoid having to do something myself. I'm of the mindset there is no point of doing things I can have a computer do.

0
0
0.000
avatar

Iam not a Web developer too😂, n i got no idea how to do that. Let's c a real game looks like. Waiting....

0
0
0.000
avatar

Looking forward to setting more STEM on fire.

Thanks for building more use cases for STEM, my bag is feeling lighter already :)

0
0
0.000
avatar

Is it really a bag when you want to hold it?

0
0
0.000
avatar

Sort of, I like these kind of bags to turn into multi-bags.

0
0
0.000
avatar

Oh yes, the apes are coming!
Keen for this, hopefully will be able to make some funds ready to get started right away. Never knew you were working on a game but it's good you are mate.

0
0
0.000
avatar

Wow! Let us know if it has been done! ^_^

0
0
0.000
avatar

Electronic-terrorism, voice to skull and neuro monitoring on Hive and Steem. You can ignore this, but your going to wish you didnt soon. This is happening whether you believe it or not. https://ecency.com/fyrstikken/@fairandbalanced/i-am-the-only-motherfucker-on-the-internet-pointing-to-a-direct-source-for-voice-to-skull-electronic-terrorism

0
0
0.000
avatar

I gotta say, I was surprised how quickly you were able to put the whole thing together.

0
0
0.000
avatar

To be honest, I was too, I was expecting it to take a month and that was being generous I think.

0
0
0.000
avatar

This is exciting and I look forward to having this game live soon. Even the announcement of the game has shown an impact on stem price and I expect that post-game launch, will be way high. Any expected date of game launch?

0
0
0.000
avatar

Looking forward to launch, very interesting .

0
0
0.000
avatar

Cool stuff. I'd love to try this game out.

0
0
0.000
avatar

Blockchain games are still dry and soulless. User interaction, strategy and challenge can not be seen in them as seen in modern games. Most games are something like a casino or playing card! In fact, you pick everything up, sometimes you pay for the gas, and you leave the rest to the automatic code behind the scenes.

0
0
0.000
avatar

It's hard to build something fun when the soul purpose is to create money out of thin air.

0
0
0.000
avatar

Whoo hoo - well done on your progress, and although I know absolutely nothing about development, this sounds pretty impressive, especially your dev adaptability skills!

untitled.gif

Can't wait to see the final product, (Does happy ape dance in anticipation!)

0
0
0.000
avatar

image.png

I think your tools where build well, so even you are a BALLHEAD, then I recognize that your "ape game" might be good... since you are the opposite of what I want in the world, I will not be playing it.

By the way: YOUR BALLS ARE SHOWING!!

by the way 2: Thank you for selling me LASSECASH cheap, I like to have more of it, so thanks :) !!

image.png

0
0
0.000
avatar

Keep giving me your shit coin and I will keep selling it back to you. As long as it is over $0.000, it is overvalued.

0
0
0.000
avatar

hahaha

Dude you are brainwashed, earth is flat!

LasseCash are the only place in the world that reward truth content, so you are making a huge mistake by selling those tokens to me, its VERY VALUABLE! Ballhead! haaha

0
0
0.000
avatar

good work I am so looking forward to this! !PIZZA

0
0
0.000