-
Notifications
You must be signed in to change notification settings - Fork 27
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
Conversation
Rebase latest before generating PureDOOM.h |
menuactive = false; | ||
M_StartMessage("A secret is revealed!\n", doom_secretFound, false); | ||
menuactive = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the 2 menuactive
?
There was a problem hiding this comment.
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.
src/DOOM/m_menu.c
Outdated
S_StartSound(0, sfx_getpow); | ||
} | ||
|
||
if (I_GetTime() >= lastTime + 20) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
|
} | ||
|
||
int curTime; | ||
doom_gettime(&curTime, &usec); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Did another try:
An idea to make this easier to do, and less bug prone:
|
I'm pretty sure I have it play a sound. Maybe I accidentally removed the sound somehow. |
No description provided.