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

Inquiry About the Integer Limit for Custom Entity Fields in LDtk #1130

Open
mungsaja opened this issue Aug 30, 2024 · 2 comments
Open

Inquiry About the Integer Limit for Custom Entity Fields in LDtk #1130

mungsaja opened this issue Aug 30, 2024 · 2 comments
Assignees
Labels
📈 Enhancement New feature or request 🙋‍♂️ Help wanted Extra attention is needed
Milestone

Comments

@mungsaja
Copy link

Hello,

I’ve been working with LDtk and noticed that when setting custom fields for entities, the maximum allowable integer value seems to be capped at 2,000,000. Could you please clarify the specific reason for this limit? Is it due to JSON handling, internal engine constraints, or another technical consideration?

thanks.

@deepnight
Copy link
Owner

I honestly don't think there's a real reason other than me quickly figuring out a cross-platform limit to Integers when I entered that value.

If you happen to have a better idea on that limit on most classic platforms (JS, C#, C++, etc) that would be super useful and I could adjust the limit accordingly 👍

@deepnight deepnight self-assigned this Sep 7, 2024
@deepnight deepnight added this to the 1.5.4 milestone Sep 7, 2024
@deepnight deepnight added 📈 Enhancement New feature or request 🙋‍♂️ Help wanted Extra attention is needed labels Sep 7, 2024
@mungsaja
Copy link
Author

mungsaja commented Sep 8, 2024

I honestly don't think there's a real reason other than me quickly figuring out a cross-platform limit to Integers when I entered that value.

If you happen to have a better idea on that limit on most classic platforms (JS, C#, C++, etc) that would be super useful and I could adjust the limit accordingly 👍

First of all, thank you for your reply.
I couldn't find specific guidance on the integer limit, so I assumed that the maximum value of a 32-bit integer, which is around 2.1 billion, would be possible. Based on this, I assigned custom ID values exceeding 2 million to entities across various levels. Since the values appeared as entered until the saving process, I didn’t realize the issue until after importing the data into Unity. Upon import, I saw that the values for all entities were reset, which made me realize there was a limit.

It would be great if the full range of 32-bit integer values could be used. Alternatively, it would be helpful to have visual feedback in the input field when the limit is exceeded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📈 Enhancement New feature or request 🙋‍♂️ Help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants