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 units to virtual pixels #18

Open
drobilc opened this issue Oct 21, 2018 · 1 comment
Open

Change units to virtual pixels #18

drobilc opened this issue Oct 21, 2018 · 1 comment
Labels
question Further information is requested

Comments

@drobilc
Copy link
Collaborator

drobilc commented Oct 21, 2018

Instead of using percentage units, we should use virtual pixels to draw our rooms and items, allowing players to create rooms that are not square.

We should also add multiple scaling options, for example Scaling.REAL, which would mean that each virtual pixel is exactly one real pixel, Scaling.FILL_PARENT to stretch the room to it's parent canvas size, etc.

@drobilc drobilc added the question Further information is requested label Oct 21, 2018
@hostops
Copy link
Owner

hostops commented Oct 22, 2018

I think that it would make framework much more complex to use and to maintain. It could be useful pro feature - for those who want more. But this framework is meant for kids. When you want more than it offers, you can simply write your own functions in JavaScript . We can give them convert functions that helps them do that:
game.addAngryRobot(pixelsToPercents(224));
Not squared rooms could exists but best would be in way with percents.
new Room(0.5, 0.5);
Or with direct pixels:
new Room(pixelsToPercents(250), pixelsToPercents(250));
But maintaining project where you will have to support multiple options, scaling and virtual pixels would be painful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants