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

Print message when discovered a secret #13

Closed
wants to merge 6 commits into from
Closed

Print message when discovered a secret #13

wants to merge 6 commits into from

Conversation

ColleagueRiley
Copy link
Contributor

No description provided.

PureDOOM.h Outdated Show resolved Hide resolved
PureDOOM.h Outdated Show resolved Hide resolved
PureDOOM.h Outdated Show resolved Hide resolved
PureDOOM.h Outdated Show resolved Hide resolved
@Daivuk
Copy link
Owner

Daivuk commented Mar 31, 2024

Rebase latest before generating PureDOOM.h

Comment on lines +1011 to +1013
menuactive = false;
M_StartMessage("A secret is revealed!\n", doom_secretFound, false);
menuactive = false;
Copy link
Owner

Choose a reason for hiding this comment

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

Why the 2 menuactive?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The function changes menu active iirc. I want to ensure it's not marked as active.

S_StartSound(0, sfx_getpow);
}

if (I_GetTime() >= lastTime + 20)
Copy link
Owner

Choose a reason for hiding this comment

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

Tried it and 20 frames (0.57 seconds) is really not long enough. Could we put it for like 50 frames (1.5 sec) maybe? What's the standard in other popular source ports that added this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe. I can check the standard for gzdoom. The only concern about making it longer is that it seems to pause player movement if it's too long.

@Daivuk
Copy link
Owner

Daivuk commented Mar 31, 2024

Don't commit PureDOOM.h, I will generate it myself. that file is what we "release".
Actually nevermind that, the tests are currently using that file. So make sure to generate it.

}

int curTime;
doom_gettime(&curTime, &usec);
Copy link
Owner

Choose a reason for hiding this comment

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

You should use the other gettime, that you used before you change it. Which counts in frames. That way it ensure the simulation is the same every time you replay or play a demo.

Also altho it went by really fast, it was fine I tested it. You can put it back to 20 frames. Especially if you found it removes player control if longer than that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm confused. Wouldn't it be more standardized if you go by seconds instead of frames? The time it takes for 20 seconds to pass remains the same but the time it takes for 20 frames to be drawn might differ.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, there's most definitely a way to do this without freezing the player. I'll look into better ways of doing it.

Would you mind if the message is in the top left hand corner or would you prefer it in the middle, similar to gzdoom.

Copy link
Owner

Choose a reason for hiding this comment

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

No, you want a number of frames. Not real time. If the game sudently lags, then real time 20sec will be a different amount of time. So if I replay the exact same run, it won't be deterministic.

I prefer at the top left because doom already has the code for this, similar to how to pick up an item. So the code change will be smaller and less risky.

@Daivuk
Copy link
Owner

Daivuk commented Mar 31, 2024

Did another try:

  • Looks like i'm losing key inputs while this message popup. This is obviously unacceptable. Looks like it happens if you release a key while message is up, and press down again. That new down is not registered.
  • No more audio cue when finding secret. I liked that touch. Or am I just not hearing it?

An idea to make this easier to do, and less bug prone:

  • Show a message in the top left. This is already used when picking up items
  • Play a sound

@ColleagueRiley
Copy link
Contributor Author

I'm pretty sure I have it play a sound. Maybe I accidentally removed the sound somehow.

@ColleagueRiley ColleagueRiley closed this by deleting the head repository Mar 31, 2024
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