Code Monkey home page Code Monkey logo

Comments (2)

sigonasr2 avatar sigonasr2 commented on July 19, 2024

DrawStringDecal uses DrawPartialDecal to render each character and this seems to happen with other things that use it too (try drawing a bunch of tiles next to each other and playing with it in emscripten with a dynamic scrolling view while running around)

My hack I've used for my games is by changing the following lines in olcPixelGameEngine.h (Line 2849-2850) to the following:

		olc::vf2d uvtl = (source_pos + olc::vf2d(0.01f, 0.01f)) * decal->vUVScale;
		olc::vf2d uvbr = uvtl + ((source_size - olc::vf2d(0.02f, 0.02f)) * decal->vUVScale);

(Including the link to the original lines of the PGE just to be safe https://github.com/OneLoneCoder/olcPixelGameEngine/blob/master/olcPixelGameEngine.h#L2849C1-L2850C95)

These numbers gave me the best results without sacrificing too much. The only reason this would be an issue is if you have a really tiny screen resolution, then it cuts off too much of the visible texture.

This should be considered a hack and not necessarily the acceptable solution to this problem however.

from olcpixelgameengine.

TuxxuT avatar TuxxuT commented on July 19, 2024

@sigonasr2 Thank you so much! That solved my problem with the display. I'll take a closer look at it again, but the letters are clearer now...

from olcpixelgameengine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.