2021-02-27

From Spreadsheet to Screentop via nanDECK

 I have an old card game project that has been languishing without attention for a few years with the working title Monster Invasion, which was a solitaire game (which I could probably make into a cooperative multiplayer game) that I used to enjoy playing back in the day. I recently decided to give it a look again and see what I can do with it, which gives me a perfect opportunity for me to demonstrate my current workflow for building a virtual prototype on Screentop.gg, a 2D virtual tabletop that I am learning to love, with the wonderful nanDECK for creating the card graphics.

I'm not going to go into every detail of how this all works, but hopefully will give you a few pointers if you want to work in this way.

The state of the game as I got back to it was a nanDECK script taking data from a CSV file. This was last worked on in 2017, and I've developed my way of working quite a lot since then (even ignoring the shift to virtual prototypes), so my first task was to update the data source. nanDECK is capable of drawing data directly from a Google spreadsheet, as long as the spreadsheet has been shared appropriately (there are details of how to do this in the nanDECK documentation), so I imported the dats, made a couple of tweaks, and shared as appropriate.

My card data in a Google spreadsheet, all ready to go.

If you can see the image of the spreadsheet above, there are probably a couple of things to draw your attention to or at least explain. At the top right is the number 55; this is calculated as the sum of the values in the "Quantity" column, and I find it helpful to have something like that for my reference as I make changes. At the bottom is a line for a card back and a set of nine "blank" cards; this is to help me later build a card image for import to Screentop.gg later on. When I am working with physical cards it is convenient to work in multiples of nine, which is a good number to print on a single A4 page, and coincides nicely with a standard deck size for manufacturing purposes if we get that far. On Screentop I find it convenient to have sets of 55 cards in a five-by-eleven grid, which allows me that same number of cards plus a slot to use as a card back which, if I pad appropriately with blanks, I can make always appear in the last slot of the image.

As an aside, a similar strategy works well for Tabletop Simulator, though typically you use the final slot for a "blanked out" card face. Tabletopia required individual images, which are also easy to set up using the same tool chain, but I'm not doing that today.

As you may know, nanDECK is a system for building cards (and other game components) using a scripting language that allows you to have huge amounts of control if you want it. There is a "visual" mode to the system that I have never spent any real time trying to use, and I gather that works well for some people, but I can't offer advice on this. 

OK, so the nanDECK script. I'm not going to show you the whole thing here, but can show you some of the bits that are relevant...

The first part of my nanDECK script.

A few comments on this first part of the script, assuming you can see the image above...

The first few lines are there primarily for when I want to output a printable PDF document, but an important point here is line 3, which defines 'DPI=140'. This defines the resolution, and thus the file size of the output. Normally for printing purposes you might want to work with about 300 DPI (dots per inch) to get a high quality output, but for virtual prototypes you may have file size limitations, and so may need to reduce the resolution. In the case of Screentop, the limit is an image size of 4096x4096 pixels, and to fit within that constraint I need to either reduce the resolution to about 140 DPI as I have done here, or go for a slightly higher resolution and make the output image a more square shape than I have done.

Line 9 is the link to my spreadsheet. nanDECK is smart enough to recognise that this jumble of characters is a Google spreadsheet ID and acts accordingly.

Lines 11 to 20 define icon images to associate with the letters I am using in the "icons" columns of my spreadsheet. 

Lines 22 and 23 (and the earlier line 6) are a habit I got into long ago of printing a version number onto prototype cards so I can tell that I am using the set of cards that I mean to use -- and this can be important with a game that I am iterating over and revising rapidly.

Then at the bottom I start off the definitions of the actual cards, using an IF structure to select options according to the "CardType" column in the spreadsheet.

After skipping a few lines, here's the end of the nanDECK script.

Towards the end you can see the card back being made by drawing a coloured rectangle at line 55. I have got into the habit of using two-colour radial gradients like this (with various colour mixes) for place-holder card backs, sometimes with text over the top if that seems appropriate. I find them sufficiently pleasing for minimal effort.

Finally, line 60 is where the magic happens, outputting a single image file for cards 1 to 55 (i.e. all of them), arranged in a grid 11 cards wide. 

So, if I validate and build this script, I end up with a nice image of all my cards...

And here we have the output of my script: a big image ready for upload.

So, on to the next tool in the chain: Screentop.gg...

Screentop is a bit of a work-in-progress at the moment, but it is very useful as it stands and is being actively developed and supported. I like it because it does enough for most of the projects I am working on, and is far less demanding on computer resources than its 3D cousins, and just about anyone can join a game from their web browser if I send them a link. On the other hand, there are a few odd quirks to get past. One of these scares off a lot of people: rather than having intricate GUI elements, several of the tasks you may want to do will require using the "bulk editing" system, which uses a programming language and you need to type code into a window to make your changes. Back on the positives though, there is very useful documentation, which provides bits of code that you can just copy and paste as appropriate for most situations, and this makes it potentially rather less scary than the likes of nanDECK.

The Beginner's Tutorial for Screentop takes you through the steps of creating a deck of playing cards, and you can simply follow that, substituting your personal deck image (as I have just created) instead of the sample one they provide.  The tutorial only uses the necessary cards from the image, but I usually make cards for everything, including the blank cards, which allows for more flexibility and cleverness later, which I will go into shortly.

So, just a few minutes of work and I have a pile of cards, some of which are blank...

Cards now up on Screentop.gg - ready to go!

So the game is more or less playable now in it's present state, though I need some way of tracking two scores: power and threat. I can do that by adding some tokens, adding a little score board and a couple of tokens, or using one of the built-in component types, a counter. Or doing the tracking offline with physical components too, I suppose. I can leave that as an exercise to the reader, as I wanted to just show one little extra thing.

The way Screentop handles graphical assets is that you can upload an image and then divide it into a certain number of rows and columns, which are then indexable sub-assets. This is useful for handling entire decks of cards together or potentially other components like custom dice. (Tabletop Simulator is similar in this respect.) In this case, what this means is that once you have set up a deck of cards (or similar set of components), you can, with just a few clicks, upload a replacement for the graphical asset and it will instantly update the cards.

So, if I want to change the background colour of the boss cards, that's one line in the nanDECK script, and replace the blank cards with a pointless message, that's a quick edit of the spreadsheet. A couple of clicks in nanDECK regenerates the graphic, which I can then upload.

Uploading a fresh asset in Screentop is really quick and easy

And, ta-da!...

An updated version of the game in just a couple of minutes.

This updated version is actually the same session as the one in the previous screenshot, having refreshed the page a few times -- this behaviour is brilliant, but doesn't seem to always work first time. A fresh session would (and did) update the cards straight away.

Anyway, now we're all in place, I can start looking at the game and decide what I want to do with it. Card updates will be absolutely trivial with the basics now in place, so we'll see what inspiration comes. 

I'm not sure how interesting or useful this sort of post is, but I guess if you found it really boring you won't have got to this point anyway. Thanks for reading!












2021-02-26

Possible Future Games of History Past?

One of the things I like doing other than designing and playing board games is reading about history -- albeit slowly; I am not a quick reader and I don't have the attention span to keep going for long periods. Over the last couple of years or so I've been mostly reading books about earlyish medieval England, mostly around the years roughly 900 to 1200 CE, but looking into some other periods as well.  Many of the stories and personalities I read about suggest subject matter for games, and I have a couple of ongoing projects based on these (see The Castle War and Ætheling Business), but I am slowly building up a list of historical things I would like to make games about and I thought I would mention a few of them here.

These are mostly thematic hooks that I would like to work with, and don't yet have more than the vaguest idea of how to implement them, but as I generally have more difficulty attaching a theme or setting to a mechanism than vice versa, so this seems a reasonable starting place, and a list I can go back to if I feel the need to work on something new.

So, some of these ideas, in no particular order... 

The coronation of Henry the Young King
Image taken from Wikimedia Commons, where they 
assert that it is public domain.

Henry, the Young King, son of Henry II of England, crowned as co-king during his father's lifetime, died before he was able to take over the kingdom in his own right. He was part of a failed rebellion against his father, and then ended up touring Europe, racking up eyewatering debt but being a superstar of the tournament scene. This tournament tour thing -- which were more about ritualised, "play" wars rather than the arena-based jousts of movies -- sounds like it could be something interesting to explore as a game, particularly centred around a glamorous young man and his exploits. Maybe players are in Henry's traveling retinue and trying to excel on the tournament field and stay in favour by not outshining their leader.

The town where I live, Wantage, is probably best known as the birthplace of the Saxon king Alfred the Great, but there was a period leading up to the mid-19th century when it was a notorious and wretched hive of scum and villainy. This period came to an end when the town was cleaned up by a priest, the Reverend W J Butler, who encouraged and oversaw a period of building and regeneration, and many of the finer buildings in the town are directly linked to him. I would love to make a game about this period of Wantage's history, but make it so that it is reasonably accessible to non-gamers -- it would be great if it could be sold at the local museum. I kind of feel that I want this to be a tile laying game of some sort.

Much further back in time, the Second Punic War was the one with Hannibal and his elephants rampaging around what is now Italy and causing problems for Rome. There were three major pitched battles fought on Italian soil, all historically won by Hannibal's forces, but he never quite managed to finish Rome off. In each of these battles, Rome fielded a fresh, full-strength army, while Hannibal had a dwindling portion of his original army, bolstered by whatever allies he had been able to rally to his cause. My plan is to make a game (probably a card game) where players compete over these three battles; the Rome player always starts at full strength, but the Hannibal player loses resources each time. If Rome wins any of the three battles, that player wins the game, so the aim is largely to make each of the earlier battles more costly for Hannibal than necessary.

Back to Saxon times, Æthelflæd was a daughter of Alfred the Great, who was married to the lord of Mercia, after whose death she continued to fight to reclaim her kingdom's lands from the occupying Danes, and alongside her brother, King Edward the Elder, made great progress in returning chunks of England to Anglo-Saxon control. One of the sources I have read tells of how Æthelflæd launched raids into the Danelaw to liberate relics of saints from the occupied areas in order to return them to safety, and that aspect of her story is one which appeals to me for making into a game. This could actually work as a solo challenge game, or maybe an asymmetric 2-player thing.

A few decades later, in the reign of Edgar the Peaceable, there was a period of monastic reform in England, where the various abbeys and monasteries were... strongly encouraged, shall we say?... to adopt the Rule of Benedict for their practices. One book I read on this period paints this as a case of the king promoting this in order to ensure that all the monks were praying in the "correct" way as part of a national defence policy. After all, what is the point of having swords and armour if you don't also have the favour of The Almighty? There has to be a game in that reform process, which sounds again like it might be a solo game, but I don't have any clear ideas yet here.

Finally, back to the mother of the aforementioned Young King, Eleanor of Aquitaine. This was a woman who was a Duchess in her own right for most of her life, married to the King of France, and then the King of England, went to the Holy Land on Crusade, had three of her sons crowned as kings (two reigned in their own right), spent 16 years imprisoned by her husband, who she survived, living on into her eighties, influencing European politics through her own actions and her offspring pretty much to the end. I don't have a clear idea of what part of her story to build a game around yet, but I'm thinking about it...

I have no idea what, if anything, I will do with these thoughts, but I am sure the list will grow longer. I am up for collaborating on some of them, if anyone I gel with fancies a try; and if someone beats me to making some of them, that is cool too. Ideas are just ideas, and useless until they are acted upon -- and these are only half ideas.

2021-02-19

Who delivered all the pies?

Following on from the "IDLEcon" game jam at the end of last year, Bez (of Yogi and Wibbell++ fame) organised another game jam, this time spread over a week, with more participants and a load of "live jamming" with various designers appearing on her Twitch stream to take part during that time.

If you are not familiar with game jams, they are events where game designers have a limited amount of time to create some sort of a game, typically with a set of constraints or requirements announced at the start of the period. I gather these are semi-regular occurrences in the videogame world, but seem to be becoming more popular in the tabletop sphere as well, especially with recent online collaboration capabilities getting so much more advanced and a lot of game designers being isolated due to Covid-19 measures.

The requirements this time were essentially for a game that could be played on a Twitch stream and include players interacting through the stream's chat channel, with regular players needing nothing more customised than a printed sheet (though it was OK for the stream host to need custom components) and games had to, at least, be suitable for 3 to 7 players. There was also a list of optional challenges that could be used to inspire designs, including pies, something nautical, dinosaurs, miming, and so on. 

Image of basic board map layout.
The first board image Rory shared with me for discussion.
If we were working in the same room, this would probably
have been scribbled on a bit of paper, but this is so much nicer.

Collaboration in this game jam was entirely optional, but it is a major attraction for me, and I was able to team up with Rory Muldoon, probably best known at the moment as the designer, artist and graphic designer of Skora, a recent release from Inside The Box. I had been getting to know Rory a little bit through Twitch stream chats, Twitter, and IDLEcon, and we were both keen to do something together, so had a chat over Discord to see what we could come up with.

We quickly realised that neither of us would be able to put in a vast amount of work on creating a game over the week due to other life commitments, so we would work on something with modest scope. From the prompts, we fixated on pies and nautical elements, and were soon talking about having a ship delivering pies to a chain of islands. This then developed into the idea of players voting for the course of a shared ship, and then making pies and selling them according to the demands of islanders along the way, recording decisions on a piece of paper while the voyage of the ship is tracked on a central board that everyone can see.

Over the next week we put bits of work in on the project as we were able, and had a couple of chats over Discord to play the work-in-progress. I put together a project on Screentop.gg to provide a board and a boat token which could then either be screen shared, or players could visit Screentop to watch the game directly. Rory designed the board using his magical skills and software, while I used a Google document to create the playsheet and written rules. 

Over the week the main change that was brought in was to introduce special abilities that you could buy when the result of the vote went against your choice, meaning that there are some additional choices to be made, and planning your preferred route and voting strategy started getting a little more interestiing.

Eventually, on the Saturday, we were able to play our newly minted game live on Bez's stream, with me joining on camera and Rory taking part from the chat. It went well, I think, but it turns out that managing voting in this sort of situation can be tricky. Still, we were very happy with how things went.

Image of Rob playing the game on stream with Bez
Playing the Nautical Pie Delivery Co. Ltd. game on
Bez's stream with Rory playing from the chat.

As a little bonus, I took part in an online board game session with some old friends that evening, and they agreed to play. The game didn't fall apart and seemed to provide a reasonable experience for seven of us on a Zoom call, though again the voting was a bit awkward. We could set up an online tool to allow for votes to be tallied, but I think that is a minor issue. 

I'm not sure what we will do with this game next. It works well for something that was quickly thrown together and not yet extensively tested, but obviously there are issues, largely related to numbers, to be looked at. I think the game could work well around a table, collecting and exchanging tokens rather than writing things down, or just sticking with the something-and-write system could go well too. I think we will be discussing this again and seeing what we fancy doing before too much longer. It was certainly fun to work on so far.



2021-02-04

I Want To Play With My Ætheling*

So, that game idea I talked about a few weeks back with the hunting accidents and the like, well it has developed a bit and I have built a playable prototype on Tabletopia. Then I decided to get some practice on other technology and now I have an upgraded prototype on Screentop as well.

The idea has filled out a bit. We have three "locations" -- I need a better name for these, but essentially they are places with things that are going on that nobles might go to: a hunting party, a feast or banquet, and a war. As a player you have four (currently -- it could easily be a different number) members of your "family", and play cards that send members of your, or your opponents', families to and from these three functions, or cause unfortunate incidents to occur at the functions (often killing off attendees). In various situations (like surviving attendance of a function) your family may get prestige, which counts towards victory at the end of the game, as does the "rank" of any family members who survive.

This is on Screentop.gg - solo playtesting a multiplayer card game
is a bit fiddly, but a heck of a lot easier than with a physical prototype.

If all of your family members are killed, that's you out of the game... sort of. Well, actually it isn't. The idea is that if you are knocked out, you get a bonus character, the papal legate, and you get to (secretly) predict who will win the game. If you are correct in your prediction, then you share victory with that player. The game then ends when the next family has their last scion dispatched.

I am pretty sure this arrangement will work best with four or more players, but we will see.

I'm enjoying how this already drifting away from its original mechanical and structural inspiration, Family Business. Most of the cards in the game are analogues of those in the older game, but are now taking into account the multiple sources of peril for the characters. Initial testing suggests that it works at least a bit, but I am concerned that this diffusion of the game might make it more unwieldy. We will see how it works over a few playtests.  

One thing I have already discovered is that my current card mix doesn't give the right dynamic in the game, and play tends to result in almost all of the nobles being moved to locations before anything much else happens.  This may not actually be a bad thing, but it did feel a little dull as it stands. 

In Family Business, there is the concept of a "mob war", which is triggered in a number of ways, including there being a sufficiently large number of mobsters on the "hit list", and when this happens, at least one mobster will die on every player's turn until the war is over. This is a really effective way of driving the game forward, but I feel I don't want to do that in this game, partly because, while I am OK with creating a game that borrows/steals a lot from another game, I don't want it to be a rip-off, but also very much because that doesn't really fit thematically. 

I don't yet have a solid idea for how to address the pacing and arc of the game, but I'm sure something will come that will make the game feel more of a thing in its own right.


* If you didn't know, Ætheling is the Anglo-Saxon name for a member of a royal family who was considered a valid choice to become king, back in times before formal lines of succession were established and monarchs were effectively elected by a council of nobles.