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

neverputt: Add KEY_FALL as SDL_TAB to call goto_state(&st_fall) to take penalty and... #99

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ericgable
Copy link

... continue.
This is for Neverputt.
When the ball is on top of a moving object, the game cannot continue.
This patch allows the TAB to force the st_fall routine, causing the penalty
and continuing to to the next player.

@cryve
Copy link

cryve commented Feb 26, 2017

Why does this fix not have been merged already? The bug ruins a whole course by forcing the player to restart the course.

@parasti
Copy link
Member

parasti commented Feb 26, 2017

To answer your question, as far as it applies to me. I haven't merged this because the proposed patch isn't really up to par (as it were). The problem it attempts to solve is real, of course, but triggering fall-out by pressing TAB is not a good idea. First of all, it's a completely hidden feature to anyone except people who have read this pull request. Secondly, TAB is easy to hit by accident. A better solution in my opinion would be a forfeit / retry button in the pause menu.

@cryve
Copy link

cryve commented Feb 27, 2017

@parasti Thank you for your answer! I agree with you that a retry button would be a better solution.
But after some thinking I came to the conclusion that the game itself should detect a trapped moving ball, instead of given the player a retry trigger. Retry could be used and maybe abused on every occasion the player likes to have a fresh hit and that would shift game balance, even with penalties.

Should I open an issue for this?

@ChallengeSY
Copy link
Contributor

Nice one, although automatic detection would be difficult.

Yes, Forfeit / Retry / Abort could be abused on holes with untimed switches and/or teleports that set the player back. The latter would especially be worth tanking the penalty.

@cryve
Copy link

cryve commented Feb 28, 2017

@ChallengeSY I'm not familiar with the Neverball engine, but maybe a logic could do something like this:

while: ball touches obstacle
 while: ball movement equals the obstacles movement
   if: this state lasts longer than [10] seconds
    call: <release logic>

The release logic could force a retry / forfeit or it could place the ball nearby to an appropriate location in front of the obstacle for the next stroke, like in realworld mini golf when the ball is against a rail or obstacle).

@rlk
Copy link
Member

rlk commented Feb 28, 2017

There's no such thing as "while the ball touches an obstacle." There are dozens of tiny bounces per second happening. They're just too small to be visible or to trigger the "bonk" sound.

Likewise, there's no such thing as "ball movement equals the obstacle's movement". A moving body has a generally constant motion, but again, the ball is making microscopic velocity changes both with and against this motion.

This is generally due to the imprecision of floating point computation that plagues all physical simulation.

@ericgable
Copy link
Author

Yes - the TAB key is obviously a hack. I'll look at putting in the pause menu.

@cryve
Copy link

cryve commented Mar 1, 2017

@rlk Thanks for clarifying this!
@ericgable To avoid abuse the retry / forfeit button could be disabled until certain amount of time has passed after a stroke.

@camthesaxman
Copy link
Member

The main bug we have is that the ball does not properly respond to gravity and friction during the aiming phase. This must be corrected since there are a handful of courses with moving objects that will collide with the ball occasionally, but still allowing a large enough window of time for the ball to stop and the player to start aiming.

@ChallengeSY
Copy link
Contributor

ChallengeSY commented May 19, 2018

Seems like the importance of allowing aborted strokes has increased in response to a recent discovery on the original course (#203).

Version 1.6.0 introduced a regression on Original Course hole 15, allowing a golf ball to stay on one of the moving platforms indefinitely, soft locking the game as a consequence.

Alternatively, a new ticket can be opened for fixing or replacing Original Course hole 15.

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

Successfully merging this pull request may close these issues.

6 participants