Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic factions #609

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Dynamic factions #609

wants to merge 14 commits into from

Conversation

gersseba
Copy link
Contributor

@gersseba gersseba commented May 4, 2014

Attacking, ramming other ships has diplomatic consequences.
generally neutral npc react stronger than good friends or fierce enemies.
Every change in relations has sideeffects on all other relations to the other factions. The more the like or dislike the attacked faction, the stronger the side effect (killing police will make the pirates like you)
Lastly I introduced personal (character-based) friendliness to other worldobject. Shooting at a lonely police ship might not make the entire police force hate you, but the ship's pilot will, and he will attack back. This personal friendliness declines over time back to the faction relation.

@mrzzzrm
Copy link

mrzzzrm commented May 4, 2014

build failed ;)

damn case sensitive unix
@gersseba
Copy link
Contributor Author

gersseba commented May 5, 2014

now it doesn't

@mrzzzrm
Copy link

mrzzzrm commented May 14, 2014

It certainly goes into the right direction and gives the game a dynamic touch, but without looking at the code I can't really tell whether its flexible enough ;) In case you haven't noticed, I put this on the meeting agenda, I think its worth to be discussed in person

@mrzzzrm
Copy link

mrzzzrm commented May 19, 2014

Build fails, since we don't have an implementation for std::hash<Handle<...>> yet. Can simply be forwarded to a std::hash of the pointer, if we ignore that a free'd pointer might be allocated by the next new again, leaving us with undefined behaviour.

@gersseba
Copy link
Contributor Author

@mrzzzrm I added the hashes, please try again, when ok I will merge the master back into it

@gersseba
Copy link
Contributor Author

gersseba commented Aug 9, 2014

fixed bug that came with a previous merge, also added a delay before friendliness is reset to faction default.



Character::Character(Ship& ship, Faction& faction):
m_ship(ship),
m_faction(&faction),
m_task(nullptr)
m_task(nullptr),
m_world(World::instance())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as we have the Singleton, we should use it. Not some obscure pointer that was once retrieved from this singleton

@mrzzzrm
Copy link

mrzzzrm commented Aug 10, 2014

The dynamic function stuff REALLY bloats up the character code and is pretty obscure at times. Things like the dynamic_factions need to be carefully balanceable, and long methods doing tons of stuff under one name don't really help here.
Normally I would request quite some restructuring here, but since we're trying to get all PRs into the master somehow, I'll let this pass if you fix the complaints I made. Thanks ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants