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

Level optimization #58

Open
getkey opened this issue Jul 16, 2021 · 0 comments
Open

Level optimization #58

getkey opened this issue Jul 16, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@getkey
Copy link
Owner

getkey commented Jul 16, 2021

Sometimes levels can contain long numbers, probably because of floating point issues. It increases the size of levels while not adding any useful information.

Example from [luw4n on Discord](https://discord.com/channels/526188679006388254/681629693501243393/863836754905268264)
		{
			"type": "deadly",
			"params": {
				"isStatic": true,
				"vertices": [
					{
						"x": 300,
						"y": -88.00000000000001
					},
					{
						"x": 300,
						"y": -89.00000000000001
					},
					{
						"x": 290,
						"y": -109.00000000000001
					},
					{
						"x": 280,
						"y": -89.00000000000001
					},
					{
						"x": 270,
						"y": -109.00000000000001
					},
					{
						"x": 260,
						"y": -89.00000000000001
					},
					{
						"x": 250.00000000000003,
						"y": -109.00000000000001
					},
					{
						"x": 240.00000000000003,
						"y": -89.00000000000001
					}

It would be great if the levels could be optimized, either:

  • automatically in the editor after each edition
  • automatically in the editor on upload
  • manually in the editor (a button that asks the precision you need?)
  • automatically by the backend

I'm not sure what's the best option for now, so tracking that here. I've added the functionality to BLT: getkey/bombhopperio-level-tools@e0134d8, which should be useful whatever the decision.

@getkey getkey added the enhancement New feature or request label Jul 16, 2021
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

1 participant