Plans for Steam version of Knights!

I have decided to go ahead and attempt to make a Steam release of Knights!

This will be as a free game on Steam. Whilst I could conceivably try to charge money for it (and, indeed, some people have suggested that in the past), personally I think free is better, because:

  • Knights has always been free.
  • Keeping it free will mean that more people get to experience the game (and this is especially important for a multiplayer game, where you want as large a playerbase as possible, ideally).
  • It’s not clear that a remake of a 30+ year old Amiga game would make much money anyway, so there isn’t much point trying to charge for it, in my opinion.

(If the game does somehow become popular and people start asking for a way to support the developers, then I could consider setting up a ko-fi or patreon or something, but we’ll cross that bridge when we come to it.)

The advantages of a Steam release would be:

  • No need for me to host any server infrastructure myself — we can leverage Steam’s infrastructure instead. (See previous blog post for why this is a good thing.)
  • Easier installation — people can just click and play, rather than having to install a separate EXE file from the internet, which they might not trust.
  • Improved multiplayer features — we can leverage Steam matchmaking, “invite friends” features, etc.
  • Spreading the word — people might see their friends playing Knights on Steam and decide to try it out for themselves.

I have now asked Kalle Marjola (the original Knights creator) for his permission to do this, and he has agreed, provided that I mention his name somewhere, which of course I will. (In fact, his exact words were, “Oh that sounds great!”)

So what needs to happen next?

  • The first thing I want to do is finish off the Lua scripting documentation, which is still a work in progress. The point of this is to make it easier for people to make mods for Knights. (Perhaps we can even integrate with Steam Workshop to allow easier installation of mods, although I will focus on getting the base game working first!) This documentation work will take a couple of weeks at least.
  • I then need to think about how the multiplayer will work (technically) on the Steam platform. My version of Knights has always been server-based, but on Steam there is no “game server”, instead just peer-to-peer connections between players. The obvious solution is to designate one player to be the “host”, and then that player acts as a “game server”. (This does give a slight “host advantage” to that player, since their ping time to the “server” will be zero, but we will have to live with that for now.) Then the technical challenges are as follows:
    • We probably need some kind of “host migration” feature — otherwise the game would just end if the host player leaves, which isn’t ideal. This is technically challenging, but I think I can see a way of doing it.
    • It would also be nice to allow new players to join a game after it has started, or existing players to reconnect after a disconnection (neither of these are possible with the current implementation), so I’ll have to think about how those could be implemented.
    • We also need to integrate with the Steam lobby and friends APIs, which means e.g. adding UIs to create a new game (either private or publicly visible), view existing games (and join them), invite a friend to a game, or respond to an invite. This will need a bit of work, but there are no major technical difficulties here — it is just a case of doing the work basically.
  • There are other Steam features to consider as well:
    • Steam Community (e.g. we could set up a Steam based discussion forum for the game)
    • Rich Presence (I have only a vague idea what this is, but it might be interesting to set up, if it doesn’t take too long)
    • Steam Input (supporting different controller types, basically) — this could be good as there are all kinds of controllers that people use nowadays, not just keyboard and mouse (although I guess keyboard and mouse remains the most popular).
    • Voice Chat — may be worth researching a bit at least
    • Achievements — not sure, but maybe we could have some simple ones like “complete a destroy book with wand quest” or “kill 100 zombies” or something.
    • Ranked online games and leaderboards — might be interesting I suppose, but not an immediate priority.
    • Maybe some other stuff I haven’t thought of yet.
  • The game might also need a slight UI overhaul as well, just to make it a little bit more presentable for Steam. If it’s only going to be a free game, then we don’t need to put an enormous amount of effort into this, but maybe sprucing it up a little bit would be reasonable. Can think about this once the technical side is worked out.

There’s also stuff like setting up the store page, and whatnot, but again, we can cross that bridge when we come to it.

For those who are wondering, I’m currently working part-time, which gives me at least 1-2 days per week to work on Knights, so there is time for me to work on this stuff. Even so, it’s going to take a long time – it could be months or even years before we get to a release – so don’t expect anything soon. But I felt it would be worth announcing something here so that the Knights community (such as it is) can know where the game is heading next.

The next few months could be an exciting time, so stay tuned and I will try to keep people updated as things progress 🙂

About Knights

Knights is a multiplayer game in which players must explore randomly generated dungeons and race to complete various quests. For more information please visit https://www.knightsgame.org.uk/.

Knights Server and Forum Taken Offline

With great regret I must announce that, as of today, I have taken the official Knights server offline and made the Knights forum read-only.

The reason is the Online Safety Act, which is a piece of legislation which has recently come into effect here in the UK. The aim of the Act is to protect users of “user-to-user services” (which includes online games), and especially children, from various forms of online harm.

While this is a well-meaning goal, which I agree with in principle, the way the legislation has been implemented presents challenges for operators of small online services such as Knights.

All operators — regardless of whether they are a huge company, or a one-person operation like myself — are required to comply, and apparently the duties are quite extensive, including things like completing risk assessments and implementing safety measures to deal with any identified risks. There are also fines of up to £18 million for non-compliance.

Unfortunately, I do not currently have the time to read through the 84-page code of practice and figure out exactly what I would need to do in order to comply. Moreover, given the large potential fines, I would want to hire a lawyer to make sure that everything was being done “properly”, and this would add substantial financial costs.

Therefore, with regret, I feel that the only practical option for now is to close down those aspects of the Knights service that allow user-to-user interaction (and thus would be caught by the legislation) — this includes the posting and messaging features of the Knights forum, as well as the online Knights server itself.

However, according to my understanding, there is an exemption in the Act for blog comments (or other scenarios where users are directly commenting on “provider content”, e.g. online product reviews). (A more detailed discussion is here.) Therefore, I believe it is safe for me to leave blog comments open for now, as long as I “police” the comments section to remove anything off-topic or spammy (which is something I have always been doing anyway).

Longer term, I am wondering if the right thing to do would be to port the game to Steam. Then we could use the Steam multiplayer features and discussion forums and I would no longer have to run those features myself on this website. (Effectively, Steam would be responsible for complying with online safety rules, instead of me.) In fact, a number of people have suggested a Steam version of Knights in the past, but I have not followed up on that because (a) it would require getting back in touch with Mr. Kalle Marjola, the original creator of Knights, to get his permission (I expect he would be fine with it, but it still needs to be done); and (b) it would need quite a bit of work on my part to integrate the game with all the Steam APIs and do any other work required for a Steam release. So, up until now, I have not done that, but maybe now is the time to start considering it.

Anyway, I hope that this is not too much of a disappointment for any Knights fans out there, but I feel I have no choice at the moment, for the reasons outlined above.

Further Reading

Information about the UK’s Online Safety Act 2023

Hamster forum and local residents’ websites shut down by new internet laws – Free Speech Union

It is time to make the Online Safety Act 2023 fit for purpose – decoded.legal’s blog

Why UK Online Safety Act may not be safe for bloggers – The Register

About Knights

Knights is a multiplayer game in which players must explore randomly generated dungeons and race to complete various quests. For more information please visit https://www.knightsgame.org.uk/.

Knights 27 Released

A new version of Knights has been released!

This makes some changes to potions and staffs, which were requested on the forums, and which make the gameplay closer to the original Amiga version of the game.

I have also updated the Lua and ENet versions used and made a couple of other minor changes.

The game can be downloaded from the download page as usual.

Enjoy!

For more information about Knights, please visit https://www.knightsgame.org.uk/.

Lua and ENet upgrades

Summary: In the next release of Knights I will be upgrading the versions of ENet (a networking library) and Lua that are used by Knights. I will also be removing some custom patches to Lua that were being used previously. This will have the following effects:

  • Users will have to upgrade their game client (because the new ENet version is incompatible with the old one).
  • The Lua code for mods might need to be updated.

Lua Change

I have updated the version of Lua used to the latest version, 5.4.6 (previously it was 5.1.4).

The previous versions of Knights also included a custom Lua patch (written by me) which added a new “&” operator to the language. This was used for merging tables, for example one could write code like the following:

i_wand_of_destruction = kts.ItemType(
  basic_wand & {
    melee_damage = 1000,
    melee_stun_time = rng_time_range(2, 3),
    melee_tile_damage = 1000
  }
)

This would make an ItemType that had all of the properties from the “basic_wand” table, together with the new properties shown.

Adding the “&” operator to Lua seemed like a good idea at the time — but it does cause problems, because it means I can’t easily upgrade to newer versions of Lua (as I would have to port my patch across to the new codebase every time).

So, from now on I am removing this patch, and the “&” table-merge operator will no longer be available.

Instead I have written a Lua function that does the same thing:

function table_merge(a, b)
    local result = {}
    for k, v in pairs(a) do
        result[k] = v
    end
    for k, v in pairs(b) do
        result[k] = v
    end
    return result
end

This function is available as “kts.table_merge”. Therefore the above “wand of destruction” code must now be written like this instead:

i_wand_of_destruction = kts.ItemType(
  kts.table_merge(
    basic_wand,
    {
      melee_damage = 1000,
      melee_stun_time = rng_time_range(2, 3),
      melee_tile_damage = 1000
    }
  }
)

This does make the code a little bit uglier I suppose, but it is not a big problem and I think this is a small price to pay, in exchange for making it much easier to do Lua upgrades in the future.

Of course, any mods that were using “&”, must now be modified (no pun intended) to use “kts.table_merge” instead, but this shouldn’t be too difficult.

ENet change

I have also taken the opportunity to upgrade ENet from version 1.2.5 to the latest available version (on Windows this will be 1.3.17, as this is the latest VCPKG package available; on Linux it will be whatever is installed on your local system, which will hopefully be reasonably up to date).

The main issue here is that ENet 1.3.x is incompatible with 1.2.x, so users running the older versions of Knights will not be able to connect to the new Knights server. They won’t even get any message telling them they need to upgrade; the connection will just fail completely.

To mitigate this, I’ve arranged for the “Connect to Server” screen to show a message like the following when players try to connect:

Screenshot showing error message asking the player to upgrade to the latest version of Knights.

Hopefully this will be enough to let players know what they have to do, and it won’t be a huge issue.

Knights 26 Released

A new version of Knights has been released!

This is basically just a maintenance release. I have fixed various issues with the codebase and brought the code up to date (e.g. upgrade to latest Visual Studio version, upgraded various libraries to new versions). There are no actual gameplay changes.

The release can be downloaded from: https://www.knightsgame.org.uk/download

I plan to do another release after this one with the following changes:

  • Fix the bugs that Knight_Rider has posted about recently (potion changes and staff damage when using super/strength).
  • Fix a bug I noticed with chat (pressing the keypad enter doesn’t seem to send a chat message, although pressing return on the main keyboard does).
  • More changes to upgrade the codebase (e.g. remove deprecated C++ features, upgrade to latest Lua version).

So stay tuned for that within the next few weeks 🙂

For more information about Knights, please visit http://www.knightsgame.org.uk/.

Knights now on GitHub

I’m pleased to announce that I have finally moved away from SVN and moved the Knights source code into Git.

The Knights source repository is now available at: https://github.com/sdthompson1/knights

I’m also, slowly, bringing the code more up to date — e.g. updating to the latest Visual Studio version for the Windows build, moving from SDL 1 to SDL 2, removing some outdated C++ constructs.

This process will continue over the next few weeks, but hopefully fairly soon, I will be able to make a new release of the game! (The first in many years.)

Lua doc updates

I did a bit more work on the Knights Lua documentation project today. The following functions have been added to the docs:

  • kts.AddMissile
  • kts.AddMonster
  • kts.AddMonsterGenerator
  • kts.CloseDoor
  • kts.Control
  • kts.IsDoorOpen
  • kts.LockDoor
  • kts.MonsterType
  • kts.OpenDoor
  • kts.OpenOrCloseDoor

There is still a lot to do, but this is a good start 🙂

For more information about Knights, please visit http://www.knightsgame.org.uk/.

A quick Update

Hello, I hope everyone had a good Easter.

I am conscious that I haven’t made any Knights updates for about 10 years now (where did that time go!), but I feel that the time has now come for me to start working on the game again!

For me the priorities for now are:

  1. I need to get Knights working on my computer again. Unfortunately the Knights Linux build doesn’t work currently (some Makefile changes are needed apparently) and I only have a Linux machine right now (so I’m unable to use the Windows installer, at the moment). So my intention is to figure out how to fix the Linux build and then make a new Knights release (the first for some years in fact).
  2. I am going to add a “Lua Docs” section to the website to replace the old Lua documentation that used to be on the Trac site (which was unfortunately lost some time ago).
  3. I would like to move the Knights source code from its current SVN repository onto GitHub.

After that, we can start thinking about what we want to do with the game next, in terms of new features or whatever. But the above should be a good starting point.

That’s it for now — I’ll post again fairly soon with an update on how it’s going.

For more information about Knights, please visit http://www.knightsgame.org.uk/.

Server move complete!

The Knights server move described in the previous post is complete, and the server is running at its new home without any (known) problems.

I have also enabled HTTPS support, so you can now access the home page at https://www.knightsgame.org.uk/. (For now, both HTTP and HTTPS are working, but I may turn off the old HTTP site, or redirect it, at some point.)

As always, if you spot any problems please let me know in the comments below, or by email to stephen (at) solarflare.org.uk.