Jump to content
  • Advertisement
Sign in to follow this  
suliman

Sprite-based fonts messed up after move to new computer

This topic is 431 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi

Im using a 2d engine (HGE, uses directX 8.0) for my games. After buying a new computer with another graphicscard (and moving from win 7 to win 10), my fonts are sligthly messed up (missing some parts) in all my games. Im using the same monitor as before. See attached image (second "f" of effect is ugly, some of the numbers are missing, "o" of population is ugly).

The fonts are drawn as sprites from a image file containing all letters. However the same letters work in same cases and looks ugly in others. Also, this problem ONLY occurs when I run my games in windowed mode with less than native resolution (which is 1920x1080). In fullscreen mode (even if scaled down, eg 1366x768) or in 1920x1080 windowed the fonts look fine.

What could be the issue? Something with win 10?

Thanks!

 

error font.jpg

Edited by suliman

Share this post


Link to post
Share on other sites
Advertisement

Sounds like some combination of the new video card (which probably means new video driver), and non-native resolution, and possibly the new OS. There are too many variables at play here for me to give you a definitive answer. 

You might be able to tweak your video driver's antialiasing and texture filtering settings (and probably other stuff I'm forgetting off the top of my head). You may also be able to play with screen resolutions. 

Edited by masskonfuzion

Share this post


Link to post
Share on other sites

I have had the same problem using fully managed C# code to draw a font into a bitmap resulting in the very same image as yours when moving to Win7. It might have something caused by the native rendering code in Windows that causes these kind of issues. In C# it helped to set anti aliasing properly, maybe your engine is that old that it assumes occurence of some kind of MSAA beeing activated by default

Share this post


Link to post
Share on other sites

nope, tested all my settings in the nvidia control panel. Still broken fonts :( (using gtx 970 now)

Share this post


Link to post
Share on other sites

I've had the same problem in one of my projects, and only in windowed mode.. It turned out that my window wasn't resized properly to match the resolution (the size is including the windows border etc., which changes from Win7 -> Win10), so a few lines were lost due to a very small downscaling. So try and go through your windows creation code :)

Share this post


Link to post
Share on other sites

Ah im using an engine so I never really deal with that part of it... Would be a shame to drop windowed support for my games and also annoying during development (faster to debug in windowed mode).

Maybe change window size if not in fullscreen mode? (instead of 1600x900 i try 1650x950 for example)

Share this post


Link to post
Share on other sites

Are you using AdjustWindowRect for resizing your window?

https://msdn.microsoft.com/en-us/library/windows/desktop/ms632665(v=vs.85).aspx

This function makes sure you get the right clientwindow size no matter how big titlebars, menus, borders etc. are.
On the other hand you can also adapt you backbuffer to the real clientsize so you can handle every windowsize.

Edited by Auskennfuchs

Share this post


Link to post
Share on other sites

If you can get the HWND of the window you can call AdjustWindowRect() yourself :)

But I would highly recommend you switch to a more modern engine that doesn't use DX8, don't know any of them though as I write my own.. Or better yet, make your own: shouldn't be hard to make a simple 2D engine yourself using DX9, and as a result you'll get shader support which can do really great stuff for you!

 

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!