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

ghost: support marathons #64

Merged
merged 5 commits into from
Nov 1, 2022
Merged

Conversation

matthewearl
Copy link
Contributor

Fixes #63

Still needs a bit more testing, but I've tried it out with Muty's 12:11 id1. On my machine loading end with the ghost enabled is apparently instant, which should be the slowest map to load since it has to go through the entire demo.

@matthewearl matthewearl changed the title support single dem marathons ghost: support marathons Oct 15, 2022
@matthewearl
Copy link
Contributor Author

I've added a new commit which adds support for multi-demo marathons chained with a stuff_text "playdemo". Updated the PR title to reflect this.

@matthewearl
Copy link
Contributor Author

There's a merge conflict on this branch with #60 relating to whether Ghost_ReadDemo takes a char * or a FILE *, I'll sort it out when the time comes.

requires issuing a command from the server to indicate first map of the
marathon, since it is not possible to discern the rest of the info
received by the client
@matthewearl
Copy link
Contributor Author

I've added a couple of commits which track ghost split times for marathons
image
The tricky bit in this commit is informing the client when the marathon starts. I've handled this by adding a command marathon which is stufftext'd by the server after sending the server info indicating whether this is the first, or the subsequent level of a marathon.

@matthewearl
Copy link
Contributor Author

matthewearl commented Nov 1, 2022

I've fixed the conflicts. Separate to that, there's a slight annoyance with the marathon command in that when you playback a demo recorded with this version of joequake on an older version (or not joequake at all) then you get an "unknown command: marathon" message at the start of each level. I could instead hack some other command to hide it entirely? For example, I could encode it in the looptrack argument of svc_cdtrack which as far as I can tell has always been ignored. Thoughts?

@matthewearl
Copy link
Contributor Author

matthewearl commented Nov 1, 2022

In fact, if I use an svc_print in the server info packet it doesn't appear on the screen (it appears when you pull down the console). I should be able to eliminate the message on marathon start too, just requiring a message for marathon continuation. So this would just be a svc_print with a message like "Continuing JoeQuake marathon", which would be less alarming than an "unknown command" error on the screen on every map load, which can still be parsed programmatically. Also less hacky than the svc_cdtrack solution.

@j0zzz
Copy link
Owner

j0zzz commented Nov 1, 2022

Yeah, I like the solution using the svc_print server command. Putting into the svc_cdtrack seemed like a nasty hack to me either.

@j0zzz j0zzz merged commit 500d37e into j0zzz:master Nov 1, 2022
@matthewearl matthewearl deleted the me/ghost-marathon branch August 24, 2023 06:06
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.

ghost: support marathon demos
2 participants