Open oomek opened 4 years ago
If I run this code in mine I get the below error: `Script Error in /home/rogalian/.attract/layouts/Verticools Deluxe/layout.nut - the index 'instance' does not exist
Reason for trying - I want to know if it's possible to find + reuse the font size AM is using in it's configuration menu (at low resolutions it always appears to render its own text really well with no tricks required)
You have to create an instance
object first for example local instance = fe.add_text("test",0,0,100,100)
and compare the console output with an instance of some class local instance = SomeClass()
I don't think that you can access the font size AM is using for the overlays. What kind of tricks you're refering to?
Setting fe.layout.width and fe.layout.height larger (double) the screen resolution gives vastly better text than letting layout height and width match screen when resolution is 320x240.
From: Radek Dutkiewicz notifications@github.com To: mickelson/attract attract@noreply.github.com CC: rogalian github@rogalian.com, Comment comment@noreply.github.com Received: 28 Jul 2020 13:07:37 Subject: Re: [mickelson/attract] getinfos() return null tables for AM classes' functions (#639)
I don't think that you can access the font size AM is using for the overlays. What kind of tricks you're refering to?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub[https://github.com/mickelson/attract/issues/639#issuecomment-665001387], or unsubscribe[https://github.com/notifications/unsubscribe-auth/ABHG5WBW4W5SCVMP7244HVDR525QPANCNFSM4PJ5MNKQ]. [https://github.com/notifications/beacon/ABHG5WFBSUHN4NY6HRSMS5DR525QPA5CNFSM4PJ5MNK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOE6RR3KY.gif]
Forget about oversampling. I'm finishing my Signed Distance Field font renderer which allows smooth scaling fonts in AM and additionally you get outline, shadow and glow for free, no expensive blurs required. This class can be adopted for pixelated bitmap fonts. That's the only sane solution for 240p
Kerning of small fonts is totaly broken but it's caused by SFML not AM. I was trying to fix it on SFML repo, but the discussion went to a stall.
Forget about oversampling. I'm finishing my Signed Distance Field font renderer which allows smooth scaling fonts in AM and additionally you get outline, shadow and glow for free, no expensive blurs required. This class can be adopted for pixelated bitmap fonts. That's the only sane solution for 240p
Apologies it's way off your bug topic to jump in like this! I understand your explanation about the instance, thanks. I also get the nulls.
At 320x240 I agree, bitmap is end-game but oversampling isn't too bad. 640x240 with oversampling looks very good. If you can improve on it cheaply I'm keen to try your renderer.
Coming back to the topic, I was trying to use the _call
metamethod, but ti's not firing. @mickelson do you know why by any chance?
Not off the top of my head, I’m not an expert on the squirrel functionality tho
On Jul 28, 2020, at 9:54 AM, Radek Dutkiewicz notifications@github.com wrote:
Coming back to the topic, I was trying to use the _call metamethod, but ti's not firing. @mickelson do you know why by any chance?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
I did some more experiments. _call
function fires, but only when you call the instance itself instance()
calling class functions does not unfortunately. It's a bit disapponting that I cannot override the class function members like I _get
, _set
with non function class members.
When I run the following:
I get null fields for
fe.Text
fe.Image
etcWhen I use an instance of my own class I get some meaningful data:
Do you know by any chance what may be causing it? I've created an inertia class that adds nice physics based animation to any fe. object and parameter, but I'm having problems diverting class functions like
set_rgb(r,g,b)
and I wouldn't like to hardcode them as it supposed to be universal and work on any object.