I have a question regarding how you render "gray" pixels. You said that you use rectangles, because "dithered" pattern had low performance. But the rectangles cause "scanlines", which I presume are because of imprecise mapping to physical pixels.
Have you tried other shapes? Dividing the square by the diagonal should not have this problem, and you're even drawing a simpler shape (triangle vs rectangle).
Chrome definitely supports them on Windows at least, I don't know if it supports them on other operating systems. Here's a test page for the various kinds of color font tables: https://yoksel.github.io/color-fonts-demo/
I have tried other shapes at the pixel level, but not at the sprite level. Example: I draw from the top left pixel, draw the whole row of pixels (use the run length encoding), Then I draw the next row and so on. I haven't tried drawing the top left pixel and then drawing the to the bottom right corner, then moving up/down a diagonal row. You're right that might make it look a lot better, I will have to try it later. I stopped after I got it "good enough", because I wanted to finish the game.
Oh yeah. In that case, I did try that, but for whatever reason it didn't perform well or I wasn't happy with the look. (It was probably performance).
You can play around with the sprite rendering in the code. This [0] is the line for each individual pixel. And this[1] is where I generate the repeated pixel subroutines.
So do I! It saved me a lot of work. I started making it as a web-based react component, and I got to the part where I was doing custom bezier curves and keyframe based animation, and I was like "ah, I'm reinventing the wheel here!" So I switched. The only (possible) downside is that the addon has to be GPL3. I always intended on licensing the engine as GPL3, so it wasn't a problem for me.
Comments (76) 29 threads
Earlier commentsjust van rossum’s rubik’s cube is another recent example of font layout gone too far: https://twitter.com/justvanrossum/status/1340960087750402048...
https://www.darkmoondice.co.uk/collections/handmade-dice-set...
Sorry, waaay off-topic, but I've never seen such incredible D&D dice!
Have you tried other shapes? Dividing the square by the diagonal should not have this problem, and you're even drawing a simpler shape (triangle vs rectangle).
Continue this thread — 1 reply
0: https://github.com/mmulet/font-game-engine/blob/e92a97ecbf8c...
1: https://github.com/mmulet/font-game-engine/blob/e92a97ecbf8c...
[Edit]: Yes, it seems. Very cool!
All comments shown.
Couldn't load more comments. Check your connection and try again.