On Game Design motivation

There’s been quite a bit of progress on my game engine since the last time I posted about it. I now have playable cards, building placement, effect automation, ability to manipulate elements on a hex map and a research pile. All in all, it has taken me approximately 35 hours to reach this stage which feels pretty decent for someone who’s never used Godot or built a video-game from scratch before, but I think a lot has to do with my time building card game plugins in OCTGN.

I even created a Godot demo on how to merge hexagons into tilemaps, which is the question I was asking last time ๐Ÿ™‚

Unfortunately, while my coding has already caught up to the rudimentary design I had drafted, I feel like I’ve been procrastinating from furthering the existing design by losing myself into the code. I even started making Unit Tests rather than progress the game’s design.

Funnily enough, I initially thought that the game design would be the easy part, and actually making the engine to run it, was going to be overwhelming. However now that my basic code has provided me a platform to create fast iterations on design (which is why I wanted to start with the engine before I has a working prototype), I find that when I’m going back to complete the design game, I find that overwhelming.

I have to make it interesting? And exciting? And variable?” Uuuuugh! Can’t I just code existing mechanics instead? At least then I have a tangible goal and I’ll know when I’ve achieved it.

My stupid internal monologue

I’ve always been much better at expanding what was already there than making something from scratch, and it is a “muscle” I’ve never trained before. It will take me a while before I’m not instinctively afraid of the amount of work I have to do. That’s my main procrastination trigger.

I have to keep reminding myself: I do have experience in game design, did tons playtest organizing, got ~25 years of boardgame experience, and now I know enough of a video game engine to perform game design iterations at a speed others can’t match. This is doable for me, damnit!

And yet, every time I open my design document, my brain tries to run out of my head.

Anyway, here’s a random screenshot.

So I started making a game

Oof, update frequency here has decreased dramatically hasn’t it? Oh well, I blame the new social media taking over how we consume updates. Also, I haven’t felt the urge to keep waxing politically lately as most I can think off in that regard are rants and nihilism.

Nevertheless, I do have something new I’m doing, which is that I started using The Godot Engine to finally create The Game I Always Wanted To Play But Nobody Would Make (TM).

Initially I was looking at using pygame since Python is the only language I feel comfortable enough to use for something as complex as that, but my first foray into documentation and examples was a complete disaster. Most the code samples in the pygame repository I tried, led to dead links and the documentation was difficult to get into.

I then left things simmer for a while until I run into Solar Settlers which is surprisingly similar to the concept I have in my head and that kickstarted my drive to continue development as it showed I could do a very minimalist game and still achieve the gameplay I wanted. I checked with the author who pointed me to Unity, which unfortunately does not support python. Howevever I was lucky enough that one of my searches on using python with Unity brought me to Godot and it was “love at first sight”.

You see, Godot is like Unity, but, very importantly, using an Open Source licence (MIT) and its scripting engine, while not python, uses exactly the same syntax and has lot of the same methods. This should theoretically allow me to get a much better running start than having to also learn C# to work with Unity.

So I’ve started doing this on my free time lately, following the great step-by-step tutorials to get me into how Godot handles things, and past few days I’ve started creating a basic setup for me to test and iterate the game rules, without having to use Pen&Paper.

And the speed by which I’m able to do things now has been amazing! I got me a hex map, and a card-drawing mechanism already! It may look like absolute shite, but it’s there ๐Ÿ™‚

Things really do feel overwhelming when starting something like this from scratch. I have almost no idea what the hell I’m doing most of the time and I just keep hacking at it until things eventually work. It would be even worse if I at least didn’t have python knowledge already. Hopefully my motivation will last longer than my patience ๐Ÿ˜€

Also, if anyone wants to help me implement this hex guide into Godot (because I have no idea how to connect the two), lemme know. I could use all the help I can get!

Epic Pythonista

A random google search pointed me to this, which is kinda cute ๐Ÿ™‚

Divided by Zer0 is an epic Pythonista (one of the 4% most active Python users) who spends a lot of time commenting on issues between pushes. Divided is a fulltime hacker who works best in the morning (around 11 am).

Android: Netrunner on OCTGN really picking up speed

I haven’t been blogging much lately because my interest has been mostly consumed in my development of the Android:Netrunner OCTGN game definition and its peripheral activities, mainly casting games, streaming, promoting and of course playing it ๐Ÿ™‚

Just recently we finished the biggest tournament in the world with 128 international participants playing over almost 3 months (1 matchup per week), and as part of promoting the event and the game, I took to casting the matches so that we can later post them online for other to watch. Many many cumulative hours of recording later, and I’ve created a youtube playlist of a significant number of the top matches from the tournament, mostly casted by yours truly, along with my personal NBN of co-casters and video editors. Take a peek if you want ๐Ÿ˜‰

Not only that,but once the tournament was about to finish, I decided to take it even further and livestream the final four matches, just to bring some extra excitement. About 20 people tuned in to watch the final matches and we had quite a bit of commentary and all around fun. Take a look how it turned out.

But other than that, I now regularly stream my games online as I play them, just so that I may raise interest in this great game and also inspire others to do the same. And in fact I’m glad to say it has worked brilliantly. Already we have almost half a dozen players who stream their games regularly, and we even had some cultural complaints about the practice. All this is great news, as it shows a healthy community that will only keep getting larger and more active.

And we already have plans for new leagues and tournaments and people keep inventing more ways to enjoy this game and spead the joy around. The more interest all these generate, the better the actual game will do in sales, which is just great for everyone involved. The future looks bright!

PS: Feel free to follow me on twitch.tv or youtube. My games might not be as well commented or edited as some others, but I make up for it in quantity. ๐Ÿ™‚

Star Wars: The Card Game LCG on OCTGN

SW:LCG BoxFor the last month or so, I’ve been feverishly working on a OCTGN Plugin for Star Wars: The Card Game, by Fantasy Flight Games and I’ve finally released a polished version that I’m comfortable sharing with the world. So it’s now time to share the news and help people get started in the usual way.

So, Star Wars: The Card Game, is a “Living Card Game” release, much like Android:Netrunner or Warhamer:Invasion and it’s obvious on which theme it’s based on. The game has only gone out to stores this week if I am not mistaken so it’s brand new.

As a game, it is a somewhat asymmetric game, where each side (Light or Dark) has slightly different victory conditions, albeit their core gameplay does not differ all that much. Most of the differentiation happens in the kind of effects each Affiliation focuses on, much like the colours of Magic:The Gathering. I won’t go into much detail here as I’m sure you can find a lot of reviews online if you happen to need them.

I’ve played a dozen games or so by now, and I’m quite liking it. It may not be as deep or thematic as Android:Netrunner, but it has a lot of tough decisions to make and it’s the kind of game that you canot not see its depth of strategy from reading the rulebook and the spoilers, but rather you need to actually get down to the table and get your hands dirty. Even though I seem to completely suck at it (I’ve won 2 games only), it does show a lot of promise.

Game at v1.0.0

So for anyone interested in trying it out, you can now use my polished OCTGN plugin to do so.

EDIT @ 02/07/2013 : I’ve moved the installation instructions on to the dedicated page for this game definition. Please follow the step-by-step installation instructions for Star Wars: The Card Game there.

Once everything is set up, you need to find someone to play with. You can go to the Host/Join tab to see if anyone has a game waiting. If nobody does, host your own and put in the title that you’re a new player.

Once you find someone, one of you hosts and game and the other joins. Leave the two-sided checkbox checked and once the game is started, load your starter decks. Things should be fairly intuitive but keep in mind these basic things in relation to the OCTGN engine plugin.

  • First thing you do after you load a deck is Setup (Ctrl+Shift+S). This will check if your version is up to date, show you the Message of the Day, and also give you some Tips on playing the game.
  • The setup will put 4 objectives in your hand. You need to select one to put to the bottom of your deck. Once you’ve decided which one, simply mouse over it and press “Del”. Now that you have just three objectives in your hand, press Ctrl+Shift+S once more to place them on the table
  • Wait until your opponent has placed their objectives on the table as well and communicate if any of you wants to take a Mulligan. If not, then double-click on your objectives to reveal them and start the game.
  • To move from Phase to Phase and to start/end your turn, simply press Ctrl+Enter. This will automatically trigger any card effects that happen after that phase.
  • To attack an objective, target it and press Ctrl+A (or use the context menu on the table). Now you can assign attackers/defenders.
  • Most actions that you want to do, you can do by double-clicking on a card. The game will intuitively understand what you most likely want to achieve and do it. If you’re in an engagement, double-clicking on a non-participating unit will make it participate (turn it 90 degrees sideways). If a unit is participating, double clicking with it will perform a strike. If you’re trying to pay for a card, double clicking on a resource generating card will focus it to generate resources and so on. Double-Click is your friend.
  • If a card needs a target for its ability, simply use shift+click to target another card before you use it. Shift+Click again to clear a target.

I’ve made a video on how to play. It’s a bit outdated now that the new version is out, but I’ll update it in the near future


Android:Netrunner plugin now available for OCTGN

You can now play the game while you’re waiting for it to be released in the stores ๐Ÿ˜‰

Yesterday night I finally managed to release the first working version of my Android:Netrunner plugin for OCTGN. The plugin came out so quickly because it’s a direct port of my Netrunner plugin, which is already at a very polished level. All I had to do this time was fork the code, carefully search and replace the various keywords and work on making the basic scripts (setup table, play card from hand, trash card, start/end turn) work with the new card properties.

I am very thankful to the people online who came forward to provide censored scans or cards and other paraphernalia, xml exports and even the image for my new table board. Thanks a lot everyone, you know who you are. I would never have done it so quickly without you.

And I’m still not done of course. I’m merely warming up in fact. There’s at least 2 more days of frantic coding ahead of me, so that I can bring the core set and the game to the same level of polish as the original netrunner. I need to put in all the scripts for the cards, tweak and bugfix the existing code (although there’s far less script crashes than I expected) and then, finally I can relax by starting to play Guild Wars 2 which will have just come up.

In fact GW2 should already be active for me, since I pre-purchased, but it’s just my luck that I’m working on the weekend. But even if I weren’t, I don’t think I would even try to play without getting ANR finished. I’m far too dedicated to it to stop now.

It’s actually weird just how much I’ve been hooked to coding for this card game. I haven’t even checked my RSS feed, of which the priority items only are already ~500. That’s going to be a PITA to get though.Worth it though.

Anyway, at the moment, anyone can download the basic first version as well as the required markers. One can also download the first set, in its censored version. You can find all the links in the forum.

Why is the first set censored you ask? Well from what people tell me, FFG, the creators of Android:Netrunner have this unwritten policy that they allow online versions of their LCGs, as long as the cards text is censored in some way for the first six months a set is out. Apparently they are likely to send you a nastygram or an outright DMCA request to your host if you don’t abide by this. I have no idea how true this is, as I’ve only heard it third hand, but there you have it.

Because of this, I’ve avoided uploading an uncensored set to my website as I’ve done with all my other CCGs, as I may wake up one morning with my site (or Google account, had I used google drive) taken down. I also didn’t upload the censored version because of the same concerns, given that this is, again all third hand knowledge.

To tell the truth, this whole policy is not only unnecesarry, but also counter-productive. From my experience, most people play card games online when there’s absolutely no other option (and maybe not even then). I’ve yet to see anyone who does it because they’re too cheap. This doubly goes for LCGs which do not have the collectible aspect and thus I can guarantee you that 95% of the people playing have bought the cards. If anything, having an online version is helpful as it increases exposure to the game, and it allows people to check it out and see if they like before they buy. It will absolutely boost sales, particularly with the price ranges of LCGs.

With Android:Netrunner, it’s makes even more sense to allow the uncensored cards at this moment. The game is not even out. Excitement is running out and letting people play a version online (which is never as fun as playing the actual game) can create more buzz and talk about your game. But because of this misguided overall policy of FFG, I’m afraid to do so, as it might lead to action against me. For doing something nice for others and FFG no less. But these are the pains of our culture of permission and intellectual lockdown. Company policies are just as often driven by their legal department, rather than what makes business sense.

But enough about that. Now is the time to grab the OCTGN plugin, a friend and give the whole thing a whirl. And remember, the version you play now is about 10 times worse than the final one I’m going to be releasing in a day or two. So even if you’re not impressed with it currently, check back again when the automations are in place and see what you think then.

The rigors of OCTGN development

Developing in OCTGN is like drinking pure lemon juice every 5 minutes. Lemon juice LACED WITH CRACK!

I must have spent 16 hours a day on the weekend coding my netrunner plugin and yesterday I stayed until 5am coding the latest features. I don’t know why, but this kind of thing is addicting to me. I just can’t tear away from my computer while my code is still not working. If I don’t get to a working state, I won’t go to bed. And given the sorry state of the OCTGN debugger, something that I think will have fixed in 20 minutes, ends up taking 1.5 hours. Of course my wife is none too impressed by this, since I end up telling her that I’ll be going to bed “soon” and when I get there, it’s not even in the same timezone as “soon”.

WTF is this shit?!

And speaking ofย  a debugger, can I rant about the one, or rather lack of one in OCTGN 3 for a moment? Dear gawds I want to rip someone’s head out at times. It is so bad that the only thing I get is a python syntax check when I try to install a new version of the plugin, and even then, when it finds unexpected sytax (eg, a missing closing parenthesis, a bad indentation etc) it will report the correct issue, but then point to the wrong line of code! You can see that in the screenshot on the right, where I removed a colon after a loop opened, so it got confused by the line break. It then reported a line 30 lines above it! it seems that the more deep in the code the error is, the larger the offset of the line reported. This makes finding syntax errors an absolute pain in the cohones. But this is nowhere near as bad as how non-existent runtime debugging is.

If an error appears during runtime (e.g. trying to read a variable that doesn’t exist, like a typo), the only thing I get is a python aborting error that mentions the very first function I called in OCTGN. So if I have a complex structure where the first function can call upwards of 20 others, included nested calls etc, then imagine one script failing with this error. There is absolutely no clue where to begin looking! I used to have to manually enter short pop-up windows in the code, that would inform me where I’m at in the code, so that I can begin to even track the issue. Tracking a small case-sensitive typo could take from 5 to 20 minutes, depending on how much code I wrote in between. Now? I’ve written my own “soft” debugger inside the python script, which accepts levels of verbosity and spits out messages such as which function I am entering/leaving, and what the result of regex commands are. It’s not perfect, but at least it narrows down my search considerably, and I don’t have to repackage the plugin just to insert some error tracking code.

Why would I repackage the whole plugin to test a line of code, you ask? Fool! A sane development environment of course provides some way to alter code on the fly, not to mention a runtime debugger. But OCTGN is no same development environment. If anything, it’s actively taxing your sanity as you spend 10 minutes for the 1000th time, trying to track which of the 10 variables in a function failed to receive a value somewhere. But if that wasn’t enough, the lack of a way to modify your code while in the game, means that the only way to make small changes in order to try and fix issues is to:

  1. Exit the game you’re currently in.
  2. Make your changes in the python code and save the file.
  3. This is what you get if you try to install a new version of a plugin with the same filename as the previous version.

    Re-add the python file into your .o8g file (a simply .zip, renamed). I use 7zip’s handy function to remember the previous names of files you’ve compressed into, so I just select the relevant directory, “compress to” and then select the name. So it adds and replaces to the existing .o8s files with the same name in the current directory. But make sure the .o8g file you’re putting it into does not have the same name as the .o8g file you used last time! Since OCTGN always keeps the current plugin files open in the system, if you try to reinstall a file with the same name, it will fail. So what I do is keep two .o8g in the folder, Netrunner-OCTGN.o8g and Netrunner-OCTGNa.o8g, and every time add the latest changes to the other one.

  4. Go to the Game tab.
  5. Select “Install Game”.
  6. Find your new .o8g file and select it. This takes 2 extra clicks for me since for some reason Windows 7 or OCTGN, I don’t know which, refuses to remember the name of the previous directory I was in last time I installed a game.
  7. Press OK to install it. Hope you didn’t miss any syntax errors. If you did, you have to close the almost-useless error pointer, go back, fix the issue, and then start from step 2 again. But THIS time you have to use the same .o8g name you just used, as it didn’t actually install it, so it’s still using the old one. Make sure you remember that info, because this shit’s written nowhere…
  8. If you had no syntax errors, then it will allow the plugin to be updated after a confirmation dialogue (extra click there.)
  9. Once your plugin is updated, reinstall the sets, if I’ve made any changes to the autoscripts of the cards. Fortunately, those don’t lock the files, so I can re-use the same filenames and don’t have to keep track of which file I installed last time.
  10. OCTGN randomly decided to keep one file open. Why OCTGN? Whhhhhy?

    However, sometimes OCTGN will decide to keep one of your set files open anyway, usually because you looked at one of those cards last (although OCTGN is using an internal DB now). In case you see those lovely red errors when installing the sets, the quickest way to fix it is to restart OCTGN, including logging-in again. Mmmm, I loves me some time wasters…

  11. Go to the game Host/Join tab.
  12. Click “Host” to start a game lobby.
  13. Select the Game you will play from the list.
  14. Provide a lobby name (or click OK to accept the previous one.)
  15. Press Start.
  16. Wait 5 – 10 seconds for the board to load.
  17. Load my debugger (which I’ve conveniently coded so that it spawns 6 cards with abilities I’d like to check and the environment to use them in. In the past I had to always load a deck, use the Setup function, and then fish for the cards I wanted to check.)
  18. Test the new code.

My now I’ve gotten so proficient at this, that I can do this whole procedure in under a minute. However I need to do this for everything. From the smallest typo, to the biggest code blunder in the universe. Can you imagine the overhead of this? I can tell you, it’s absolutely ludicrous. I would code 50 times faster, if I could make code changes and re-run the same code WITHOUT FRIGGING EXITING, REPACKAGING,REINSTALLING and RESTARTING MY GAME EVERY TIME! The fuck!

So imagine doing all that, and then realizing you didn’t fix the issue at all. Imagine you don’t even know where to being looking for the error, so you have to do this whole process 2 or 4 times, just to enter enough messages and error hooks in the places you suspect the problem is, just so that can begin to track it down. I’ve spent hours in issues that would have normally taken me seconds, just because I couldn’t track it easily (think: regression bug) Fun!!!


Oh yeah, did you see that wonderful error above. This is the totality of the console I have in the game. A lot of goddamn scrolling involved to perhaps get an idea where the error happened. As you can see, by default, it tells you fuck-all where the error would be. Not only that,ย  but the error will appear before ALL the notification you’ve put in the code, because python processes the code faster than OCTGN puts out notifications. So first you see the error, and then you see your debugging messages you’ve inserted into the code. Talk about mindfuck.

Oh sure, you see that it was the “useAbility()” function, but that’s just where the rabbit hole starts. In fact, this particular error was caused by a regex which I hadn’t configured to process numbers in the text of special Autoscripted announcements. So one group in the regex results was empty. This was the 10th function or so called from useAbility()…It took me half an hour to track that down, and that was WITH my custom-made debugger spitting out the actual last function used until now. Good fucking luck figuring that out just from that message…

You need to be a goddamn zen coder to not be ripping your testicle hairs out with OCTGN. You need to be able to write flawless code the first time around, because if you don’t, you’d better write your own debugger first before you even begin to write any sort of advanced plugin. And then you’d better have the patience of a Go grandmaster…

Why yes, I have asked the developers for more debugging tools, more than 4 months ago, multiple times, why do you ask..?

Phew! Glad that’s out of my system

However, for all its failings, OCTGN is still top of the line among card game engines, primarily because of its integration of Iron Python. It has its quirks (some of them quirkier than others) but the flexibility and power of using python in the backend just can’t be topped. Other card games like GCCG also support some sort of scripting, but then you have to learn its own internal syntax, which is definitely not as advanced as the capabilities of python. This is why, for all its failings and frustrations, I still stick with OCTGN. It’s the first engine that allowed me to fully realize my vision for how a card game engine online should work (i.e. automation up the arse!).

Hopefully the new version that’s in development will have *something* better than this sorry situation. But I swear if they have to break my existing python code in 20 different ways due to a new interpreter (like what happened when moving from OCTGN 2 to OCTGN 3) without giving me a proper debugger, I’m going to cry…Imagine having to debug 3000 lines of code times 4 plugins…

Aaaanyway, it is what it is. Still, through the fire and flames, I’ve still created a plugin I am proud of, and soon I’ll be using the existing code to implement Android: Netrunner. So why don’t you give the current plugin a run and let me know what ya think. You don’t want to let all that past frustration go to waste, do you? Do you?