Black Jack is still at large

As you may have read before, Wizards of Unica started as a 7 Day Rogue-Like in 2014. This year, to test how my skills developed, I participated in the yearly 7DRL Challenge. The result is Black Jack is still at large, a western roguelike based on a unique Blackjack inspired game mechanic for action resolution developed in little less than 24 hours.


The Idea and Planning

This year I am in a bit of a western streak. I am not really a big fan of the genre, but the latest movie remakes like Django Unchained, The Grit and The Magnificent Seven had me hooked and wanting for more. Then West World happened, of course. Meanwhile I had a blast role-playing in a western themed game GMed by Daniele around new year’s eve (after, I think, 5 years without playing).

To make it short, I was thinking about the idea of playing cards as game supplements (nothing new by itself) and wanted to see how it could be made working in an RPG environment. First I was thinking about Poker, but found it too cumbersome, then I moved to Black Jack and found that it was simple enough but strategic enough to work, and started from there.

I wrote a short design document, just to get the juices flowing, and I was set to go. Of course I didn’t had time to explore it fully, and my technical documentation consisted only of a couple of diagrams, but something is better than nothing.

Black Jack is still at large - SW Architecture 2.png

Class Plan (note that not everything went according to plan, but most did)

Design Goals and Choices

As I suggested before, I prefer to have a plan and goals in mind before starting a project, so I simplified them in a list.

  1. Black Jack mechanic for action resolution,
  2. Ranged combat,
  3. Web based interface,
  4. Use a complete ECS architecture,
    1. from scratch…
  5. Multiple “Scenarios”.

Plus a number of secondary features like bounties, equipment and so on that didn’t see the light of the day.

Regarding point 3 I decided to go with Dart. I really like the language and I thought it mature enough for my purposes. I didn’t wanted to use libraries, since I live the challenge more as a test against yourself than creating the best possible game, keeping it simple and clean.

Black Jack is still at large - SW Architecture.png

Game Architecture

Also, I tried the Pomodoro Technique for managing my time in a smart manner.

What went Right

I finished!

It is too important to not state it. A big chunk of the challenge is to publish the game, and it is not an easy feat. I am happy and I had fun. Congratulations to all participants, whatever you managed it is still great!

Components and Behaviors

Splitting Components (data used by Systems) and Behaviors (Components that update themselves) was an excellent choice. Many game engines don’t really mix the two, in my experience, preferring to keep everything inside a System or making every Component a Behavior. Having both sped up the development and ensured Separation of Concerns, making it easier to understand what I was doing.

Finding bugs and fine tuning was just easier this way. Of course the code quality degraded as the deadline approached (you can clearly see it in the GameMechanics class, I think), but it is sort of inevitable.

Development Cycle

I used IntelliJ Idea as IDE, keeping GitHub open and using the pause between pomodoros to plan the next steps and log my progresses into a markdown text document, part of the software solution. The routine was great, even if I did find the “indivisible pomodoro” too constraining in certain phases of the process, sometimes preventing me to conclude what I was doing.

Black Jack mechanics

I think they work pretty well and I am happy with the results. There is a limit to it because the User Interface is so basic that I believe it will be disorienting for a player that, differently from myself, doesn’t know the game’s inside-outs, but I think it gives a good flow and forces a certain tactical approach, especially working with the fact that you have to reload your gun every few shots.


Gunfight in the mines

Map/Scenario Generation

This one was a biggie. I spent about 15% of the time doing map generation and I created 3 custom algorithms for each of Canyons, Mesa and Mines.


This is a canyon, notice how the mountain passes (top) open up in the middle of the canyon

They are far from perfect but I am pretty happy with the results, and the percentage of good maps created is pretty high.


Climbing the sunny mesa. Mountain give cover if you are near them

What went Wrong


I am pretty sorry to say this, but it was a really, REALLY, big letdown for me.

On one hand it was my fault: I worked in a pretty tight development and testing cycle and used only Dartium (a dedicated version of Chrome capable of executing Dart code like Javascript) running a local server for testing purposes, and everything was working like a charm, really.

But when I finally compiled it to Javascript, just hours before the deadline on Friday night, everything stopped working. First thing I noticed was that no sound were played, I later discovered that was because of Cross-origin resource sharing. Then, when I loaded the game on my server… it simply didn’t show anything.

I was tired, confused and angry: betrayed, like so many before me, by the promises of a universal platform. Actually I still am, and it is kind of a big deal since I don’t get angry easily, almost never in fact.

Now the game can be downloaded and played locally, without sound and with bugs that never showed on my test setup.

Over Engineering

Not much, which is a nice result for me, but still noticeable. Going full blown ECS this week had advantages, like I said above, but other times it meant having a lot of boiler plate that was mostly useless and slowed down certain areas of development.

Especially egregious was the decision of splitting the Actor Component from the PhysicalObject Component. The rationale was that in this way it would have been easier (?) to include non dynamic items like loot, but it created a lot of useless overhead.


A few weeks ago I was speaking with my bosses that I was going to reduce the overtime a bit for a week to work on a personal project and they gave me all their support (everyone here works his/her ass out so they are really sympathetic, bless them), and by the way no one is ever asking me to work off hours, but the truth is that I am incapable of cutting it short, even if I am at the eleventh hour and I still have a meeting at 10PM waiting for me…

I know that I am not the only one. Yay us! I guess?

Closing Remarks

All in all I am happy, even if angry, because this week showed to me that I have improved greatly. My planning was mostly spot on, I didn’t face big technical hurdles that I was unable to overcome (until that last night…) and I did in 24 hours what 3 years ago I couldn’t accomplish in 48.

These jams are stressful and maybe not really such a great experience as some are lead to think, but the time constraints and the extreme focus are invaluable for learning and growing. And pushing your limits is of course one of the few ways of ever improving.

I suggest everyone interested in game development to try, maybe at their own term. Set a goal, a small game, give yourself a time frame and go for it, then iterate and expand your goals. Maybe try the 1 Game A Month challenge.

Thanks for reading.

4 thoughts on “Black Jack is still at large

  1. I really enjoyed this mechanic! It worked really well and this was one of the more fun games I’ve played from this years event.

    • Thanks a lot for spending your time in trying to help, it is much appreciated! It is difficult to ascertain because the errors are logged from the “compiled” javascript which don’t really match the source code, but it gives pointers. Looks like it is trying to get the position of some undefined entity. One question, have you experienced this crash in all “levels” or only when beginning the third one?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s