• Stars
    star
    319
  • Rank 131,491 (Top 3 %)
  • Language
    C#
  • License
    MIT License
  • Created almost 6 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Top-down roguelike about goblins, lamps and magic

Burning Knight

Available on Steam and itch.io.

Before you look at the code: hear me out. Yes, some of it is not the best. Yes, some of it can be redone and improved. But I have to admit, I came so close to dropping this whole project so many times, I still have no idea, how I made it through May of 2020. Anyway. Here it is. The source code of C# branch of Burning Knight. For java branch see this repo.

(Yes, this is only half of the work, the game was initially written in Java and then rewritten in C#, this code base is relatively nice compared to the Java one).

This project really quickly moved from the "nice and relaxing" to "constant bugfixing and stress" type of project. You can clearly see me going mad in some places (do not look at the pull requests I beg you). But its all in the past now. Sadly, the game has done really poorly on the Steam, even tho I've tried my best with marketing and everything else. I'm still really really proud of the game, it's THE project I can point people to and say: I've made this. That's one of the reasons why I wanted to open the source of this monster.

There are not a lot of open source games, that have been released on Steam. So there is not that much where you can go to learn from real released games. Of course, you can decompile games, but it will never compare to the actual source. I believe in the power open source. I'm opening this project up with hope, that it might turn out to be useful to someone. So yeah, forgive me my code decisions in some places.

Anyway, onto the juicy stuff.

The game has a lot of developer tools in it, but to gain access to them, you must build the solution in Debug configuration. This is really important, because music & sfx wont load in Debug configuration, but dev tools will be enabled. The assets are dropped in favor of quicker loading time (there is still no hotswap support for Mono on Linux).

To access the dev tools, you shall press F1 while being in InGameState (while you are normally playing and not watching a loading screen). A panel with a bunch of checkboxes should appear, that show different dev tools. Have fun!

Why did you merge pull requests into release branch all the time?

You see, this is how I've set up Github Actions CI. The tool went online in the middle of the first summer of development of the C# branch, and it was such a huge help. Before that, I had to compile all the builds for beta testing by hand, but after 3 days of internal screaming I was able to get the CI working, and from that point I was able just to merge my dev branch into release, and 10 minutes later press a few buttons on Itch/Steam to release the new builds.

Building

Hey, so I saw a bunch of people complain online about no building instructions. I couldn't be surprised more, since you just open the .sln file in your C# IDE of choice and compile & run the Desktop project. But just in case anyone is still curious, here you go.

If you don't have a ready environment for compiling .NET Framework code, check this page. It explains how to install and use all tools needed to compile Burning Knight on Linux.

Or if you prefer to do it from the terminal: install the packages:

nuget restore

Debug configuration (disabled sfx & music but has dev tools enabled):

msbuild
cd Desktop/bin/Debug/
mono Desktop.exe

Release configuration (same as on Steam) is a bit more tricky. You gotta install MonoGame Content Pipeline tool and compile the assets (raw sfx -> .xnb). If you are on Linux, you can get it via:

wget https://github.com/MonoGame/MonoGame/releases/download/v3.7.1/monogame-sdk.run chmod +x monogame-sdk.run sudo ./monogame-sdk.run Otherwise, find a binary on the monogame website. After that open BurningKnight/Content/Content.mgcb in the tool and hit build.

If you are on Linux, ignore shader compilation errors, prebuild shaders (via a Windows machine) are already in the repo. After that build the sources and run:

msbuild /p:Configuration=Release
cd Desktop/bin/Release/
mono Desktop.exe

More Repositories

1

LastTry

🌳 LastTry is open-source game written in Java, using LibGDX library and inspired by Terraria 🌳
Java
119
star
2

neko8

Fantasy console inspired by pico8, tic80 and liko12, written in c++
C++
111
star
3

pemsa

Runtime emulation for PICO-8
C
99
star
4

lit

Lit scripting language
C
45
star
5

CurseOfTheArrow

Source code for my old game Curse of the Arrow
Lua
34
star
6

pemsa-sdl

SDL2 backend for pemsa pico8 runtime
C++
27
star
7

pico-player

Magic js library, that allows you to run PICO-8 carts in browser without exporting them
JavaScript
18
star
8

BurningKnightJava

Java branch of Burning Knight
Java
17
star
9

byejava

Java to C# converter
Java
13
star
10

static-lit

Ancient branch of lit, before it became dynamicly-typed.
C
10
star
11

funk

A complete language with the only variable type being a function
C
6
star
12

tsab

Lit based game development framework (aka love2d but for lit)
C
5
star
13

lunas

Complies Lua into JS
JavaScript
5
star
14

time-lapse

Time lapse tool for linux / ludum dare
Shell
3
star
15

lit-vscode

Lit syntax support for Visual Studio Code
2
star
16

BurningWiki

Burning Knight wiki data, pulled from the game
CSS
2
star
17

egordorichev.github.io

Overview of my projects / resume
HTML
2
star
18

word-garden

My ludum dare 47 entry - realtime online multiplayer visual chat board
JavaScript
2
star
19

HighSpeedRabbit

One of my first pico8 games (unfinished, just for history)
1
star
20

https

HTTPS requests support for lit
C
1
star
21

lit-ace

Lit syntax support for ace editor
JavaScript
1
star
22

lib.lit

Basic C library setup example for lit
CMake
1
star
23

jams

Super old jam games (just for history)
Lua
1
star
24

tsab_lua

To Steam and beyond (old lua version, moving to lit now)
C++
1
star
25

safe-spot

Ludum Dare 50 entry
JavaScript
1
star
26

embed-file

A C script to embed strings into a .c file
C
1
star
27

tsab_pico

PICO-8 style API module for tsab
Lua
1
star
28

lurker.lit

hotswap for lit - rxi's lurker but written in lit
1
star
29

archive

tag.gz support for lit
C
1
star
30

TREE-2

A great fantasy console for FC dev jam
Lua
1
star
31

flute

A gamedev framework built around tsab & lit
1
star
32

lit-wiki

Latest build of lit wiki
HTML
1
star
33

lit-html

Latest build of lit with emscripten
JavaScript
1
star
34

pemsa-pinvoke

C# pinvoke glue for the pemsa pico8 runtime
C++
1
star
35

dino

Custom wordpress theme for my blog
PHP
1
star
36

PlanetCreator

Continuing my Unity practice by writing a planet generator (a super basic one)
C#
1
star
37

pemsa-3d

Unity based pemsa cart runner gamificated
C#
1
star