Skip to content

Comments

gameplay: fast NPC drop#128

Merged
mgerhardy merged 5 commits intomgerhardy:masterfrom
cryham:fast-npc-drop
Mar 9, 2025
Merged

gameplay: fast NPC drop#128
mgerhardy merged 5 commits intomgerhardy:masterfrom
cryham:fast-npc-drop

Conversation

@cryham
Copy link
Contributor

@cryham cryham commented Mar 7, 2025

Fixes this annoying bug when I land on platform and nothing happes, NPC stands still, because I didn't land (IMO way too) perfectly and I have to start and land again which is frustrating and not playable.
So this IMO fixes the sluggish Taxi gameplay. I'd like this instead, it's way better for all of taxi maps I add. NPCs feel quicker too.

@cryham cryham changed the title Fast npc drop gameplay: Fast NPC drop Mar 7, 2025
@cryham cryham changed the title gameplay: Fast NPC drop gameplay: fast NPC drop Mar 7, 2025
// -1/sqrt(2)
if (worldNormal.y >= -0.707)
// not from above - then we don't care // -1/sqrt(2)
// if (worldNormal.y >= -0.707) // old
Copy link
Owner

Choose a reason for hiding this comment

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

there is no need to keep the old commented code

const b2Manifold *maniFold = contact->GetManifold();
if (maniFold->pointCount < 2)
return;
// if (maniFold->pointCount < 2) // old
Copy link
Owner

Choose a reason for hiding this comment

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

there is no need to keep the old commented code

return false;
_triggerMovement = _time + 200; // 600
GameEvent.announceTargetCave(getVisMask(), *this, 1400); // 1200
return true; // false;
Copy link
Owner

Choose a reason for hiding this comment

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

wouldn't this start the movement right is in the same moment the announcement was made?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, kind of fast. I think with so many transfers it's a wasted player time to wait. Good for beginners.
Users can either se the announcement while npc walks or on HUD (top).
Now gameplay focues on flying.


bool Player::isLanded () const
{
if (!b2Vec2Equals(getLinearVelocity(), b2Vec2_zero))
Copy link
Owner

Choose a reason for hiding this comment

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

why is this removed here? can the player land now by sliding over the cave platform?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. No need to land perfectly from above. Now there is no need to start and land again if not.
Also before I could never land with wind present.

Copy link
Owner

Choose a reason for hiding this comment

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

so maybe we shouldn't check for zero here, but some epsilon? Otherwise the player might trigger npcs by just flying by fast - and sliding over the cave plattform.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So far I tested, it works okay. I can fly by low. NPC will only start walking when player is reachable by platform, a check in other place.

@mgerhardy mgerhardy merged commit fde575f into mgerhardy:master Mar 9, 2025
3 of 4 checks passed
@cryham cryham deleted the fast-npc-drop branch March 9, 2025 16:18
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.

2 participants