FAQ Search Memberlist Usergroups
Jolt Country Forum Index
Register Profile Log in to check your private messages Log in
Log in Log in

Questions for Kent

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Mon Aug 16, 2004 1:14 am    Post subject: Questions for Kent Reply with quote

Hello,

I have several questions. I hope you can help me.

Q1
With HUGO it's possible to recognize the key pressed through the system(read_key) command which returns a number associated to the key pressed. In hugolib.h the value related to some keys are given (11 for UP ARROW, 27 for ESCAPE, ...) but I found nowhere the complete list of the keys... In particular I'm looking for the values for the PAGE DOWN et PAGE UP keys.
Where can I find them?

Q2
The player can change the font used in the interface.
I'm making a graphic oriented game with a relatively complex interface and it's designed to run best with a specific font size. I wonder if there's a way to impose a font in a program?

Q3
The pictures are stored in the ressource files. Is it possible to know in the program the dimensions of a picture (in number of characters, the unit used by HUGO)? That way it would be possible to create a window to hold the picture with exact dimensions. I know HUGO resizes the pictures in the window so they are entirely displayed, but the ratio height/width can change a lot from a picture to another. Ideally the program should change the screen interface depending that ratio.

Thanks for helping
Back to top
Ice Cream Jonsey



Joined: 27 Apr 2002
Posts: 20088
Location: Colorado

PostPosted: Wed Aug 18, 2004 8:52 pm    Post subject: Reply with quote

Excellent questions, I'm quite curious myself. I'll fire 'em off to Kent next time I see him on the ifMud if they continue to go unanswered.
_________________
the dark and gritty...Ice Cream Jonsey!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Kent



Joined: 27 Jun 2003
Posts: 119

PostPosted: Fri Aug 20, 2004 6:45 am    Post subject: Hugo layout Reply with quote

Sorry for taking so long to get around to this. I'll preface my response with a couple of things about Hugo's layout design in general that may help explain some of these things.

The key thing is that Hugo's layout system was designed from the start to be platform-agnostic. In a perfect world, every Hugo game would display differently on any sized or shaped display. There were also issues with graphics libraries for the various early platforms, particularly with scaling up, which affected the defined behavior for graphics placement, etc.

It was decided that Hugo's "windows" (essentially clipping regions for output) would be defined in fixed-width character dimensions. In practise, this ends up being much like percentage measurements (if done properly, that is) without introducing another metric. (This last one is important: the integration between the Hugo Engine itself and the port/OS-specific layer is supposed to be relatively dumb. The less the former knows about the latter--and vice-versa--the better. Otherwise, it becomes harder to modify one without introducing bugs for the other--a problem that only becomes compounded across multiple platforms.)

Anyway, onto the questions:

Quote:
Q1
With HUGO it's possible to recognize the key pressed through the system(read_key) command which returns a number associated to the key pressed. In hugolib.h the value related to some keys are given (11 for UP ARROW, 27 for ESCAPE, ...) but I found nowhere the complete list of the keys... In particular I'm looking for the values for the PAGE DOWN et PAGE UP keys.
Where can I find them?

They currently don't exist as keycode values. This could actually be implemented on the Hugo side without too much difficulty, but there are platforms that don't have PAGE UP/DOWN--most obviously Palm and Pocket PC--so some alternative would need to be implemented. But currently there are no defined key values for PAGE UP and PAGE DOWN.

Quote:
Q2
The player can change the font used in the interface.
I'm making a graphic oriented game with a relatively complex interface and it's designed to run best with a specific font size. I wonder if there's a way to impose a font in a program?

Not a specific point size, no. Because different fonts look different at different point sizes, and because not all fonts are available on all machines, a decision was made under the platform-agnosticism column to not allow the games to directly control output fonts other than basic styles and coloring. Especially at the time (it was several years ago that this design decision was made) web pages were notorious for looking atrocious when the designer expected a certain font and didn't get it. (I also decided at a certain point to disallow the packaging of specific fonts as resources both for compatibility reasons--not every system used TrueType fonts, for instance--as well as legal reasons, being that almost every popular font is copyrighted.)

Quote:
Q3
The pictures are stored in the ressource files. Is it possible to know in the program the dimensions of a picture (in number of characters, the unit used by HUGO)? That way it would be possible to create a window to hold the picture with exact dimensions. I know HUGO resizes the pictures in the window so they are entirely displayed, but the ratio height/width can change a lot from a picture to another. Ideally the program should change the screen interface depending that ratio.

This has come up a few times, and is a good idea for a future feature for Hugo. As mentioned above, the original ports and graphics libraries weren't quite as good at scaling as the current crop are, so it would be possible now to better implement scaling. That said, it isn't currently possible for the program to know how big a given picture it is. It will scale it downward if necessary (with very good quality depending on the port and options selected), so the best approach I have found is to design images at the maximum/ideal size, but to understand that they may be significantly scaled down depending on where and on what they're finally displayed.
Back to top
View user's profile Send private message
cauldron



Joined: 15 Jul 2004
Posts: 6

PostPosted: Sat Aug 21, 2004 3:26 am    Post subject: Reply with quote

Hello,
Thanks for your answers.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001 phpBB Group

Theme by Kage Musha - RPG Garden

Copyrights and trademarks are all of the belonging company. No copyright Infringement intended