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

Laggy #2

Closed
Sandermus123 opened this issue Jan 11, 2023 · 2 comments
Closed

Laggy #2

Sandermus123 opened this issue Jan 11, 2023 · 2 comments

Comments

@Sandermus123
Copy link
Owner

I tried scaling the map down, and it didn't lag. The default map is 100*100 blocks (10.000). Every block is a class. They all have properties like: index.x, index.y, pos.x, pos.y, block (type), ic (image coordinates).
Index isn't really needed in a for loop, position can be calculated. Ic can just be a switch statement. That means that the map array (mapArr) is can just be made of the type of every block.

@Sandermus123
Copy link
Owner Author

I want to be able to make the map 500*500 (250000 blocks) that is 24 times more without lag.

@Sandermus123
Copy link
Owner Author

Fixed

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

No branches or pull requests

1 participant