tonihele / OpenKeeper

Dungeon Keeper II remake
GNU General Public License v3.0
437 stars 41 forks source link

Implement creature fighting #264

Open tonihele opened 7 years ago

tonihele commented 7 years ago

Implement creature fighting. Now that they detect each other (https://github.com/tonihele/OpenKeeper/issues/261) they should react to each other. I can make some Arena type of map and test this out. This is a rather complex thing and also a major factor in terms of game play. This is discussion issue. Any observations from the original game should be posted here.

What does the fighting style attribute dictate? When to flee exactly? Where to flee? How to pick up a target? Pursuing? Weapon selection? Hive mind?

For some of these I have a default implementation in mind, and there are some attributes that give a clue what should happen. But any bit helps.

tonihele commented 7 years ago

I'm implementing this in the https://github.com/tonihele/OpenKeeper/issues/261 feature branch. Here is the first working version, no fleeing etc,: https://youtu.be/TpOkFptyb1g

ufdada commented 7 years ago

Wow cool start already 😁

tonihele commented 7 years ago

4h of power prototyping :) I'm trying to implement the features now on a fast track. Leave polishing out. We need to do a lot of refactoring etc. anyway at some point. I would hope us reaching a playable status, implement multiplayer and simple enemy keeper AI. Then polish it all up.

tonihele commented 7 years ago

Basic version of fighting with fleeing has been merged to master. Fleeing will cause the creatures to freeze when cornered to a DHeart currently. They should maybe fight to the death or flee to portals etc.

tonihele commented 7 years ago

https://dl.dropboxusercontent.com/u/90134918/arena.zip <- simple map I used to test the fighting with

tonihele commented 7 years ago

Uuh, what if they only fled when not on their own land and scared? On own land they would only flee if threat too big && (critically wounded || always flee)? As @ufdada pointed out the level 1 you can't really complete because they flee all the time. That dick Antonius is too big of a threat.

ufdada commented 7 years ago

I don't think they flee that much at all. Goblins may flee if they are alone, but mostly only imps are going to flee to the dungeon heart (and then attack every intruder)

tonihele commented 7 years ago

I tweaked it along your comments. Maybe good players never flee? They attack with Dwarfs in early levels, according to math they should almost always flee. There are some flags in the party that also govern this. Changes n the level1 branch. You can actually now complete the level.

ufdada commented 7 years ago

Well this may need some tweaking either way, but it looks good to me for now. We still need to test if there is a difference on how the task was assigned (like calltoarms or dropping them) and how much they actually flee (i think they only were fleeing for a few meters and then returning to their original task)

tonihele commented 7 years ago

I think there was a parameter in the level variables on min & max flee time. The fleeing is really.... well..., only reason I wanted it now was really the imps. So that they wouldn't do tasks that are too far away from home. So at the same time I added a slight feel to it as is it would be completed feature.

Antonius does drop a gem now, and it is totally winnable and lose-able (although he doesn't attack the DHeart). Only that he shouldn't be probably left unconscious, if you are supposed to kill and objective and you manage to incapacitate it -> instadeath.

ArchDemons commented 7 years ago

http://www.gamasutra.com/blogs/SundaramRamaswamy/20161117/285708/Efficient_Field_of_View_and_Line_of_Sight_for_strategy_games.php some interesting link