Rexcellent Games - Egor Dorichev makes games and writes about that

Rexcellent Games

Egor Dorichev makes games and writes about that

Procgen in Burning Knight

Roguelikes are defined by two key things: perma death and procgen. Permadeath is super simple to implement, but that’s not the case with procgen. There are thousands of ways, how you can implement it, and today we are going to look underhood of the Burning Knight engine (it’s called Lens, btw), and see what type of monsters live there.

Popular methods of generating a dungeon layout

Cellular automate

Cellular automate based dungeon
Source was not found, but the gif is too good

Cellular automate algorithms allow you to generate cave-like worlds with really little code.
You create a grid of "cells" (that are usually just booleans, because they have can be only dead or alive), and randomize it.
Then you do a few passes over the whole grid, applying some simple rules over it. In most cases, its all about calculating how many alive neighbor cells does a cell have, and deciding based on that should it live or die.

To be or not to be…

If you want to learn more about this method, I recommend reading this article.

Continue reading →

Guide on minifying tweetcarts

So I’ve been randomly making tweetcarts for the past 2 years, and I’ve been always obsessed with how much cool stuff people can fit into a single tweet! I see a lot of guys out there who try to start with tweetcarts but struggle with fitting their doodles into such a tiny size margin.

So here is a guide on how to do it, and a few tricks that I use myself.

But what is tweetcart?

In case you didn’t see this magic yet: tweet carts are PICO-8 doodles, that fit into a single tweet. That means that each of those masterpieces is not longer than 280 chars (bytes).

Tweetjam first started in 2016 on the PICO-8 forums, but quickly moved over to tweetjam hashtag on twitter.

If you’ve stuck with twitter for long enough, you remember, that tweet limitation on twitter was not always 280 chars. It all started out with just 140! So if you check out the early tweetcarts, they all are just a half of the modern ones, compared by the size!

Continue reading →

My experience with Dear ImGui and thoughts about boring UI

What is ImGui?

ImGui is yet another a small C++ UI library.
What makes it different from most other UI libraries, tho, is the way you define
widgets with it. Let’s take a look at a basic example: I want a button, that logs something
to console when pressed. Usual UI libraries would request you to do something like this:

static UiButton* button;

void initGame() {
    button = Ui::getContext()->createButton("Click me!");
    button.sayOnClick("Thanks <3");
}

void updateGame(float dt) {
    button.update(dt);
}

void renderGame() {
    button.render();
}

And here is the ImGui variant:

void renderGame() {
    if (ImGui::Button("Click me!")) {
        std::cout << "Thanks <3\n";
    }
}

Live demo, might take some time to load

I think you see, why this is so handy for prototyping UI really fast. And the API obviously doesn’t end
with buttons. ImGui features context menus, windows, sliders, text inputs, tags, and much more
than you can probably think of. And that all still in this simple form, bloat free (without having to store anything anywhere).

Really neat!

Continue reading →

Burning Knight is now on Steam: Wishlist!

Yay! This was a long-waited moment, but it finally happened! Burning Knight Steam page just went live (please wishlist!)!

Also, hey, I wasn’t sitting without a task for the last month, so here is a short list of things I’ve done, that are somewhat exciting:

  • Breakable things!
  • Breakable walls!
  • Paintings (they are also breakable)!
  • New enemies!
  • Awesome level editor!
  • Items are now defined in json!
  • New procgen algs!
  • Movement tech!
  • New shadows
  • New website! (https://burningknight.net/)
  • Teasers!

Trust me, there are so many not exciting things, that I had to cut from this list, just because… Well, they or wherein java edition, or just too boring.

So let’s dive into it, and have a closer look at all that cool stuff!

Continue reading →

Porting 60k line Java code base to C#, or a story about mistakes of the past

Preface

Somewhere in the drafts of this blog, I have an article, that explains all the flaws of Java 8 (and a bunch of other languages). It probably will never be released, cause it’s just a pile of boring (and sad) facts, but I will list some of them, to explain my actions, that I did.
So, Java:

  • Has really old syntax, compared, to C# or any other more modern language.
  • Packing an app requires or packing extra 100mb JVM, or having users to install JVM For example, Steam doesn’t ship JVM with it, and just overall packing .exe on Linux is a big pain.
  • "Write once, run anywhere" is a lie Java won’t run on consoles, such as Nintendo Switch.

Might be enough already, but there is also the framework, that BurningKnight Java Edition works on – LibGDX. Overall, it’s a great library, but:

  • What’s up with gamepad support? Hotplug works only with LWJGL3, but that crashes on MacOS, gamepad remappings for millions of existing gamepads? No, you gotta figure them all out yourself.
  • Audio API is super limited Might seem minor, but all the juice, that comes from lowpass filter, writing notes to audio source on fly, and other, is just impossible.

So yeah. It’s all was piling on me for over a year now, and I’ve been dreaming of porting the whole game to C# for a while now. Burning Knight git repo has csharp branch, that is 7 months, but it didn’t really go far beyond rendering an animation of a mummy.
I’ve knew it was a huge project to port, and I was scared of it.

Continue reading →

Areas, boss battles and January overall

Burning Knight

So around a month ago, I told you all, that January would be the month of bugfixes and forest area. Well, something went really differently… Here is what I’ve got done this month.

New areas

  • Ancient Library area
  • Forest Forest area
  • Secret Laboratory area
  • Womb Ruins area
  • Frozen Ruins area
  • Floating Island area is work in progress (renamed/retextured Creep area)

Burning Knight battles

That’s something, that I totally forgot to mention, but the game main focus is on the Burning Knight. And BK battle was pretty boring before, and he had the same attacks for all depths, but that’s not true now. I’m currently in progress of creating 16 attack sets, that BK will choose from to make the game more dynamic and interesting.

Continue reading →

My thoughts on language design

Preface

This topic might seem really unrelated to gamedev or me. But I’d argue, that programming is one of the core components of huge mess thing, called game development. And I’ve been playing around with making programming languages for quite a while now, so I have a few things to say in this field.

Motivation

We have a lot of amazing languages today, why imagine another one? Well, to start off, it’s a great exercise. Not to note that it also a really good topic for discussion, and I’ve been collecting my ideas for ages now.

Modern languages and syntax

I really like C-family programming languages. Especially I like C#, Java, and JavaScript. C# is one of the most modern languages out there, yet I still see a bunch of space for improvement.

Continue reading →

Running PICO-8 carts without manual export

So one day, I decided to open the source of all my PICO-8 carts. I threw away a lot of not finished carts, yet I still ended up with a big number of them. And I not only wanted to make the carts downloadable but also to make them previewable in the browser. The typical way to do that with PICO-8 is the following:

> LOAD cart.p8.png
> EXPORT index.html

Then zip index.html and index.js, etc etc. But you know, even doing that with 20 carts will take quite some time.

And I knew BBS has a way to run carts without exporting them. So after a small research, I found a small library on Github, that allowed me to do just that, yet it was outdated for 3 years.

The perspective of just throwing a cart into the directory near your script to automatically make it playable was too good.

Continue reading →

2018: the year of jams

Game jams are truly amazing. They force you to focus on making a game quick, focus on game core, and not polish. If you did not participate in one yet: what are you waiting for?

Ludum Dare

I’ve learned about game jams in the winter of 2016. It happened so to be that Ludum Dare 37 was around the corner. At that point, I finished just 1 small SDL2 game. And my mind was full with text roguelikes and Terraria, so I went with the toolset I was familiar with: Java and super slow library, that provided a simple way to render a text grid.

Continue reading →

Burning Knight: the roadmap

It’s been a while since the last devlog of Burning Knight, and a lot of things changed in that time. I made a new site (well, plus a landing page for the game, yay!), and well let’s talk about it.

Continue reading →