Giter Site home page Giter Site logo

egordorichev / burningknight Goto Github PK

View Code? Open in Web Editor NEW
315.0 18.0 34.0 2.23 GB

Top-down roguelike about goblins, lamps and magic

Home Page: https://store.steampowered.com/app/851150/Burning_Knight/

License: MIT License

C# 99.75% HLSL 0.24% Shell 0.01%
csharp game steam burning-knight roguelike dungeon

burningknight's Introduction

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

burningknight's People

Contributors

cuber01 avatar egordorichev avatar maanex avatar nufflee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

burningknight's Issues

Sound effects don't work in release build

Hi! I tried building the game (thanks for the instructions BTW, some of us are pretty bad at C# development) and I tried it a bit on stream yesterday. Sadly I haven't been able to get the sound effects to work. The music works just fine, just the SFX files seem to not be loaded.

In the console the game reports that the SFX are not found:

Sound effect unlock was not found! 1:03:17 GetSfx() <= Emit()

I poked around in the source code and found that it seemingly tries to load the SFX from Desktop/bin/Release/Content/bin/Sfx which I noticed was missing. After copying the directory from BurningKnight/Content/Sfx it found the folder but seemingly didn't find the files. I am not quite experienced enough in C# programming to effectively debug this further, so I'm hoping that this issue might allow you to track it down.

Thanks for open sourcing the game, it seems quite fun. Might throw some buckaroos your way on Steam/Itch when I get some disposable income.

w

wat

hi what is this no issue

w

Matrix exists both in VelcroPhysics.MonoGame and MonoGame.Framework

Hello Egor,

First I want to apologise if this is a mistake on my behalf.

Having issues running the project.
Currently, I am building and running the Desktop project in the Lens.sln, but when I do that I get the error :

The type 'Matrix'(same with Vector2) exists in both 'VelcroPhysics.MonoGame, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' and 'MonoGame.Framework, Version=3.8.0.13, Culture=neutral, PublicKeyToken=null'
I tried working around with the namespaces, but I could not make it work.

Also there are some missing dlls when i try to build :
In the project BurningKnight and Desktop, there is a Lens.dll missing
Again in Desktop there is a BurningKnight.dll missing.

Best regards,
Kiril.

Thank You

No issue, just thank you.

If there were to be an issue, it would be that I read that you are thinking of giving up.

You have accomplished so much, so young. Please don't give up.

Thanks again.
-C

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.