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

Suggestion: Custom font #133

Open
segeljakt opened this issue Jan 23, 2017 · 3 comments
Open

Suggestion: Custom font #133

segeljakt opened this issue Jan 23, 2017 · 3 comments
Labels

Comments

@segeljakt
Copy link

Have you considered creating a custom font for the game which is loaded when the game starts? For example see my game: https://media.giphy.com/media/d1E2GIbl1ulFhxNS/giphy.gif. It makes things look nice and also makes it possible to do more fine-grained collision detection. I used http://www.pentacom.jp/pentacom/bitfontmaker2/ to create the font and I have made it work on Mac, I have not tried on Linux but it should be plausible.

@olls
Copy link
Member

olls commented Jan 23, 2017

That's a cool idea! I would like as much as possible for the game to work with as little user configuration as possible, but we could try an optional font to enhance the game. So far we've been using Unicode with fallbacks to ASCII, so a font layer on top could work in a similar way.

Could you elaborate on the collision detection, how does having a custom font help?

@segeljakt
Copy link
Author

segeljakt commented Jan 24, 2017

In my game it looks like this without a custom font:
(1) https://media.giphy.com/media/l0Exd4LeEMBQEioAU/source.gif

With a custom font, each symbol physically takes up 8x8 pixels but visually takes up 16x16:
(2) https://media.giphy.com/media/l3q2wqJKrCEZ7Vrr2/giphy.gif

If symbols in the custom font would physically take up 16x16 and visually take up 16x16 (similar to Unicode and ASCII), it would look like this:
(3) https://media.giphy.com/media/l3q2uM3t6c4y3UKxq/giphy.gif

The custom font (2) improves collision because units do not need to be aligned with the block grid, so the units can collide in more places on each block.

@olls
Copy link
Member

olls commented Jan 24, 2017

Ah I see, that's really cool. That would be good to try out in Pycraft at some point and see if it is worth keeping (and made to be backwards compatible with default font).

@olls olls added the question label Jan 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants