code logs -> 2010 -> Sun, 04 Jul 2010< code.20100703.log - code.20100705.log >
--- Log opened Sun Jul 04 00:00:28 2010
--- Day changed Sun Jul 04 2010
00:00 AnnoDomini [annodomini@Nightstar-1c8e0d01.adsl.tpnet.pl] has quit [[NS] Quit: Puff.]
00:03
<@Derakon>
Aww, you can't construct dicts in Python using list-comprehension-like syntax.
00:03
<@Derakon>
{i: sqrt(i) for i in range(10)}
00:11
<@Vornicus-Latens>
dict((i, sqrt(i)) for i in range(10))
00:12
<@Derakon>
Ah, thanks.
00:26
<@Derakon>
Actual goal:
00:26
<@Derakon>
dict(((char, i) for i, char in enumerate(string.printable)))
00:31
<@Derakon>
Okay, so stuffing all the characters for a given font size into one big texture and then pulling bits of it out for rendering onto a textured quad is actually just as fast as having each character be its own entire texture.
00:42
<@Derakon>
Is this the one-stop shop for apocalypse fetishists?
00:42
<@Derakon>
Mischan.
01:01
<@Vornicus-Latens>
Evidently it is not!
01:56 ErikMesoy [Erik_Mesoy@Nightstar-a85ed9b7.bb.online.no] has joined #code
01:57 Netsplit *.net <-> *.split quits: @Kazriko, ErikMesoy|sleep, @jerith
01:58 Netsplit over, joins: jerith
01:58 kaz_ [kaz@Nightstar-e09690fa.client.bresnan.net] has joined #code
01:58 ServerMode/#code [+o jerith] by *.Nightstar.Net
02:00 jerith [jerith@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
02:02 jerith [jerith@Nightstar-bf52129d.slipgate.za.net] has joined #code
02:02 mode/#code [+o jerith] by Reiver
02:07 Netsplit *.net <-> *.split quits: kaz_, @jerith
02:08 Netsplit over, joins: jerith
02:08 Kazriko [kaz@Nightstar-e09690fa.client.bresnan.net] has joined #code
02:08 ServerMode/#code [+o jerith] by *.Nightstar.Net
02:08 mode/#code [+o Kazriko] by Reiver
02:11 Netsplit *.net <-> *.split quits: @Kazriko, @jerith
02:12 Netsplit over, joins: @jerith, Kazriko
02:12 mode/#code [+o Kazriko] by Reiver
02:16 Netsplit *.net <-> *.split quits: @Kazriko, @jerith
02:18 Netsplit over, joins: @jerith, Kazriko
02:18 mode/#code [+o Kazriko] by Reiver
02:19 jerith [jerith@Nightstar-bf52129d.slipgate.za.net] has quit [Ping timeout: 121 seconds]
02:21 jerith [jerith@Nightstar-bf52129d.slipgate.za.net] has joined #code
02:21 mode/#code [+o jerith] by Reiver
02:22 Netsplit *.net <-> *.split quits: @Kazriko, @jerith
02:24 Netsplit over, joins: @jerith, Kazriko
02:24 mode/#code [+o Kazriko] by Reiver
02:26 jerith_ [jerith@Nightstar-bf52129d.slipgate.za.net] has joined #code
02:26 jerith [jerith@Nightstar-bf52129d.slipgate.za.net] has quit [Ping timeout: 121 seconds]
02:28 Netsplit *.net <-> *.split quits: @Kazriko, jerith_
02:29 Netsplit over, joins: jerith_, Kazriko
02:29 mode/#code [+o Kazriko] by Reiver
02:31 jerith [jerith@Nightstar-bf52129d.slipgate.za.net] has joined #code
02:31 mode/#code [+o jerith] by Reiver
02:32 jerith_ [jerith@Nightstar-bf52129d.slipgate.za.net] has quit [Ping timeout: 121 seconds]
02:39 Netsplit *.net <-> *.split quits: @Kazriko, @jerith
02:40 Netsplit over, joins: @jerith, Kazriko
02:40 mode/#code [+o Kazriko] by Reiver
02:42 jerith [jerith@Nightstar-bf52129d.slipgate.za.net] has quit [Ping timeout: 121 seconds]
02:44 jerith [jerith@Nightstar-bf52129d.slipgate.za.net] has joined #code
02:44 mode/#code [+o jerith] by Reiver
03:43 Attilla [Attilla@Nightstar-16fa29a9.threembb.co.uk] has quit [[NS] Quit: ]
05:00 * Derakon switches to display lists, gets acceptable frame rates.
05:00
<@Derakon>
This does mean I'll need to maintain a cache of prerendered strings, but that's a comparatively minor hardship.
05:46 Alek [omegaboot@Nightstar-c5f3565b.il.comcast.net] has quit [[NS] Quit: ]
06:13 Stalker [Z@2C3C9C.B2A300.F245DE.859909] has quit [Ping timeout: 121 seconds]
06:34
<@Derakon>
Ooookay, so my text is now rendering as a solid white rectangle during startup.
06:54 Stalker [Z@5E691D.FC7C16.7DB3A5.540011] has joined #code
06:54 Stalker [Z@5E691D.FC7C16.7DB3A5.540011] has quit [[NS] Quit: If the world didn't suck, we'd all fall off.]
06:59 Vornicus-Latens is now known as Vornicus
07:10 * Derakon mutters at his code.
07:11
<@Derakon>
I'm not doing anything different that I can tell here vs. in my standalone text-rendering script, but that works and this is just giving me a white rectangle.
07:12
<@Derakon>
Oh, wait, I may need to build mipmaps.
07:14
<@Derakon>
Yeah, that did it. Okay.
07:20 Derakon is now known as Derakon[AFK]
07:28 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
08:03 aoanla [AndChat@37647E.0002A6.410380.1C45B3] has joined #code
08:05 AnnoDomini [annodomini@Nightstar-1c8e0d01.adsl.tpnet.pl] has joined #code
08:06 mode/#code [+o AnnoDomini] by Reiver
08:07 ErikMesoy [Erik_Mesoy@Nightstar-a85ed9b7.bb.online.no] has quit [[NS] Quit: Leaving.]
09:20 aoanla [AndChat@37647E.0002A6.410380.1C45B3] has quit [[NS] Quit: ]
10:02
<@AnnoDomini>
Hmm. If I want something that lets me make a form-like GUI for an application under Linux, I'll have to see about GTK+, yes?
10:12 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Operation timed out]
10:26
<@TheWatcher>
There's GTK+, wxWidges, Qt, and other less-known ones.
10:27
<@TheWatcher>
Or you can be completely masochistic and code it in stright X11 calls
10:29
<@AnnoDomini>
No, I want something relatively simple to use.
10:29
<@TheWatcher>
Have a look at libglade, then
10:30
<@TheWatcher>
you can use the Glade UI builder to make the UI, and libglade to load the generated xml and create the UI in your program
10:31
<@AnnoDomini>
I see.
10:31
<@AnnoDomini>
What libraries do I need installed to use GTK+?
10:34
<@TheWatcher>
cairo, pango, atk are required. libtiff and libjpeg are recommended. installing gtk+ will also install glib and gdk
10:35
<@TheWatcher>
(hopefully your package manager should let you just install gtk+-2, and it'll pull in the dependencies)
10:43
<@AnnoDomini>
I understand that I'll need something like libraries ending with -dev, yes? Ncurses didn't quite want to work until I installed that specific library, despite the normal one already being installed.
10:58 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Client closed the connection]
11:00 AnnoDomini [annodomini@Nightstar-1c8e0d01.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
11:02 AnnoDomini [annodomini@Nightstar-0315d967.adsl.tpnet.pl] has joined #code
11:02 mode/#code [+o AnnoDomini] by Reiver
11:16 Vornicus is now known as Vornicus-Latens
11:29 Attilla [Attilla@Nightstar-77ac2f34.threembb.co.uk] has joined #code
11:29 mode/#code [+o Attilla] by Reiver
12:26 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
14:12 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Client closed the connection]
14:13 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code
14:13 mode/#code [+o ToxicFrog] by Reiver
14:36 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Connection closed]
16:01 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
17:02 Derakon[AFK] is now known as Derakon
17:46 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
19:22 aoanla [AndChat@37647E.0002A6.410380.1C45B3] has joined #code
19:23 aoanla [AndChat@37647E.0002A6.410380.1C45B3] has quit [[NS] Quit: ]
20:03
<@Derakon>
Okay, now my font rendering code runs, but it's not rendering the text onscreen at the right place.
20:03
<@Derakon>
I assume it's being rendering off in la-la land.
20:10 aoanla [AndChat@Nightstar-13e1bb4c.range217-42.btcentralplus.com] has joined #code
20:12 Vornicus-Latens is now known as Vornicus
20:13
<@Derakon>
Blergh...one thing I don't like about working with OpenGL is how hard to debug drawing issues is.
20:13
<@Derakon>
Your code runs just fine...but it doesn't draw anything. Could it be because of a missing negative sign? Maybe you calculated the position wrong. Or maybe you're not calling the right transformation functions. Who knows?
20:26
< gnolam>
Well, that's common for all graphics coding.
20:26
< gnolam>
The state machine system that OpenGL picked can cause some problems though.
20:26
< gnolam>
Documenting your state assumptions is /vital/.
20:37
<@Derakon>
I'd be happier if I could just address pixels. ¬.¬
20:39
<@Derakon>
So how would I go about drawing HUD items? That is, things that have a fixed position onscreen as opposed to moving with the camera?
20:40
<@Derakon>
I handle the camera by, at the beginning of the draw code, doing glLoadIdentity() followed by glTranslatef(camera.x, camera.y, zoom level)
20:40
<@Derakon>
I'd like to then later in the draw code say "Draw this HUD item at <40, 40>"
20:42
<@Derakon>
(I'd also like to be able to draw text that is relative to the camera position, which doesn't seem to be working even though I'm using the same logic as my working "draw sprites" code)
20:45
< gnolam>
Drawing the HUD with its own fixed projection is the easiest way.
20:45
<@Vornicus>
reset the z buffer, change the projection to one for your HUD, and then draw your HUD.
20:46
<@Derakon>
That sounds like it would require drawing HUD elements after drawing everything else.
20:46
<@Derakon>
Which isn't a gamebreaker, but it would require some refactoring.
20:46
< gnolam>
You could set the projection back afterwards. But do you really want to draw over the HUD?
20:47
< gnolam>
And it's easier to just turn depth testing off than resetting the z buffer.
20:47
<@Derakon>
No, but I'd want to be able to draw the HUD piecemeal.
20:47
<@Derakon>
So e.g. the player contributes an item to the HUD, but so does a boss. So each of their draw code bits draws some part of the HUD.
20:49 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
21:06 Alek [omegaboot@Nightstar-c5f3565b.il.comcast.net] has joined #code
21:45 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
21:51 TarinakyKai [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
21:55 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Ping timeout: 121 seconds]
21:58 Stalker [Z@2C3C9C.B2A300.F245DE.859909] has joined #code
22:21 aoanla [AndChat@Nightstar-13e1bb4c.range217-42.btcentralplus.com] has quit [[NS] Quit: ]
22:33 RichardBarrell [mycatverbs@Nightstar-689c9c54.cable.virginmedia.com] has joined #code
23:13 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?]
23:41 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
23:41
<@Derakon>
...damn, Gnolam left.
23:41 You're now known as TheWatcher[T-2]
23:44 You're now known as TheWatcher[zZzZ]
23:45
<@Derakon>
Well, here's my text-drawing code. It's not drawing anything. Any ideas why? http://pastebin.starforge.co.uk/321
23:45
<@Derakon>
(I'm using DisplayLists because I plan to cache commonly-rendered strings)
23:45
<@Derakon>
(But first I need them to display properly)
23:47
< Stalker>
Did you remember to bribe your compiler?
23:47
<@Derakon>
This is Python.
23:48
< Stalker>
So it's a parser not a compiler?
23:48
< Stalker>
I don't know.
23:48
<@Derakon>
It's interpreted, yes.
23:48
< Stalker>
Just bring it lots of booze, then it might work better.
23:48
<@Derakon>
I apologize for being dull, but if you don't have serious answers, please don't bother me.
23:49
< Stalker>
It's okay, I am sorry.
23:49
< Stalker>
I have no clue.
--- Log closed Mon Jul 05 00:00:41 2010
code logs -> 2010 -> Sun, 04 Jul 2010< code.20100703.log - code.20100705.log >