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

Console Sizing Issues #296

Closed
bayou-brogrammer opened this issue Sep 26, 2022 · 6 comments
Closed

Console Sizing Issues #296

bayou-brogrammer opened this issue Sep 26, 2022 · 6 comments

Comments

@bayou-brogrammer
Copy link
Contributor

I'm trying to figure out if I'm crazy, or if there is a bug within bracket lib. I creates an 80x50 simple console and populated it with a floor and some mountain ranges (just using 'n' char), but the console seems extremely small.

CleanShot 2022-09-26 at 18 26 09@2x

i wanted the window to be around 960x720 for better readability, but if I increase the console size, it only changes how many pixels are drawn.

This is 120x90 console.

CleanShot 2022-09-26 at 18 36 17@2x

Im on a m1 mac and these are my specs.

CleanShot 2022-09-26 at 18 36 55@2x

@bayou-brogrammer
Copy link
Contributor Author

Did some digging and started playing around with with_tile_diomension and with_demension to achieve what I wanted. I noticed something very interesting between the deployed code and your git branch. With this setup im using terminal8x8 but with tilesize of 12.
CleanShot 2022-09-27 at 11 21 42@2x

On the git branch there is pixel tearing:

CleanShot 2022-09-27 at 11 22 28@2x

but on the 0.8 version from crates.io, there is no tearing:

CleanShot 2022-09-27 at 11 23 01@2x

@bayou-brogrammer
Copy link
Contributor Author

Digging backwards in the commits, the problem starts whenever Scalar2 was introduced 4b47507

@thebracket
Copy link
Collaborator

I'm wondering if your initialization is actually what you want to do? Using the simple constructor gets you a simple terminal, and then you're loading a "fancy" terminal as the second layer - and you're setting the font size for that one? I don't see tearing when I use:

    let context = BTermBuilder::new()
        .with_font("terminal8x8.png", 8, 8)
        .with_fancy_console(80, 50, "terminal8x8.png")
        .with_tile_dimensions(12, 12)
        .build()?;

With that said, if you want a 12x12 - I'd recommend grabbing a font of that size. There are some great ones here: https://dwarffortresswiki.org/Tileset_repository#12.C3.9712

@bayou-brogrammer
Copy link
Contributor Author

bayou-brogrammer commented Oct 4, 2022

Interesting. I believe it mainly happens with the horizontal bar. I updated the example to just draw a bar across the screen. That being said, if I use a 12x12 font, the tearing seems to not happen. I should also note using the 8x8 font, and then forcing the tile_size to (16,16) doesn't cause tearing either. So I guess its the 1.5x difference for the 8x8 font which causes some weird scaling issues

https://github.com/lecoqjacob/bracket-lib/tree/tearing-issue

CleanShot 2022-10-04 at 13 39 52@2x

@thebracket
Copy link
Collaborator

thebracket commented Oct 11, 2022 via email

@bayou-brogrammer
Copy link
Contributor Author

Oh no problem! Family comes first. I'll close this issue as it seems it can be resolved with choosing an appropriate font size

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

2 participants