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

Change the type of Session.Counter.Value to BigInteger #868

Open
grog398 opened this issue Dec 23, 2024 · 2 comments
Open

Change the type of Session.Counter.Value to BigInteger #868

grog398 opened this issue Dec 23, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@grog398
Copy link

grog398 commented Dec 23, 2024

I am planning on implementing this myself

Yes

Describe your request

For a certain project I'm working on, I am using session counters that will very quickly go above the 32 bit integer limit. For the purposes of this project, it's important that I have the ability to store an arbitrarily large number. Currently, the only feasible way I could see of making this work while maintaining mod interoperability is to directly patch the class itself.

Additional context

No response

@grog398 grog398 added the enhancement New feature or request label Dec 23, 2024
@microlith57
Copy link
Member

this would be useful, but would also break all mods that use counters currently, which seems like a bad idea.
you could implement it using two sets of methods (the current ones using int and clamping, and new ones using a different type); but that could get janky and unintuitive.
finally, i'm not that happy with BigIntegers being the default type, since they have more overhead, an arbitrarily large size in memory / on disc, probably worse serialization, and are not a type that's used anywhere else in celeste.

as such, i would recommend implementing this as a mod feature (perhaps along with double sliders) rather than in Everest itself.

@microlith57 microlith57 self-assigned this Dec 29, 2024
@microlith57
Copy link
Member

cc @JaThePlayer for comments also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants