News:

SMF - Just Installed!

Main Menu

Potion Variances (like on the amiga version)

Started by Knight _Rider, January 19, 2024, 03:57:14 PM

Previous topic - Next topic

Knight _Rider

Good evening all in returning after 10 years geez had it been that long

I'm the guy that reported the dagger bugs in the day..

Last bug I mentioned that hasn't been corrected or updated (I hoping it would been done after all these years)
Is variances we potions

Potion duration and quality varied with the original. Regeneration could be faster or slower, time duration varied , not all supers were the same (particular with regeneration) some supers were duds that worn off Almost instantly. Causing tables to be turn in a comical cat vs mouse spy vs spy fashion

I was told in the day it would be implemented but it hasn't which is a shame as it adds more humour, surprise , playability and making things more interesting

There's only one thing else I can think of that may not be implemented (and is a "minute* nitpick I admit) is stick can do damage if the player has strength or super ...otherwise it works just stun (this can only be done by holding fire and selecting ✊)..
 this can be used to trick the enemy (giving them false sense of security to attack you) while "attack blocking" an exit or for trolling the opponent

I'm probably too late now to write this now.. but I want to get back into this game get get few others to play.

If you guys still play send a reply to this post or email me fotiosandriotis@gmail.com to set up a game

Crazy how time goes right?

Enjoy your day/night all l!

Stephen

Hi there,

I am not sure where the last 10 years went to be honest :)

Well, actually, for most of that time I've been doing a full time job in the games industry. I started in about 2015 if I remember rightly and eventually quit about a year ago. It was certainly an enjoyable time for me, but unfortunately it didn't really leave any spare time for hobby game development, so that's why Knights development kind of stopped completely during that time.

Anyway since about last year I've been taking some time off to work on a couple of my own projects - one of those is a new indie game, which hopefully I would be able to release on Steam at some point - although it's at a very early stage right now. But, yes, perhaps now would be a good time to start looking at Knights again. I can't promise anything, but I'll see if I can get some spare time in my schedule in the next few months :)

And yes, I do remember you mentioning the potion thing, I must have just forgotten to fix it back in the day (or not had time). I agree it should be fixed though.

I might be up for some games, if we can organise a time :)

Stephen

Hello Knight_Rider,

I have an update for you.

I've been doing some research on the original Amiga Knights (both looking at the source code, and experimenting in the actual game to confirm the results). I found the following:

1) Potion types:

There are indeed two types of regeneration potions. The "fast" regen heals you once every 5 "game turns", or 0.7 seconds (a game turn is 0.14 seconds on PAL Amigas - slightly different on NTSC). The "slow" regeneration heals you once every 15 "game turns" (or 2.1 seconds). (The "fast" version also shows as a slightly brighter shade of orange in the knight's Potion Bottle.)

However, I can only see one type of super, which corresponds to the slow regen potion (together with strength and quickness).

One thing that is interesting though is that the healing occurs on a regular, fixed interval - it is not relative to when you get hit. So, for example, for the "slow" regen, healing occurs on game turn number 15 (i.e. 2.1 seconds after the game started), then on game turn 30 (4.1 seconds after start of game), then game turn 45 etc. So if you got damaged on game turn 44, say, then it would appear as though your healing was very fast, because you would regenerate one point of damage almost immediately. Conversely, if you got hit on game turn 46, then you would have to wait quite a long time (almost the full 2.1 seconds) before the first point of regeneration kicked in. So I guess that might have caused the appearance of different "qualities" of supers, even though (from what I can see) there was only ever one type of super in the game.

I hope that explanation made sense :)

(In my version of Knights, there is only one Regeneration which heals every 0.75 seconds, whereas Super heals every 1.5 seconds. So neither is quite the same as the original game.)

2) Potion durations:

In Amiga Knights it appears that there is a 1 in 1000 chance of a potion expiring every "game turn". This slowly increases to a 1 in 600 chance as time goes on.

If we plot this on a graph, it looks like the following (horizontal axis = time, and vertical axis = probability that the potion is still active after that time):

graph1.png

(This applies to "normal" potions like strength, super, quickness and so on. I think invulnerability and poison immunity had different rules, but I have not looked into those.)

In the remake, the potion duration is just a random number between 11 and 110 seconds, which looks like the following:

graph2.png

So you can see, in the original Knights, there is indeed the chance for a potion to be a "dud" and not last very long, and this is not present in the remake. There was also a chance for a potion to last quite a lot longer, in the original Knights, than is possible in the remake.

3) The thing with the stick/staff:

Yes, you are completely right, in the original Knights, the staff could do damage when a super or strength is used.

This could relatively easily be fixed, although I would have to implement a time delay for people using the new control system (similar to what we did for dagger throwing) to prevent people using the new control system from having an advantage.

..

I'll post again later this week with some more info about how I plan to fix these issues :)

ImpassIve

Woah, hello there everyone!
I didn't realize that my RSS subscription to the forum went off a year ago, thus I definitely did not expect to see any recent activity here - especially the one with the new update and GitHub migration...

Stephen, just wanted to say thank you for all the great work you *were* and *are* doing here :)


Stephen

Hey there :)

Yes I finally decided to devote some time to Knights once again. I'm not sure how long I will be able to keep this up, but I at least want to keep the game "maintained" so that it still builds properly, uses up to date libraries, etc.

Glad to see that people are still watching the forums.

Stephen

Update for today:

The staff change (point 3 on my list above) is done. The staff now behaves like the original Amiga Knights, i.e. it is dropped by default, but selecting the "fist" icon allows you to attack with it. The staff does zero damage without Strength, or 1-2 damage with Strength (but it cannot destroy furniture, even with Strength). It also stuns for a short time (more than a Sword but less than a Hammer).

The regeneration change (point 1 on the above list) is also done. There are now two different regeneration potions (with slightly different Potion Bottle colours). I also adjusted the Super potion to regenerate at the same rate as in the original game (i.e. slightly slower than it does currently).

Links to the GitHub commits (for those interested): staff change; regeneration change.

That just leaves number 2 on the above list (potion durations). I have some ideas about how to fix this (without having to reprogram everything!) and I'll post about that tomorrow.

Stephen

Today I have been working on the potion durations.

The way potions work, in my version of Knights, is that, at the point when a potion is drunk, the Lua code generates a random number, and that is the number of seconds that the potion is going to last for.

So the question becomes, how can we generate a random number that mimics the distribution of potion times that was present in the original Amiga Knights. In other words, how can we get a graph that looks like the red curve shown above.

After some messing about with spreadsheets, I figured out that the following rule gives a fairly close approximation to what the original Knights did:

  • With 34% probability: Set the duration to a random number between 1 and 90 seconds.
  • With 40% probability: Set the duration to a random number between 1 and 180 seconds.
  • The rest of the time (i.e. with 23% probability): Set the duration to a random number between 1 and 360 seconds.

This gives a graph that looks like the following:

graph3.png

As you can see, the green curve tracks the red curve quite closely, so the potion durations should feel much more similar to how they were in the original game.

Statistically: The mean potion duration is now about 95 seconds with a median of about 72 seconds. The probability of a potion lasting less than 5 seconds is approximately 3%, and less than 10 seconds is about 6 to 7%.

I did a similar exercise with invulnerability potions, making them much closer to the original game (invulnerability potions have a lot lower durations than the other potion types, of course).

I did not make any changes to the duration of poison immunity, or the duration of the other effects (like showing locations of enemy knights on the map), as I feel these are less critical to gameplay so it didn't seem to be worth spending any time on these.

Tl;dr: potion durations have now been changed to be more like the original Amiga Knights. Most potions will last about the same time as they did before, but the occasional potion will be a "dud" and last only a few seconds, and also there will be a small number of potions that last a lot longer than they did before (up to 6 minutes).

This was the last change I wanted to make for the time being, so I will probably do a release tomorrow.