Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Goombert

1441
Developing ENIGMA / Re: Font Fractional Metrics
« on: May 20, 2014, 06:23:21 PM »
Quote from: Darkstar2
Well it's good to know we don't have this issue in ENIGMA. Nice find.  Thanks for the fix.
You mean, we don't have them anymore. I would also appreciate if you could download the Portable ZIP and double check there is no font blurriness for you in both OpenGL 1 and Direct3D 9.
http://enigma-dev.org/docs/Wiki/Install:Windows

And yes this does affect sprites/backgrounds and everything else drawn orthographically, it means there should not be any half-pixel alignment issues, you should never get blurriness from drawing a sprite or text or anything at fractional pixels, for instance x=1.5670 and or y = 2.3568

Quote from: Darkstar2
BTW, as I recall GM always used DX9, right ?  Does GMS still use DX9 ?
GM does not use just DirectX anymore, it uses Googles' Almost Native Graphics Layer Engine, also known as ANGLE. Which is also used by the Qt Framework, Firefox, and Chrome.
https://code.google.com/p/angleproject/

That's how they allow HLSL shaders in games on Linux, theoretically of course, I have not proven it. We decided to just stick with basic Direct3D and OpenGL since it is both lighter weight and well, nobody really gives a fuck about Direct3D because it is not cross-platform.

1442
Developing ENIGMA / Re: Font Half-pixel Alignment
« on: May 20, 2014, 02:19:38 PM »
No you're still not listening, it happens with assigned fonts as well, that picture from Studio is with an assigned font. Sprites will do the same in Studio as well. After my changes yesterday you should not have this problem in ENIGMA

Make a blank font and leave the default settings then add this draw code to a new object, place it in a room, and run it.
Code: (GML) [Select]
draw_set_font(font0);
draw_text(0, 0, "Hello, world!");
draw_text(1.5,20.5, "Hello, world!");

In Studio you get the image above, in ENIGMA, everything is good.


See? Because we half pixel aligned the projections like vector graphics should be, you will not ever have this issue with ENIGMA as of the changes yesterday.

1443
Developing ENIGMA / Re: Font Half-pixel Alignment
« on: May 20, 2014, 01:46:11 AM »
What? No I think you are not understanding, the top "Hello, world!" was drawn at a half-pixel and is visibly blurry, the bottom one is not.

1444
Developing ENIGMA / Re: Font Half-pixel Alignment
« on: May 19, 2014, 10:02:58 PM »
On a funny side note, the latest version of Studio 1.3.1344 just released also has buggy pixel alignment.

1445
It's definitely not LGM, that's ENIGMA, run the latest LGM without the plugin and it won't crash, I guarantee it.

1446
Try tweaking settings.ini
idecommand="java -jar -Xms256m -Xmx1000m"

256m is reserved on startup for LGM, and the max it can go is 1000m. I really don't see how you could have exceeded that.

1447
Developing ENIGMA / Font Fractional Metrics
« on: May 19, 2014, 06:43:23 PM »
Well, after rigorous testing I have learned a lot of things about half-pixel alignment between Direct3D and OpenGL.

* You can not half-pixel align in the view or the bottom and right edges will be empty on the screen, or do similar for surfaces.
* You must add not subtract the pixel alignment in the projection function, if you subtract you'll get a similar issue to views.
* 0.25 appears to work the best in all cases, 0.5 may be driver/graphics card dependent
* OpenGL can not do a full half-pixel alignment (0.5) or games with repeating/scrolling backgrounds will skip and have a 1px gap sometimes between them.
* OpenGL and Direct3D pixel align differently, for instance, 0.25 is used in both systems, but when rendering text, you'll notice OpenGL has a space between lowercase 'r' and 't' whereas Direct3D does not, and Direct3D has a space between uppercase 'T' and 'Y' where OpenGL does not. One solution to this is to round up the glyph sizes in the font struct initialization.

NOTE: I used GM8 not 8.1, regardless of what the caption says, which did not have anti-aliasing options and by default used interpolation to render the font. And in ENIGMA I had the anti-aliasing disabled.



You can see GM8.0 renders the same as our Direct3D 9 system except it has interpolation because there were no aliasing options and it is turned off in ENIGMA. I used this code to test.
Code: (EDL) [Select]
draw_set_font(font0);
draw_set_color(c_black);
draw_text(0,0,"01234567890!@#$%^&*()_+-={}[]:;|\?/>.<,
QWERTYUIOPASDFGHJKLZXCVBNM
qwertyuiopasdfghjklzxcvbnm"
);

However, we still have the issue of the last bullet there. Because of font characters having fractional dimensions, they can still very easily become malaligned. The only solution I have thought of is to round up their dimensions, or else we need to find a way to truly fix half-pixel alignment.

Upon investigating the plugin I discovered that IsmAvatar has disabed fractional font metrics, which means subpixel accuracy. Or in other words the metrics should already be integer spaced.
http://docs.oracle.com/javase/7/docs/api/java/awt/RenderingHints.html#KEY_FRACTIONALMETRICS
https://github.com/enigma-dev/lgmplugin/blob/master/org/enigma/EnigmaWriter.java#L687

1448
General ENIGMA / Re: Inheritance Fixes
« on: May 19, 2014, 11:59:03 AM »
No, that's not normal, and I know exactly what is causing it, I'll have to inform Josh.

1449
Issues Help Desk / Re: Problems with multiple views
« on: May 19, 2014, 11:49:54 AM »
Probably something to do with not flipping the backbuffer, most likely an easy fix.

1450
Luckily I still have time to do some minor fixes.

https://github.com/enigma-dev/enigma-dev/pull/724

You can update through git or download the new Portable ZIP.
http://enigma-dev.org/docs/Wiki/Install:Windows

Edit: I also encountered another issue with gradients, they are different than GM8.1 and I fixed them in the following pull request.
https://github.com/enigma-dev/enigma-dev/pull/726

1451
Off-Topic / Re: Seeya in a few months!
« on: May 17, 2014, 12:21:49 AM »
Where the fuck are you going TKG?

1452
Programming Help / Re: Instance Creation Codes
« on: May 14, 2014, 01:44:20 PM »
Yes Harri, you are correct, but Studio also does it backwards like we do for the same reason, I think.

1453
Programming Help / Re: Instance Creation Codes
« on: May 13, 2014, 10:35:16 PM »
I'm pretty sure that is correct, you may have Instance Create and Create backwards.
https://github.com/enigma-dev/enigma-dev/blob/master/ENIGMAsystem/SHELL/Universal_System/roomsystem.cpp#L168

So Create->Instance Create->Game Start->Room Create->Room Start

1454
Works in Progress / Re: PIT²
« on: May 12, 2014, 07:53:30 PM »
I like GIMP but I can't break myself from using Paint.NET :/ Even though PDN is pretty laggy.

1455
Works in Progress / Re: God of Man
« on: May 12, 2014, 07:47:50 PM »
Whoops sorry, I moved the file, anyway, it's like a puzzle game, it's just like the game I based it off of.

Here is the inspiration.
http://www.gamemakergames.com/archive/age-of-man

Here is where I reviewed it in Markup Magazine Issue #9 Page 30 whenever I was a little tike.
https://archive.org/details/GmkingsMarkupMagazine-Issue9