Hugor request/improvement - for RealNC

Hugo programming discussion. http://www.generalcoffee.com/hugo
Hugo By Example: http://hugo.gerynarsabode.org/index.php?title=Main_Page
Roody Yogurt's Hugo Blog: http://notdeadhugo.blogspot.com

Moderators: Ice Cream Jonsey, AArdvark

User avatar
RealNC
Posts: 1447
Joined: Wed Mar 07, 2012 4:32 am

Post by RealNC » Tue May 19, 2015 5:19 pm

The Hugo engine assumes a framebuffer display. Once text is shown, you lose all information about it, since it becomes just a bunch of pixels (this is the reason why you can't re-arrange text when resizing the window.) There's no way to maintain any metadata about the text. You don't even know if it's visible at all, since you can paint text on top of other text.

Everything you see (with the exception of videos) is just a single image that the Hugo engine painted. It's not really text.

Roody_Yogurt
Posts: 1994
Joined: Mon Apr 29, 2002 6:23 pm
Location: Milwaukee

Post by Roody_Yogurt » Tue May 19, 2015 5:21 pm

Ah, yes, that makes sense. Thanks.

User avatar
Ice Cream Jonsey
Posts: 21863
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Post by Ice Cream Jonsey » Tue May 19, 2015 5:34 pm

Well, wait, you can double-click on a word that is displayed and in doing so have it appear at the command prompt, I thought. Or maybe I am remembering things incorrectly. I really need to have all Hugo games on this laptop.
the dark and gritty...Ice Cream Jonsey!

User avatar
RealNC
Posts: 1447
Joined: Wed Mar 07, 2012 4:32 am

Post by RealNC » Tue May 19, 2015 6:39 pm

Ice Cream Jonsey wrote:Well, wait, you can double-click on a word that is displayed and in doing so have it appear at the command prompt, I thought. Or maybe I am remembering things incorrectly. I really need to have all Hugo games on this laptop.
The engine keeps an index of where it painted text before (on a word-basis.) The interpreter doesn't know anything about that though. It only tells the engine where the user double-clicked.

The engine could be modified to detect URLs and email addresses and keep them in a different index, but then we have the issue of making Hugor an extension of Hugo. And now that I think of it, how would you avoid making some hyperlinks clickable? A game could be displaying fictional URLs or addresses that are part of the prose.

For this to work correctly, one would have to add a new command or function to the language (like print_link() or similar) and thus also modify the compiler.

User avatar
Ice Cream Jonsey
Posts: 21863
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Post by Ice Cream Jonsey » Thu May 28, 2015 7:45 am

So I'm starting the process of putting Cryptozookeeper on IndieGameStand. They have a nice interface and let you split files up that are needed by Windows, Mac and Linux.

Is this the name of the latest Linux Hugor terp?

http://83.212.107.13/~realnc/hugor/test ... ux.tar.bz2
the dark and gritty...Ice Cream Jonsey!

User avatar
RealNC
Posts: 1447
Joined: Wed Mar 07, 2012 4:32 am

Post by RealNC » Thu May 28, 2015 11:55 am

I'll make new builds from the latest sources (with disabled video support, so that players won't have to battle with the library dependencies that come with it.) Probably tommorrow.

User avatar
Ice Cream Jonsey
Posts: 21863
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Post by Ice Cream Jonsey » Thu May 28, 2015 10:44 pm

That is MIGHTY kind of you.
the dark and gritty...Ice Cream Jonsey!

User avatar
RealNC
Posts: 1447
Joined: Wed Mar 07, 2012 4:32 am

Post by RealNC » Fri May 29, 2015 4:35 am

Just finished all new builds:

http://83.212.107.13/~realnc/hugor/icj/Hugor-icj.zip

All builds use the shiny new audio engine, so there's no license problems, no chipmunk speed with some of the MP3s and no horrible audio quality when resampling is needed.

MIDI and Video support is disabled.

All the previous info on how to package the game still applies:

http://www.joltcountry.com/phpBB2/viewt ... ght=#82020

User avatar
RealNC
Posts: 1447
Joined: Wed Mar 07, 2012 4:32 am

Post by RealNC » Fri May 29, 2015 4:43 am

Also, if you're prepared to pay Apple, you can get a key from them with which the Mac version can be signed so that users won't have to whitelist it.

If not, you can tell users to right-click on Hugor instead of double-clicking it, and select "Open". This will allow them to whitelist Hugor. For users with those brain-dead one-button Mac mice, they can "right-click" by pressing Ctrl while clicking.

User avatar
RealNC
Posts: 1447
Joined: Wed Mar 07, 2012 4:32 am

Post by RealNC » Fri May 29, 2015 5:36 am

Forgot to mention:

Mac OS X 10.6 is *NOT* supported anymore (and thus, PowerPC Macs are also not supported.) It's a 64-bit app build with Clang from XCode 5, and thus needs at least OS X 10.7. I tested on 10.8 and 10.9. I don't have 10.7 and 10.10 to test on though, so you'll need to verify that it works there too on your own somehow :-/

User avatar
Ice Cream Jonsey
Posts: 21863
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Post by Ice Cream Jonsey » Fri May 29, 2015 11:34 am

RealNC wrote:Also, if you're prepared to pay Apple, you can get a key from them with which the Mac version can be signed so that users won't have to whitelist it.

If not, you can tell users to right-click on Hugor instead of double-clicking it, and select "Open". This will allow them to whitelist Hugor. For users with those brain-dead one-button Mac mice, they can "right-click" by pressing Ctrl while clicking.
How much bullshit ransom money would I have to pay Apple to give the key I get to you? I can look it up.

Honestly though, it's their shitty operating system and I don't want to encourage -- actually, fuck this. I am not paying a company as rich as Apple money because they broke their own OS. That's moronic.
the dark and gritty...Ice Cream Jonsey!

User avatar
RealNC
Posts: 1447
Joined: Wed Mar 07, 2012 4:32 am

Post by RealNC » Fri May 29, 2015 5:39 pm

Plot twist: just noticed that Windows 8.1 has the same bs going on. I didn't see it because I have all that stuff disabled. But by default, if you try to run an app that's not Microsoft-approved, "SmartScreen" pops up telling you that the application might be evil. But it's easier to whitelist compared to Mac OS X though (the option to do so is right there in the SmartScreen dialog.

Funny anecdote: I downloaded an emulator (Project64) which infected my Windows installation with browser hijackers and hidden background services that pop-up advertisements all over the place and lock your browser settings so that you can't change the homepage to anything else than their ad-service, and "SmartScreen" didn't say anything, as these guys paid M$ for a "trusted application certificate."

User avatar
Ice Cream Jonsey
Posts: 21863
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Post by Ice Cream Jonsey » Mon Jun 01, 2015 11:57 am

I think the Mac version might have the same full screen / borders problem but I want to confirm I am using the correct Hugor. I didn't see it on fullscreen for my Macbook, but it's there when I use a giant monitor.
the dark and gritty...Ice Cream Jonsey!

User avatar
Ice Cream Jonsey
Posts: 21863
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Post by Ice Cream Jonsey » Thu Jun 04, 2015 2:49 pm

OK, I do NOT see a problem with the Hugor Mac app in full screen that is in that .zip. Just to confirm.
the dark and gritty...Ice Cream Jonsey!

User avatar
Ice Cream Jonsey
Posts: 21863
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Post by Ice Cream Jonsey » Fri Sep 04, 2015 10:46 pm

You may have answered this before, but...

So I tried Fallacy of Dawn in the latest Hugor. Looks great.

Is there a way to force it to use Terminal at 11 pt for the Fixed width font? I don't care what a user uses for Proportional - that should be whatever they enjoy. But the graphics windows up top do not line up correctly with the cyan header to the right of the two graphics windows unless it's specifically at Terminal 11. Using other fonts at 11 points doesn't work and using Terminal at other points doesn't work.

I don't need to "lock" it or anything, but I would loooooooove to make a specific font the defaults when a user starts a game.

(Cyberganked is gonna have the same problem. It's even worse for Cyberganked because if the pictures somehow become less than 600x450 then they generate a sort of awful-looking pattern. And to keep columns lined up for the right window, I need specific fonts there too.)
the dark and gritty...Ice Cream Jonsey!

User avatar
RealNC
Posts: 1447
Joined: Wed Mar 07, 2012 4:32 am

Post by RealNC » Thu Sep 10, 2015 11:33 am

I'll take a look.

However, I have to say that this is very bad design. You should not rely on the fixed width font metric for your UI. This is not going to work the same across all operating systems, as font rendering differs vastly between them.

A game that seems to do it right is Future Boy. Whatever font I select, the UI looks the same.

User avatar
pinback
Posts: 13330
Joined: Sat Apr 27, 2002 3:00 pm
Contact:

Post by pinback » Thu Sep 10, 2015 1:34 pm

He doesn't know how to do that. :(
Above all else... We shall go on... And continue!

User avatar
Ice Cream Jonsey
Posts: 21863
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Post by Ice Cream Jonsey » Thu Sep 10, 2015 9:11 pm

RealNC wrote:I'll take a look.

However, I have to say that this is very bad design. You should not rely on the fixed width font metric for your UI. This is not going to work the same across all operating systems, as font rendering differs vastly between them.
Soooooooooooooo, take Fallacy of Dawn:

Image

Couple things going on there. I need two bars to come to the same end point when full, but I have "Health:" and "Ree:" there, so I'm locked into a fixed-width font.

Additionally (and this is also seen with Cryptozookeeper) I've got two graphics displayed and then a text window that looks nice when it is lined up with the bottom of the graphics. I've got to use SOME number and the numbers we can manipulate aren't at a per-pixel specific level. It's numbers that correspond to characters, I believe. So if I say that the bottom edge of that window is "25" I think that means it's 25 characters down.

Cryptozookeeper has the same problem as Fallacy of Dawn, and Cyberganked is also displaying a grid of characters and their hit points, spell points, etc.
A game that seems to do it right is Future Boy. Whatever font I select, the UI looks the same.
Image

In this case, Kent isn't putting text in that top window and he also doesn't have the graphics touching each other.

I'm not married to doing the way I've done it for Cyberganked, of course, I just don't know a better way to make everything line up.

Though I'm curious as to what fonts interpreters pick as a default. That is probably your choice with Hugor, I'd guess? I mean, it's got to use something as a default. I'm not too worried if the default fonts used make everything line up. If someone is going to go in there to change them, then they'll see the effect it has. But knowing what the original provided fonts are would also be cool.
the dark and gritty...Ice Cream Jonsey!

User avatar
RealNC
Posts: 1447
Joined: Wed Mar 07, 2012 4:32 am

Post by RealNC » Fri Sep 11, 2015 2:43 pm

You're right, putting text in those boxes rather than just images is going to result in problems. What I'm saying is that relying on a specific font and size is not gonna work. For example, "Terminal" at 10pt is just too tiny for me. And I assume for other people too. It's not a scalable font. It's a bitmap font, and as such 10pt means different things for, say, 20" monitors and 27" monitors if they both are 1920x1080. On a 20", 10pt is going to be tiny. It will not scale.

I'll include a CFG override that you can set something like:

fixedFont = "Terminal,10"

but you should keep in mind that many people will change it. And whatever default you choose will only work for Windows. Linux and Mac don't have a "Terminal" font, and even if they did, it would result in different sizes.

The defaults for each platform are defined here: https://github.com/realnc/hugor/blob/ma ... gs.cc#L138

On Windows, it's Courier New at 12pt, on the Mac it's Andale Mono 15pt, and on Linux it's whatever the user has configured his desktop to use as the default fixed font.

User avatar
Ice Cream Jonsey
Posts: 21863
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Post by Ice Cream Jonsey » Mon Jun 06, 2016 8:55 am

Hello!

I am going to create individual downloads that have Hugor for Mac, Linux and Windows for Necrotic Drift.

What version of Hugor should I be grabbing? I am going to create a sticky here on JC. And I think we were also using IF Wiki for this. (Which reminds me, I should update IF Wiki for Hugor, and I will.)
the dark and gritty...Ice Cream Jonsey!

Post Reply