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

Track playtime and display it in the launcher #336

Merged
merged 31 commits into from
Nov 6, 2023
Merged

Conversation

NeoFoxxo
Copy link
Contributor

@NeoFoxxo NeoFoxxo commented Oct 3, 2023

Adds feature requested in #320

@NeoFoxxo
Copy link
Contributor Author

NeoFoxxo commented Nov 3, 2023

Now that jak 2 is available I need to distinguish between them and add the playtime on its game page lol

dependabot bot and others added 19 commits November 3, 2023 15:03
…al#335)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…open-goal#332)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…open-goal#340)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…l#339)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…goal#338)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…al#354)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…goal#349)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…open-goal#348)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…pdate (open-goal#345)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…en-goal#355)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@xTVaser
Copy link
Member

xTVaser commented Nov 4, 2023

I took a quick look at this and tried out some things to clean it up, mainly just to show how you can store the time played in the central configuration instead of writing out text files.

I was successful NeoFoxxo/launcher@main...xTVaser:v/wip-improvements but uncovered a weird issue. The game seems to take 30-40 seconds to start OpenGL:
image

So the process starts immediately but then nothing happens for a while. I don't really have any ideas why this is happening.

I have this same problem when running your original code as well, so something strange is happening for both of us (or i guess, maybe just me lol)

actually this seems to happen to me when running the normal project now...might just be me!

@NeoFoxxo
Copy link
Contributor Author

NeoFoxxo commented Nov 5, 2023

I tested it on my machine and it works perfectly! Now I just got to read the settings file on the front end

@NeoFoxxo
Copy link
Contributor Author

NeoFoxxo commented Nov 5, 2023

Alright I made a rpc function to send the playtime to the front end and its working for me

@xTVaser
Copy link
Member

xTVaser commented Nov 5, 2023

Nice sounds good, yeah my issue was some weird driver issue (even got a BSOD when restarting) completely unrelated. I'll give it another test soon as well and then this'll probably be good to go.

Thanks for doing the work / waiting around while we got over the jak 2 release hurdle 👍

@NeoFoxxo
Copy link
Contributor Author

NeoFoxxo commented Nov 5, 2023

Thanks for getting it to save to the settings file I was struggling with that lol. Also sorry about the formatting i probably should've got my prettier to work

@xTVaser
Copy link
Member

xTVaser commented Nov 5, 2023

For the frontend you can run yarn format and for the backend, I use VSCode with Rust Analyzer and it automatically formats on file-save.

Copy link
Member

@xTVaser xTVaser left a comment

Choose a reason for hiding this comment

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

Looks good to me, I'll let you give it a last once-over since I pushed some more commits cleaning up some of my code. I also added support for seconds
image
image

@NeoFoxxo
Copy link
Contributor Author

NeoFoxxo commented Nov 5, 2023

It works fine for me but I think adding seconds makes the UI more cluttered imo, it looks better with just the minutes.

@xTVaser
Copy link
Member

xTVaser commented Nov 6, 2023

That's fair, i added them mostly just so i could quickly test and see it working. I'll revert that portion and merge it then 👍

@xTVaser xTVaser merged commit 41e3581 into open-goal:main Nov 6, 2023
7 checks passed
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.

3 participants