Category Archives: Coding

Programming, HTML, CSS and all similar

I guess I should announce the Godot Card Game Framework here too, huh?

I don’t know why ,but I haven’t gotten around to posting about this on my blog. Anyway, in case you haven’t noticed, in the past 2 months I’ve been heavily working on a little something called the Godot Card Game Framework.

Read the link to see what it is, but if you are interested to know how that happened, here’s a recap:

After dropping out of OCTGN game development after Doomtown:Reloaded got cancelled by AEG in 20161 I was itching to start something to call my own. Especially since I felt all the knowledge I amassed with 5 years of coding card games in python was going to waste. Unfortunately the only programming language with which I really feel comfortable is Python, and PyGame…well let’s just say it leaves a lot to be desired.

Around early 2019, I was almost ready to try learning C# to start learning Unity, but by choice of luck, I happened to search for “Unity using Python” and one of the first results was Godot! And it was perfect! Features to compete with Unity, Lightweight, Free Software and best of all, Python-like syntax! It was as it was made with me in-mind!

After going through the documentation and tutorials I jumped in and started developing a hex-card game hybrid, but I was putting too much effort trying to make things work perfectly and not enough work making an actual game. Also my code was shite since I just did not have enough experience with Godot.

I took a break from that and decided to try and contribute to the Wesnoth Godot port which was fairly new at that point as well. I felt working with more experienced developers would give me some guidance and better coding practices. I did provide some pull requests mostly around documentation (since the whole codebase was utterly undocumented) and some refactoring to remove some “spaghetti”, and then went on a hiatus from development due to life stuff. And when I came back roughly 1 year later, I found out all my comments and contributions had been wiped clean as they refactored the whole thing from scratch and didn’t even bother to keep comments around.

Needless to say, I felt disheartened from that and was in no particular mood to contribute further.

At the same time, I had since started more actively lurking in the Godot subreddit and noticed that quite often, people would post about their progress2 with a card-based game they were designing and a ton of people would ask for some source code or other guidance, usually to little to no response.

I even was sometimes one of those people asking for advice, and I know how overwhelming it can be to want to create a game but having no idea where to start.

So I just decided that people need to stop reinventing the wheel, and to that end, I would make something to fill that need information on making a card game with Godot. I had the experience on what a fully automated card game needs, so I might as well use it, gawddamnit!

And If I’m going to do it, I’m also going to do it my way: Extremely perfectionistic! So this means tons of documentation and unit tests. Hell, I even sent PRs to make gdscript docs maker work for my purposes, something which has saved move countless hours of wiki editing.

Progress has been fairly fast since. I didn’t expect I would progress from this to this in less than 2 months! I even have some people sending pull requests which is awesome to see!

And that’s where we are now. I’ve just released v1.4 of the Framework and surprisingly even to myself, I show no indication of slowing down. I have instead started making my first actual game using my own framework, which most of the time just sends me back to add improvements to the framework itself to make it capable of doing what I need.

If you like what I’m doing, I will appreciate all words of support, new issues or feature requests and best of all, pull requests! 😄3

And if you want to chat further, feel free to hit me on Discord.

  1. I dropped out mostly due to burnout and dissatisfaction with the limitations of OCTGN if you want to know []
  2. Example post []
  3. Just make sure you read the contribution guide []

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

Enjoy!

Android:Netrunner plugin now available for OCTGN

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.