#pentagram@irc.freenode.net logs for 21 Jan 2004 (GMT)

Archive Today Yesterday Tomorrow
Pentagram homepage

[02:28:53] <-- Kirben has left IRC (Read error: 104 (Connection reset by peer))
[02:28:59] --> Kirben2 has joined #pentagram
[03:26:22] --- Kirben2 is now known as Kirben
[07:02:52] --> servus has joined #pentagram
[09:50:05] <wjp> peculiar; Fedora doesn't seem to have an SDL_ttf rpm
[12:09:29] <-- wjp has left IRC (Read error: 113 (No route to host))
[12:24:27] --> Colourless has joined #Pentagram
[12:24:27] --- ChanServ gives channel operator status to Colourless
[12:24:53] <Colourless> hi
[12:25:17] --> SB-X has joined #pentagram
[12:31:19] --> wjp has joined #pentagram
[12:31:19] --- ChanServ gives channel operator status to wjp
[13:34:53] --> static_ has joined #pentagram
[13:35:36] <SB-X> hi
[13:41:09] <Colourless> wjp: idea for the font stuff. Have a 'new' class called something like RenderedText that can be 'created' from either SDL_ttf (TTFRenderedText), or a shape font (ShapeRenderedText), or fixed width (FixedWidthRenderedText).
[13:42:56] <Colourless> the Shape and FixedWidth text classes would just be wrappers that call existing RenderSurface methods when painting, but the TTFRenderedText would do all the SDL_surface handling and would call the special border creating rendersurface drawing function
[13:44:15] <wjp> so if I understand that correctly, ShapeRenderedText would actually not contain rendered text, but just a string and a ShapeFont*?
[13:44:22] <Colourless> yes
[13:44:33] <wjp> that would work
[13:44:45] <Colourless> probably want a 'FontManager' class that can be used to create the correct RenderedText object for the correct font type
[13:45:38] <wjp> wouldn't the Font subclasses handle that?
[13:45:40] <Colourless> ideally once you've got a rendrered text class you should be able to update it with new text
[13:45:51] <Colourless> hmm, yes :-)
[13:45:55] * Colourless wasn't thinking
[13:46:23] <wjp> (i.e., RenderedText* Font::renderUTF8(const char* text), or something)
[13:47:20] <wjp> of course there does have to be a way to get the right Font object
[13:47:35] <wjp> (possibly overriding the shape fonts)
[13:48:02] <Colourless> fontmanager should giveout fonts. Fonts should create RenderedText
[13:48:51] <wjp> and RenderSurface should draw RenderedText?
[13:49:02] <wjp> or RenderedText should draw to a RenderSurface?
[13:49:03] <Colourless> yes
[13:49:08] <wjp> probably the latter
[13:49:28] <Colourless> just depends on whether we want to be consitent with the way things currently are
[13:49:46] <Colourless> it would make more sense for the latter though since each type can be quite different
[13:50:16] <Colourless> the RenderedText can proably be thought of something similar to a GumpWidget
[13:50:44] <Colourless> so RenderedText::draw() would actually be the 'right' way in the context
[13:51:15] <wjp> ...and that would in turn call some rendersurface functions to do the actual drawing
[13:51:22] <Colourless> yes
[13:51:34] <wjp> the basic shape drawing for a ShapeRenderSurface
[13:51:46] <wjp> and... something... for the others :-)
[13:52:12] <Colourless> rendered text could even be made a gump widget
[13:52:17] <wjp> all this might make it worth making a graphics/font subdir
[13:52:32] <wjp> hm, not really necessary I think
[13:52:41] <Colourless> no i don't think so either
[13:52:49] --> sbx has joined #pentagram
[13:52:50] <-- SB-X has left IRC (Read error: 104 (Connection reset by peer))
[13:53:03] <Colourless> yeah graphics/fonts would be a good idea
[13:55:34] <wjp> we're looking at 10+ classes for fonts, I guess :-)
[13:56:15] <wjp> {,Shape,TTF,FixedWidth}{Font,RenderedText}, FontManager
[13:56:17] <wjp> or maybe 9 :-)
[13:57:39] <watt> fonts directory?
[13:58:01] <wjp> yeah, we're planning some rather ambitious font-related stuff :-)
[13:58:27] <wjp> (well, maybe not all that ambitious... just allowing ttf fonts to replace the current shape fonts)
[13:58:41] <-- sbx has left IRC (Read error: 104 (Connection reset by peer))
[13:58:48] <wjp> since the current U8 font is somewhat unreadable, and replacing it would be kind of nice :-)
[13:59:39] <Colourless> actually we are also considering going unicode too for fonts
[13:59:41] <wjp> Colourless: I was wondering... could font rendering be done separately from scaling? So we'd draw fonts at full size instead of scaling it with the rest of the graphics?
[13:59:59] <wjp> clipping of text might be an issue, I guess
[14:00:09] <wjp> and hinting
[14:00:32] <wjp> (that was the term for fonts changing shape at different sizes, right?)
[14:00:37] <Colourless> wjp: that actually was the plans
[14:00:45] <wjp> great :-)
[14:01:45] <Colourless> scaling is going to be done via a special gump (render into a buffer, and the gump will paint it scaled)
[14:02:01] <Colourless> that is all the childern of the gump will be drawn scaled
[14:02:22] <Colourless> so you'd have DesktopGump->ScalingGump->GameMapGump
[14:02:51] <wjp> how would text fit into that?
[14:03:11] <Colourless> BarkGumps would be children of DesktopGump
[14:03:24] <Colourless> so they wouldn't get scaled
[14:03:24] <wjp> and text shown on gumps?
[14:03:46] <Colourless> text 'in' a gump becomes difficult :-)
[14:04:23] <Colourless> though it could be 'fudged' (icky as it would be)
[14:04:56] <Colourless> you could have special gumps that have their own scaled surface where they draw their shapes
[14:05:11] <Colourless> but draw the text unscaled
[14:05:28] <Colourless> but that is icky :-)
[14:06:01] <wjp> (I was thinking of the diary, btw)
[14:08:18] <Colourless> is it is not easy to do since you can get horrible sort problems
[14:08:38] <Colourless> rendering something 'complex' scaled onto unscaled is problematic
[14:09:34] <Colourless> since you must render the scaled into another buffer first
[14:10:15] <Colourless> unless of course you wanted point upsampling :-)
[14:10:23] <Colourless> easy to do fast realtime :-)
[14:10:56] --- ChanServ gives channel operator status to Kirben
[14:11:06] <Colourless> just create some PaintShape2x methods :-)
[14:12:14] <Colourless> in theoy prescaling gumps with other scalers might be possible
[14:12:23] <Colourless> s/theoy/theory/
[14:15:34] <-- Kirben has left IRC ("System Meltdown")
[14:17:19] <Colourless> should only need to do it for the relevant text ones though. Journal, Books, Scrolls
[14:44:40] --> Ember has joined #pentagram
[14:52:49] * wjp hmms
[14:53:02] <wjp> (was away for a while)
[14:53:17] <wjp> "rendering something 'complex' scaled onto unscaled is problematic"
[14:53:25] <wjp> you wouldn't want to do that within a single gump, I'm guessing
[14:54:21] <Colourless> no, but intergump is what i'm meaning. You have a lower level scaled gump with high res text, you then attempt to draw another scaled gump over it
[14:55:27] <wjp> hm, in the case of neat rectangular gumps with a black border that wouldn't be a problem, but for others... hmm...
[14:56:25] <wjp> brb again
[14:57:36] <Colourless> neat rectangulare gumps.... um, there are none :-)
[14:58:00] <-- Darke has left IRC (Read error: 101 (Network is unreachable))
[15:00:10] <wjp> so you'd need a scaler that can draw into an unscaled image
[15:01:32] <Colourless> the 2 most elegant solutions are methods the can paint shapes scaled, or prescaling, or both
[15:01:32] --- Ember is now known as Darke
[15:01:59] --- ChanServ gives channel operator status to Darke
[15:02:17] * Darke blinkblinks, rubs eyes, and thinks he probably needs sleep. Hallucinating wrong words is baaaad.
[15:03:22] <Colourless> if it were possible to prescale every shape then I wouldn't even bother with scaling buffers
[15:04:00] <Colourless> the world absolutely much be scaled using a buffer, though it should in theory be possible to prescale all the gump shapes, if we wanted to
[15:04:32] <Colourless> you'd then blit the texture of scaled shape rather than painting the shape
[15:06:57] <Colourless> the reason why prescaling world shapes doesn't work is you get lines appearing between tiling shapes
[15:07:32] <Colourless> so you'd get a really nice grid pattern along the ground and you'd see each individual wall piece
[15:08:28] <Colourless> prescaling NPC and other sprite like objects works though (though NPCs requite a lot of memory if they are uncompressed though :-) )
[17:46:07] --> SB-X has joined #pentagram
[18:14:50] --> sbx has joined #pentagram
[18:14:55] <-- SB-X has left IRC (Read error: 54 (Connection reset by peer))
[20:17:44] <wjp> well, finally committed some stuff that's been sitting in my local tree for ages
[20:22:50] --> shinji-kun has joined #pentagram
[20:36:00] <wjp> now... should FontShapeFlex stay FontShapeFlex because it's a ShapeFlex containing Fonts, or should it become ShapeFontFlex because it's a Flex containing ShapeFonts? :-)
[20:46:07] <sbx> ShapeFontShapeFlex?
[20:46:23] <sbx> FontShapeFontShapeFlex
[20:46:32] <wjp> don't overdo it :-)
[20:49:14] <Colourless> maybe just make it FSFSFSFSFSFSFSFSF
[20:54:56] <sbx> X
[21:07:33] <wjp> hm, RenderedTexts will be a bit of a hassle when saving/loading
[21:08:44] <Colourless> not really
[21:09:01] <wjp> no, but still a bit :-)
[21:09:13] <Colourless> save the string that is being displayed
[21:09:27] <Colourless> of course if RenderedTexts were gumps widgets..... it would actually be automatic :-)
[21:10:02] <wjp> that's true :-)
[21:10:23] <wjp> or just make sure you can always rebuild the RenderText
[21:10:31] <Colourless> yeah or that
[21:10:41] <wjp> s/rT/redT/
[21:11:09] <wjp> and reset any RenderedText*'s to 0 on load
[21:11:15] <Colourless> i would prefer them not being gump widgets as the gump widgets have more 'features'
[21:11:22] * wjp nods
[21:11:27] <wjp> focus/selection issues
[21:16:15] <Colourless> also there will be more than one type of textwidget (you saw the comment about them) so having all of them have another widget as a child isn't useful
[21:16:19] * wjp rips out the last bit of remaining logic from FontShapeFlex :-)
[21:17:03] <wjp> hm, or maybe not
[21:17:21] * wjp wonders if he should have ShapeFont remain a subclass of Shape
[21:17:35] <wjp> (private subclass)
[21:17:45] <Colourless> problem IIRC is there is some misc formatting stuff into SHapeFont
[21:18:30] <Colourless> that however i think should go somewhere else
[21:20:24] <wjp> I guess the hardcoded limit of 160 pixels in Font::getTextSize should go elsewhere too :-)
[21:20:35] <Colourless> :-)
[21:21:59] <Colourless> what is need is a function that can take a string, and a font and a width and height of the 'target' and left justify the text into a new string and also returning the 'next' char in the original string where it got up to before running out of space
[21:22:05] <Colourless> s/need/needed/
[21:23:20] <Colourless> could in theory be made a part of the text drawing func
[21:23:24] <wjp> hm, we'd need some way to get the required dimensions for that from a Font, of course
[21:23:42] <Colourless> (that is the one that generates the RenderedText)
[21:24:21] <Colourless> so you could have something like RenderdText *RenderTextJustified()
[21:25:52] * Colourless notices that Pentagram is more and more heading down the path of an acutual usable GUI API
[21:26:28] <wjp> with so much of pentagram pulled in that it would be nearly impossible to actually use it in any other project :-)
[21:27:03] <wjp> RenderTextJustified sounds like it would be a part of the Font baseclass
[21:27:07] <Colourless> hey, i blame darke :-)
[21:27:22] <wjp> yeah, Darke even needs the gump subsystem for a console app :-)
[21:28:01] <Colourless> well, i never said the dependancies didn't need fixing :-)
[21:28:37] <Colourless> until we actually have a console app, i don't think anyone is too bothered
[21:29:34] * Colourless should probably port ShapeConv into a 'Console pentagram app'
[21:29:39] <wjp> I'm actually slightly bothered at llc being rebuilt all the time :-)
[21:30:20] <wjp> you're not planning on using the kernel and processes, are you? :-)
[21:30:45] <Colourless> no, but you know how things are :-)
[21:35:19] <Colourless> actually, looking through CoreApp, things could better. It's Core in that is strongly tied to actual Game related apps
[21:35:42] <Colourless> rather than general apps that use elements of the pentagram framework (i.e. filesystem)
[21:36:20] <Colourless> so there should be a level below CoreApp such as BasicApp
[21:36:31] <wjp> we could also remove Kernel from CoreApp
[21:37:14] <wjp> it looks like that's the thing that pulls in everything
[21:37:20] <wjp> the rest is just conf and filesys
[21:37:35] <wjp> hm, not sure about the console
[21:38:09] <Colourless> in theory it shouldn't
[21:38:17] <Colourless> it access RenderSurface, but that is virtual
[21:38:19] <wjp> I think you already fixed some sometime ago
[21:38:56] <Colourless> the Console dependancy on GUIApp was the screen updating during init. I fixed that
[21:45:37] <Colourless> the current 'problem' class is the Object loader
[21:45:57] <Colourless> s/loader/manager/
[21:46:13] <Colourless> the loaders cause all the dependancies
[21:47:01] <Colourless> gumploaders should be added for GUIApps and Game object loaders should be added for 'game' apps
[21:51:11] <wjp> sounds reasonable
[21:51:32] <Colourless> ideally, we should define what dependancies are allowable for certain app types.
[21:51:55] <wjp> and enforcet hose :-)
[21:52:01] <wjp> s/t / t/
[21:52:12] <Colourless> obviously almost everything in World isn't useful unless you are in a game app
[21:55:02] <Colourless> app types i'm thinking should be as follows:
[21:56:07] <Colourless> BasicApp - Simple console app, console output, filesystem, probably config support too
[21:56:29] <Colourless> CoreApp (ConsoleApp) - BasicApp + Kernel and Usecode
[21:56:54] <Colourless> GUIApp - CoreApp + Graphical Interface
[21:57:07] <Colourless> GameApp - All of pentagram
[21:57:51] <wjp> would all of them be useful? (In the sense that one of our tools would inherit from it?)
[21:58:36] <sbx> what non-game apps will want basicapp
[21:58:46] <Colourless> BasicApp - yes, simple command line tools
[21:59:10] <Colourless> CoreApp - hell if i really know, but darke seems to like the concept with console apps + usecode
[21:59:45] <wjp> it might've been useful once to test usecode, but we're beyond that now :-)
[21:59:46] <Colourless> GUIApp - simple things like shape viewers and such, ideally implemented in such a way they could run from pentagram itself as a gump
[22:00:17] <sbx> default: blame darke; ?
[22:00:21] <Colourless> GUIApp would be a simple program that would run a gump
[22:00:34] <wjp> sbx: indeed :-)
[22:01:23] <wjp> I'd merge BasicApp and CoreApp
[22:01:25] <Colourless> GameApp: Well, others have certain expectations on us for this one
[22:02:06] <Colourless> i would agree. If you want processes, then use a GUIApp
[22:02:21] <Colourless> we've got a fullscreen graphics console
[22:04:39] <Colourless> now i want to hear Darke's justification of why exactly the compiler is a Process
[22:05:09] * wjp starts an innocent-looking-guilty-bunny-summoning ritual
[22:09:26] <wjp> just for the record: I'm currently refactoring the current font stuff into the Font/RenderedText 'plan'
[22:09:38] <wjp> when that's done I'll commit that
[22:10:03] <wjp> (probably just the old-Font first, and the fixed-width-Texture font after that)
[22:10:18] <wjp> then we can tweak that, and then we'll have to look at TTF :-)
[22:10:57] <Colourless> that's cool with me.
[22:11:30] <wjp> (refactoring should be done by this weekend)
[22:11:49] <wjp> possibly depending on the exult release schedule :-)
[22:12:49] <Colourless> :-)
[22:17:22] <sbx> Does PentagramFS support loading everything from under a specific gamedir (essentially treating it as root), and then looking in a basedir if the file wasnt found in gamedir?
[22:18:12] <Colourless> no
[22:18:41] <Colourless> it handless mouting real path as virtual paths
[22:19:21] <sbx> Oh that would allow the same thing then at a higher level.
[22:19:38] <sbx> Can people make custom games with Pentagram?
[22:20:20] <wjp> you can't even play U8 yet :-)
[22:20:46] <wjp> but we're keeping it in mind a bit, I guess
[22:22:27] <sbx> What about custom games with TGWDS capabilities?
[22:28:15] <Colourless> i'm off
[22:28:18] <-- Colourless has left IRC ("casts invisibility")
[22:28:21] <sbx> bye
[23:02:51] <wjp> I'm going too; 'night
[23:09:58] <sbx> hrmm
[23:10:08] <sbx> bye
[23:45:00] --> Kirben has joined #pentagram
[23:45:00] --- ChanServ gives channel operator status to Kirben