Comments (9)
The precision of positioning when using
d2d.*
is lower than when usingdraw.*
. On videos below the health bar is drawn usingdraw.world_to_screen(monster.position)
. Using those coordinates ind2d.fill_rect
gives pretty shaky results whiledraw.filled_rect
is drawn smoothly.
This is entirely because d2d
updates at a lower rate than the draw
API (currently hardcoded to update at 30hz). The rationale for this is simple. Many overlays do quite a bit of work in their draw functions and can cause a non-negligible performance impact for users if ran every single frame.
I plan on making the rate at which d2d
updates user configurable, I just didn't get to it in time for first release.
The quality of text is also seems lower.
You're using a different font so I can't tell what you mean. Can you show a clear example of how the quality is lower?
If you want to do a direct comparison, install Roboto Medium on your computer and use that for REFramework-D2D to really compare the results.
from reframework-d2d.
The precision of positioning when using
d2d.*
is lower than when usingdraw.*
. On videos below the health bar is drawn usingdraw.world_to_screen(monster.position)
. Using those coordinates ind2d.fill_rect
gives pretty shaky results whiledraw.filled_rect
is drawn smoothly.
Fixed in 2da8447. Make sure to copy the new /scripts/autorun/reframework-d2d.lua
over so you can configure the max update rate yourself. The default has been increased to 60hz though (instead of 30hz).
(Also maybe rename fill_rect to filled_rect to match one from imgui?)
Fixed in 9a55217
I've also improved error handling and fixed the freezing issue in abfdda2.
Let me know if this addresses all the reported issues for you.
from reframework-d2d.
The quality of text is also seems lower.
I think I've probably fixed this in 0edfaf9.
from reframework-d2d.
I see. As always thank you for your hard work. I automatically assumed it is at least 60Hz so didn't think of from that perspective. Allowing user to configure it is a good choice.
Improvement suggestion: maybe add auto refresh rate option: when enabled refresh rate matches the refresh rate of the screen (or the game)?
Font quality (on the old version):
roboto_font = d2d.create_font("Roboto", 13, true)
:
(should i be passing "Roboto Medium"
or "Roboto-Medium"
or "RobotoMedium"
?)
roboto_font = d2d.create_font("Roboto", 13, false)
:
Idk something feels off. For example the top of t
is slightly blurred on d2d bold font.
Performance note: Drawing 50-100 small monster UIs caused me 1 fps drop (from 96 to 95) on old version (30Hz) on gtx1070.
https://imgur.com/a/8q8FFzs
from reframework-d2d.
Font quality (on the old version):
roboto_font = d2d.create_font("Roboto", 13, true)
: (should i be passing"Roboto Medium"
or"Roboto-Medium"
or"RobotoMedium"
?)roboto_font = d2d.create_font("Roboto", 13, false)
:Idk something feels off. For example the top of
t
is slightly blurred on d2d bold font.
I think its user preference at that point. I personally prefer the plugins output in your example (both bold and regular). I'm a big fan of DirectWrite output though so I may be biased.
from reframework-d2d.
I am fan of DirectWrite too. But doesn't imgui uses DirectWrite too? I would have expected same results.
I think its user preference at that point.
You are right about this thou xD
from reframework-d2d.
But doesn't imgui uses DirectWrite too? I would have expected same results.
imgui uses stb_truetype which is a very simple (compared to DirectWrite) font rasterizer.
from reframework-d2d.
Fair enough. I have no more complaints xD
from reframework-d2d.
Improvement suggestion: maybe add auto refresh rate option: when enabled refresh rate matches the refresh rate of the screen (or the game)?
This can be accomplished by just setting the max update rate to 300 (or any rate higher than their normal framerate). Assuming people don't hit 300 FPS, it will just run as fast as their FPS.
from reframework-d2d.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reframework-d2d.