Cardego is my project to build a virtual tabletop RPG-like system using Rust and Lua/Tabletop Simulator. Since February, I’ve been working on it and a few other resources for it. And it’s been coming along nicely!

I’ve always dreamed of doing some type of video game development in my life, but I always felt like I wasn’t really producing good code or systems by using existing game engines. Version control and systems programming within game engines isn’t exactly the same as doing it for, say, enterprise web services. It’s difficult, and the focus is often on gameplay experimentation and moving quick rather than creating robust gameplay and infrastructure. Unit testing? Data schemas? I feel like these are often secondary concerns for people.s

Given I’ve had mainly backend web service programming in my career, I’m most comfortable going data first for bringing a game to life, and then creating infrastructure to serve and render from that data. That’s exactly what Tabletop Simulator allows me to do — I can mock games easily by creating dummy development assets, while I can focus on creating the infrastructure necessary to generate and serve my game. With just a bit of Lua scripting, I can bring it to life while being able to arbitrate and edit content and systems on the fly.

The result is that I have a project that allows me to learn Rust web programming while learning game dev.

Package/Dependency Choices

  • actix-web – actix-web is considered one of the most widespread and fastest Rust frameworks. Compared to Rocket, I like where it stands between control, performance, and productivity.
  • diesel – Cardego currently runs with a SQLite 3 server just because it’s easy. For this, I can just leverage the ORM within diesel and get something typesafe. It’s been working for me fine, so I have no qualms about it.
  • serde – It’s ubiquitous. It’s easy. It’s productive. There’s no reason not to use it at this stage.
  • anyhow / thiserror – After wading through a bunch of the Rust crates for error management, having these two seems like the best option. One captures errors loosely — the other helps create exhaustive types for strict error management. Everything else is too old or not popular/standardized enough.
  • reqwest – I need to fetch PNG images from remote sources using HTTP. This makes it easy.
  • lazy_static – Singleton pattern is fairly common. This makes it easy.
  • cairo-rs / pangocairo – I’m going to remove these. I used these in an attempt to render images, but I quickly outgrew its capabilities since I wanted more powerful rendering with text and font faces. So, I’ve decided to use wkhtmltoimage instead. When you think about it, HTML rendering is fast, performant, and very well maintained since so many large entities have interests in it. Might as well use it to our advantage.

What’s there?

Right now, Cardego is in Alpha, revision 4 or revision 5 (I forget, even the repo doesn’t reflect it.) It’s pretty informal as it is right now.

Cardego has a manual, a combat system, 3 or 4 archetypes, some starter decks, and various “booster” packs that people can use to spice up their characters or gameplay. It has no great progression model, but the core system works, and the game is beginner-friendly.

Leave a comment

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

%d bloggers like this: