Giter Site home page Giter Site logo

Comments (20)

 avatar commented on August 15, 2024 3

It's not a bug - it's the rat saying a curse word.
It's censored to keep the game child-appropriate.

from remixed-dungeon.

Mikhael-Danilov avatar Mikhael-Danilov commented on August 15, 2024 2

Sorry for delayed reply.

Scared may or may not inherit from Fleeing (in my opinion ai states should be not related by inheritance)

Not sure if it is possible to completely avoid flipflops scenarios but it worth to try to mininize chances.

For example it may be: Scared -> nowhere to run -> Berserk(immune to terror) or(50% chance) Death from fear.

from remixed-dungeon.

Mikhael-Danilov avatar Mikhael-Danilov commented on August 15, 2024

It is rat reaction to moving from Fear (due to Fetid Rat Skull) to Anger(due your attack) and back again...

from remixed-dungeon.

swooboo avatar swooboo commented on August 15, 2024

So this is not a bug? Certainly looks like it.

from remixed-dungeon.

Mikhael-Danilov avatar Mikhael-Danilov commented on August 15, 2024

One possible solution is to add "permanent" flag for Terror caused by Ratter aura.

from remixed-dungeon.

swooboo avatar swooboo commented on August 15, 2024

Do you want me to try and do it and pull request? I can definitely try, but I'd be happy if you give me some pointers - line numbers etc.

P.S. Можно по-русски.

from remixed-dungeon.

Mikhael-Danilov avatar Mikhael-Danilov commented on August 15, 2024

O its will be great!

Bellow is good places to start:
com\watabou\pixeldungeon\actors\mobs\Rat.java Rat.canAttack
com\watabou\pixeldungeon\actors\buffs\Terror.java

P.S. Можно и по-русски

from remixed-dungeon.

swooboo avatar swooboo commented on August 15, 2024

Thanks for the explanation @DatBoi287, I would suggest to change it to something like F$%K, so it can be understood by others. It seems like you're the only one to get this. Also, maybe it's not right for a rat to curse, since it's incapable of speech. Thoughts?

from remixed-dungeon.

Mikhael-Danilov avatar Mikhael-Danilov commented on August 15, 2024

This is Giant Marsupial Rat from highly magical world.

from remixed-dungeon.

swooboo avatar swooboo commented on August 15, 2024

I like the joke :)

I want to revisit this issue. As I see it there are two things:

  1. The #$%^ is not clear - it might be just me, but I couldn't understand this means curses, or that it means the creature is angered. (This is minor)
  2. The fact that the creature is angered on each hit when there is a terror aura.

My thoughts:

  1. Change the anger string to something else, like F$%K or 😡 (Unicode smiley, although in the current font it doesn't look too angry), or maybe add a log message "The rat gets angry!".
  2. Contrary to @Mikhael-Danilov's suggestion to make Terror from Ratter permanent, I believe that the rat should stay angry for some time (or even forever once attacked). Real-life creatures, even when scared, when provoked, will attack back. So making terror permanent will result in a creature that gets punished and doesn't do anything about it.
    1. These are details though, either way should be good.
    2. I also understand that this is a Giant Marsupial Rat from highly magical world and might not adhere to the real-world examples.

Let's discuss this further so we can find a solution.

EDIT: Nethack has an interesting approach to this - https://nethackwiki.com/wiki/Scare#Effect
They have 2 different but connected statuses - scared and fleeing. Worth a read.

from remixed-dungeon.

Mikhael-Danilov avatar Mikhael-Danilov commented on August 15, 2024
  1. I strongly against "Fuck" or similar words in Remixed. Because we must keep the game child-appropriate. And being translated to other languages this word can be... translated too creatively...

1.a Using unicode can be an option ( but this requires fixes for pixel font )
1.b Adding log message looks like good addition ( log will be too spammy with it? or not? )

  1. PD creatures behavior much simpler what nethack monsters (let leave real-world creatures alone for now)
    They have following ai states:
    SLEEPING,HUNTING,WANDERING,FLEEING,PASSIVE. (Some mobs have more complex behavior but it implemented by overriding methods such as getCloser & canAttack - which is bad in comparasion to new ai state imho )

Terror buff works simple as follows:
if (buff instanceof Terror) {setState(FLEEING);}

For partial solution we can do not aplly Terror buff for already fleeing Rat ( check Rat.canAttack() )

Or for more complete and complex sollution we can introduce new ai states.

from remixed-dungeon.

swooboo avatar swooboo commented on August 15, 2024
  1. Agreed against curse words.
    a. How hard are the fixes? Maybe until we agree on the logic this should be postponed.
    b. I agree that the log might be too spammy, so first the correct logic has to be in place. If it is good, it shouldn't spam the states and we can add the log messages safely.
  2. Can you explain what will happen if we go forward with the partial solution of ignoring terror if fleeing?
  3. Introducing new AI states seems both complicated and risky, at least to me. What do you think?

Anyway when I have time I'll start experimenting with this.

from remixed-dungeon.

Mikhael-Danilov avatar Mikhael-Danilov commented on August 15, 2024

a. We need add corresponding smile to pixel font, should be not too hard.
b. Agreed.
2. Terror will be applied much less often, curses too.
3. In my opinion new AI states can make code clearer, and mobs smarter, so for me this is preferred way.

from remixed-dungeon.

swooboo avatar swooboo commented on August 15, 2024

Agreed to go forward with a new AI state. I guess a good one is SCARED. In that state the mob will attack only if it can't run away from the hero. What do you think?

Maybe a good start will be to draw the finite state machine diagram of the current implementation (or other representation like a text description of it), and the proposed one so it's easier to follow.

from remixed-dungeon.

Mikhael-Danilov avatar Mikhael-Danilov commented on August 15, 2024

Roughly it looks-like this:

ANY -terror> FLEEING
ANY -attacked> HUNTING
ANY -lullaby> SLEEPING
HUNTING -target lost> WANDERING
SLEEPING,WANDERING-target spotted>HUNTING

from remixed-dungeon.

swooboo avatar swooboo commented on August 15, 2024

So this is the current one:

image

Generated with GraphViz using this code:

digraph finite_state_machine {
	rankdir=LR;
	size="10,10"
	node [shape = circle];
	PASSIVE, HUNTING, WANDERING, FLEEING -> SLEEPING [ label = "lullaby()" ];
	PASSIVE, SLEEPING, WANDERING, FLEEING -> HUNTING [ label = "is_attacked()" ];
	PASSIVE, HUNTING, WANDERING, SLEEPING -> FLEEING [ label = "terror()" ];
	HUNTING -> WANDERING [ label = "target_lost()" ];
	SLEEPING, WANDERING -> HUNTING [ label = "target_spotted()" ];
}

What do you think the SCARED should look like here?

from remixed-dungeon.

Mikhael-Danilov avatar Mikhael-Danilov commented on August 15, 2024

Thanks for great state graph!

I believe we should look at Thief class:
https://github.com/NYRDS/pixel-dungeon-remix/blob/6611f3c22a5902265fb72c60673ca3c4bf287d3d/PixelDungeon/src/main/java/com/watabou/pixeldungeon/actors/mobs/Thief.java

It is privately extends FLEEING state to something very similar to proposed SCARED state. Maybe it worth to reuse it?

from remixed-dungeon.

swooboo avatar swooboo commented on August 15, 2024

I'm frankly having hard time keeping all the info in my head for this discussion, sorry if you'll have to explain some things several times for me.

The code you're talking about:

	private class Fleeing extends Mob.Fleeing {
		@Override
		protected void nowhereToRun() {
			if (buff( Terror.class ) == null) {
				getSprite().showStatus( CharSprite.NEGATIVE, TXT_RAGE );
				setState(HUNTING);
			} else {
				super.nowhereToRun();
			}
		}
	}

Does this mean "If I have nowhere to run and am not terrified, start HUNTING" behavior? Or is there something else?

from remixed-dungeon.

Mikhael-Danilov avatar Mikhael-Danilov commented on August 15, 2024

It is. it is not SCARED as is due to 'terrified' part, but close enough.

from remixed-dungeon.

swooboo avatar swooboo commented on August 15, 2024

Great. I think it might be good to have something similar as well. First thing that I thought:

  1. Scared state will inherit from Mob.Fleeing - If I am scared, I am fleeing, but if I am not scared I can still be fleeing for other reasons.
    1. This will introduce structure to the AI States
    2. On the other hand, this will introduce complexity and might interfere with some other code - if there are instanceof Fleeing lines, they will catch Scared as well and it might introduce bugs.
  2. Once I am Scared but have nowhere to run, I will start Hunting.

I'm still not sure how this will integrate with Ratter Skull and whether it will solve the flipflops of the states we have now (Fear <--> Anger). I mean that it might introduce another flipflop - SCARED <--> HUNTING.

from remixed-dungeon.

Related Issues (20)

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.