🎮 Steemit City: Update

Hello again Game Lovers. Since my last update, I've spent a couple of days away to recharge my batteries and have some renewed energy for Steemit City.

One of the main difficulties that I'd faced whilst working on graphics was that I couldn't dynamically generate an image to upload to steemimages.com and segmenting an image into its components had gaps between each component due to a stylesheet class which set "line-height" equal to 150%. It was in the comments where @moecki had copied the 2 larger parts of the image above each other that we realised the problem occurred with shorter (lesser height) images.

So I experimented with image heights and whilst there was some variance across devices and whether the images were displayed as the main focus (e.g. a post or comment directly clicked on) or as sub-content (e.g. a comment underneath what you're looking at), a minimum image height of 30px looked like a safe size to use that wouldn't add any extra random spaces.

This has led me to create (and upload) 90 image components (so far) that will allow me to generate characters with random attributes. This only covers the green outlined "cards" so if I want to change the background for the zombie cards or different outlines for different characters, that's another 90+ images apiece (it's not as onerous as it sounds so the green background zombie versions will make a nice break from coding).

As an example, when you start a new game, you might be given the choice of which player to use:

{A}{B}{C}


















Whilst I do occasionally see the odd pixel line between images, it's random. Let's say it's insane. Because doing the same thing repeatedly and expecting different results is a sign of insanity. And I'm doing the same thing repeatedly.

There's plenty of flexibility here for me to add new character faces whenever I feel inclined to do so. At the moment, I have 9 fairly random faces included and should probably decide to include a consistent look to my characters.

Separator-code.png

It's not all been pretty pictures though.

I've also written the code to retrieve the game data from steemit.com and parse it to get my game map and game characters. As well as this, I've retrieved the player's most recent comments and filtered out the "noise" to get the most recent one related to the game. This will be used to determine the next set of options.

And I've got the accounts that I need to run the game created (2 accounts for different tasks).

Finally, to support the pretty pictures, I've created a function which takes the character's attributes and looks up the images required within their corresponding arrays - so it's all reusable and easy to maintain.

Separator-code.png

There's still a long way to go and I think I'm at the point of writing the various scenarios for each point on "the map".

Footer-Top-green.png

As always, I like to hear what you think of progress so far and any ideas of what will make you love it 🙂

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now