--- Log opened Sun Oct 10 00:00:15 2010 |
00:08 | | You're now known as TheWatcher[zZzZ] |
00:26 | | Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code |
00:37 | | Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Connection closed] |
00:42 | | kwsn is now known as kwsn\fooding |
02:10 | | kwsn\fooding is now known as kwsn |
02:25 | | Zed [Zed@Nightstar-556ea8b5.or.comcast.net] has quit [Connection reset by peer] |
02:35 | | Anno[Laptop] [annodomini@Nightstar-f61ded15.adsl.tpnet.pl] has quit [[NS] Quit: leaving] |
02:46 | | Kazriko [kaz@Nightstar-e09690fa.client.bresnan.net] has quit [Connection closed] |
02:58 | < celticminstrel> | I don't suppose there's a way to get SDL to work with non-rectangular regions... for example as a clipping region... |
03:18 | | Attilla [Some.Dude@Nightstar-40f877bb.threembb.co.uk] has quit [[NS] Quit: ] |
03:45 | | Kazriko [kaz@Nightstar-e09690fa.client.bresnan.net] has joined #code |
03:45 | | mode/#code [+o Kazriko] by Reiver |
04:24 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?] |
04:30 | < celticminstrel> | reinterpret_cast should be safe to convert one pointer type to another provided that both types have the same data members and neither have any virtual members, right? |
04:53 | <@Vornicus> | What wickedness are you perpetrating. |
05:05 | < celticminstrel> | <_< |
05:34 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: ] |
05:37 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code |
05:37 | | mode/#code [+o Vornicus] by Reiver |
05:49 | | celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
06:57 | | Stalker [Z@2C3C9C.B2A300.F245DE.859909] has quit [Ping timeout: 121 seconds] |
07:04 | | Derakon is now known as Derakon[AFK] |
07:43 | | Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code |
07:50 | | Zed [Zed@Nightstar-556ea8b5.or.comcast.net] has joined #code |
08:03 | | Vornicus is now known as Vornicus-Latens |
08:10 | | kwsn is now known as kwsn\t-2 |
08:14 | | kwsn\t-2 [kwsn@31356A.5FD175.2259B6.DFACD4] has quit [[NS] Quit: moooooo] |
09:01 | | aoanla [AndChat@Nightstar-7c773f57.range217-42.btcentralplus.com] has joined #code |
09:21 | | Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds] |
09:54 | | kaura [kaura@Nightstar-fd82400d.snfc21.sbcglobal.net] has quit [[NS] Quit: HydraIRC -> http://www.hydrairc.com <- Now with extra fish!] |
10:38 | | You're now known as TheWatcher |
10:51 | | Zed [Zed@Nightstar-556ea8b5.or.comcast.net] has quit [Ping timeout: 121 seconds] |
11:01 | | AndChat| [AndChat@Nightstar-7c773f57.range217-42.btcentralplus.com] has joined #code |
11:01 | | aoanla [AndChat@Nightstar-7c773f57.range217-42.btcentralplus.com] has quit [Client closed the connection] |
11:03 | | Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code |
11:12 | | Anno[Laptop] [annodomini@Nightstar-8b01101c.adsl.tpnet.pl] has joined #code |
11:26 | | Zed [Zed@Nightstar-556ea8b5.or.comcast.net] has joined #code |
11:43 | | AndChat| [AndChat@Nightstar-7c773f57.range217-42.btcentralplus.com] has quit [[NS] Quit: ] |
12:29 | | Kazriko [kaz@Nightstar-e09690fa.client.bresnan.net] has quit [Ping timeout: 121 seconds] |
12:30 | | Kazriko [kaz@Nightstar-e09690fa.client.bresnan.net] has joined #code |
12:30 | | mode/#code [+o Kazriko] by Reiver |
12:44 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code |
12:48 | | Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Connection closed] |
13:12 | | Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code |
13:38 | | Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed] |
13:38 | | Attilla [Some.Dude@Nightstar-7b74ceba.threembb.co.uk] has joined #code |
13:38 | | mode/#code [+o Attilla] by Reiver |
14:56 | < Anno[Laptop]> | http://www.geekculture.com/joyoftech/joyimages/001_300/052.gif <- LOL. |
14:59 | | celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code |
15:36 | | Anno[Laptop] [annodomini@Nightstar-8b01101c.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
16:24 | | Anno[Laptop] [annodomini@Nightstar-97fe8dec.adsl.tpnet.pl] has joined #code |
16:44 | | Zed [Zed@Nightstar-556ea8b5.or.comcast.net] has quit [[NS] Quit: Leaving] |
17:10 | | Derakon[AFK] is now known as Derakon |
17:13 | | You're now known as TheWatcher[afk] |
17:13 | | Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code |
17:40 | | kwsn [kwsn@31356A.5FD175.2259B6.DFACD4] has joined #code |
17:53 | | Anno[Laptop] is now known as Dusk |
18:01 | | kwsn is now known as kwsn\packers |
18:37 | | Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds] |
18:47 | | Vornicus-Latens is now known as Vornicus |
19:55 | | * gnolam gives LXDE a whirl. |
19:55 | < kwsn\packers> | LXDE? |
20:05 | < gnolam> | Like XFCE, but supposedly even more lightweight. |
20:06 | < kwsn\packers> | ah |
20:12 | | Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has joined #code |
20:21 | < gnolam> | Arrgh |
20:21 | < gnolam> | Why is localization in Linux still such a pile of fail? |
20:31 | <@jerith> | gnolam: Because l10n in anything is such a pile of fail? |
20:31 | < gnolam> | Not really, no? |
20:32 | < gnolam> | Windows has let you set sane preferences since at least 95. |
20:32 | < gnolam> | ... unsigned repo? Third strike, Linux Mint LXDE. You're out. |
20:34 | < Tarinaky> | I acn honestly say I have no idea how you'd go about localising anything in Linux. |
20:34 | | You're now known as TheWatcher |
20:34 | < Tarinaky> | Oh hey. That reminds me. I asked a question a few days ago but I don't think anyone was around when I asked it. |
20:35 | < Tarinaky> | Where could I find information hex maps? Specifically the mathematics and transformations needed to handle them? |
20:35 | <@Vornicus> | Gettext, I think. |
20:35 | <@Vornicus> | Tarinaky: in my brain! |
20:35 | < Tarinaky> | Vornicus: Where could I find... |
20:35 | | * TheWatcher can find the logs, if desired |
20:35 | <@Vornicus> | I discussed them briefly some days ago but you'd already left. |
20:35 | <@Vornicus> | Yes please, TW. |
20:36 | < Tarinaky> | Danke! |
20:38 | <@Vornicus> | essentially: two hexes are connected if their relative coordinates are <0,1>, <1,0>, or <1,1> (or the completely negativized versions of that); hex-hex distance is max(x,y) if x and y have the same sign, and (|x| + |y|) if different; the transformation matrix is ...I don't remember it off the top. |
20:42 | <@TheWatcher> | http://daedalus.starforge.co.uk/irclogs/code/code.20101006.log.html#m1640-0 - there you go |
20:44 | < Tarinaky> | "the matrix [[sqrt(3)/2, 1], [-sqrt(3)/2, 1]]" converts from hexagonal coordinates to square or the other way around? |
20:45 | <@Vornicus> | It converts a square-shaped grid to a hexagona one, and actually that's not it, go down about an hour. |
20:46 | < Tarinaky> | I'm... not sure I'm clear on that. |
20:46 | < Tarinaky> | On what you mean by that. |
20:46 | <@Vornicus> | The matrix [[sqrt(3)/2, 3/2], [sqrt(3)/2, -3/2]] converts from internal coordinates to screen coordinate. |
20:47 | < Tarinaky> | Ahah. |
20:47 | <@Vornicus> | (the other one is just wrong.) |
20:48 | < Tarinaky> | >.> which way up is that btw? |
20:48 | < Tarinaky> | Is sqrt(3)/2,3/2 the top row? |
20:48 | <@Vornicus> | Yeah. |
20:49 | <@Vornicus> | Though you can transpose it and it still works, it's just your hexes will go the other direction. |
20:53 | < Tarinaky> | Lemme draw something to see if I understand the coordinate system and adjacency 'right'. |
20:58 | < Tarinaky> | http://i55.tinypic.com/i5ce91.png << Like this? |
20:58 | < Tarinaky> | Eeep. Just notice, The top-left one should be labled: '(-1,0)' |
20:58 | < Tarinaky> | That's what I get for working quickly >.< |
20:59 | <@Vornicus> | Just so. |
20:59 | < Tarinaky> | Good, it was a guess >.> |
21:01 | <@Vornicus> | (note: this is not quite the coordinate system used on, for instance, battletech maps; they usually number things so it staggers in one direction. It works a bit better for humans, but worse for computers because of the sepcial casing and because the computer can't, ah, see.) |
21:03 | | Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has quit [Ping timeout: 121 seconds] |
21:04 | < Tarinaky> | Well, what we're saying is that the 'x=0' graph isn't perpendicular to y=0. |
21:06 | < Tarinaky> | Don't suppose you recall off the top of your head the loci for drawing a regular hexagon? |
21:06 | < Tarinaky> | >.< |
21:10 | <@Vornicus> | Coordinates are: <1,0>, <-1,0>, and all four of <?1/2,?sqrt(3/2)> |
21:13 | < Tarinaky> | Cheers. |
21:14 | < Tarinaky> | Anything you think I need to know? |
21:14 | < Tarinaky> | Or is that it? :x |
21:14 | | * Vornicus knows his hexagons, can you tell. |
21:14 | | * Tarinaky is jotting all of this down in a book for him to reference later >.> |
21:15 | <@Vornicus> | That's it for now. |
21:15 | < Tarinaky> | For now? |
21:16 | <@Vornicus> | Well, there's a couple special-cased things you need to very specific circumstances, but you don't need them until later anyway. |
21:17 | < Tarinaky> | Ahhah. |
21:18 | < Tarinaky> | On a somewhat related note - someone linked to a site with stand in graphics aages ago... I don't remember if that was in here or not. |
21:18 | <@Vornicus> | I don't remember such a thing. |
21:21 | < Tarinaky> | Gutted. |
21:21 | < Tarinaky> | Figured it'd make a change :/ |
21:23 | <@Vornicus> | FreeCiv has hexagonal tiles. |
21:23 | <@Vornicus> | And that sort of thing. |
21:23 | <@Vornicus> | As does Wesnoth. |
21:23 | < Tarinaky> | I didn't know FreeCiv had hexes. |
21:23 | < Tarinaky> | I thought FreeCiv was a clone of Civ1. |
21:23 | <@Vornicus> | You can make it do hexes or squares. |
21:24 | < celticminstrel> | Wait, what? FreeCiv has hexes? |
21:24 | <@Vornicus> | It has for a couple years. |
21:24 | < celticminstrel> | That reminds me, I think I've yet to get it to compile... |
21:29 | < Tarinaky> | I... I don't really know what I'm looking for to get some stand-in graphics :/ |
21:33 | <@Vornicus> | THat is a problem. |
21:34 | < Tarinaky> | What I mean is what I need to type in google. |
21:34 | <@jerith> | "hex tile graphics"? |
21:35 | < Tarinaky> | Although I guess the more metaphysical interpretation is equally valid. |
21:35 | < Tarinaky> | jerith: Nope. :/ |
21:38 | <@Vornicus> | http://forum.freeciv.org/viewtopic.php?t=2009&sid=29f4d4c074faefa74ba1330f044dbf dd <--- download the attachment on the bottom of the first post, then find "tiles.png" therein. |
21:39 | < Tarinaky> | Ahah! |
21:39 | | kwsn\packers is now known as kwsn |
21:40 | <@Vornicus> | The entire forum is full of tilesets, if you find one you really like, use it. |
21:44 | < Tarinaky> | Ahah. |
21:48 | < Tarinaky> | Looking over my notes... How would I go about converting a display coordinate into a hex coordinate? |
21:48 | < Tarinaky> | If the user clicks on a tile for example. |
21:50 | <@Vornicus> | That's a little harder. McM dealt with -- oh, he did /not/ deal with it, Game Maker handled it for him! |
21:51 | <@Vornicus> | Your best bet is to make a rectangle that fits completely inside the hex, and then another one that covers one diagonal, and then collide with a grid full of those, and then for the ones with diagonals do a bit of math. |
21:51 | < gnolam> | The easiest is usually a picking method, TBH. |
21:52 | <@Vornicus> | Which is actually how GM does it, but you're going to need a picker for that! Which is sadness. |
21:52 | <@TheWatcher> | Render the playfield using opengl, use opengl picking?~ |
21:52 | < Tarinaky> | What's a picking method? |
21:53 | <@Vornicus> | Picking: a screen full of possibly-invisible sprites that the computer keeps track of locations of and collides your mouse pointer with. |
21:55 | < Tarinaky> | Ahhh. I think I see how to do it... maybe. |
21:55 | < gnolam> | With 2D hexes, you can easily have a pre-rendered picking bitmap. :) |
21:55 | < gnolam> | But if you're not using a picking method, then I would suggest half-space tests within a bounding box. |
21:57 | < Tarinaky> | half-space tests? |
21:57 | < Tarinaky> | Sorry. I'm not very good at jargon >.< |
21:57 | <@Vornicus> | "which side of this line is this on" |
21:57 | | Derakon is now known as Derakon[AFK] |
21:58 | < gnolam> | First narrow it down to a bounding box surrounding a hex. Then check for each diagonal if the point is on the outside or inside of it - if on the outside, then it's that neighbor. If it's on the inside of all of them, it's in the central hex. |
22:01 | <@Vornicus> | technically you can -- if your bounding box is a bit loose - end up with it outside of two diagonals. In which case you just have to splits the thing down the middle and one side is one hex and the other side is the other. |
22:01 | | Stalker [Z@2C3C9C.B2A300.F245DE.859909] has joined #code |
22:04 | <@McMartin> | When doing that hex othello project I used raw sprite collision. |
22:04 | <@McMartin> | Game Maker handled the mechanics, but I did have to tell it what it meant. |
22:04 | <@McMartin> | I found it was best to use a square array, turn it sideways, and cut off the corners, basically. |
22:05 | <@McMartin> | If you're using a hex *mat* instead of an entire hexagonal board, this may be not the best route. |
22:05 | < Tarinaky> | Mat? |
22:05 | <@McMartin> | But if you do that then it's going to be wobbly to decide, for instance, "all hexes in direction Y from point X" |
22:05 | <@McMartin> | Like, if it's a square mat full of hexes, a la a battlemat |
22:05 | < Tarinaky> | A battlemat, yeah. |
22:05 | <@McMartin> | As opposed to the board I was making which was actually a hexagon shape. |
22:05 | <@McMartin> | On my mat, for instance, the "top hex" of the board kept having its Y coordinate change. |
22:06 | <@McMartin> | This was so that each adjacent tile would have the same DX/DY for its neighbors regardless of where on the board you are. |
22:07 | <@McMartin> | This isn't true for a traditional battlemat, because you tend to instead have "0" be the northernmost hex, and that's off by half a hex each step. |
22:07 | <@McMartin> | But yes, that's a picking method. |
22:08 | <@McMartin> | If you're going to have "click on complex shape" anyway, mouse/sprite collision is a handy library to write on your own. |
22:08 | <@McMartin> | Not wanting to deal with that bullshit until after I had a prototype is in fact one of the reasons I registered GM8 in the first place. -_- |
22:09 | < Tarinaky> | I'll try to have a crack at that tomorrow then. |
22:09 | < Tarinaky> | I've rather lost interest in my other python project :/ |
22:10 | <@McMartin> | Sprite/sprite collision is way more fun~ |
22:10 | <@Vornicus> | ;_; |
22:10 | < Tarinaky> | Why the tears? |
22:11 | <@Vornicus> | Cuz it's really, really not. |
22:13 | <@McMartin> | It's a harder problem, strictly. |
22:13 | <@McMartin> | Picking is point/sprite collision. |
22:13 | <@McMartin> | pixel-perfect sprite/sprite boils down to a pile of those, but with a bunch of other steps to optimize it. |
22:13 | <@McMartin> | The difference is, one lets you click buttons, and the other lets you blow stuff up~ |
22:14 | < Tarinaky> | Ahah. |
22:17 | | Stalker [Z@2C3C9C.B2A300.F245DE.859909] has quit [Ping timeout: 121 seconds] |
22:17 | | Serah [Z@2C3C9C.B2A300.F245DE.859909] has joined #code |
22:19 | | Attilla_ [Some.Dude@Nightstar-3df9855a.threembb.co.uk] has joined #code |
22:22 | | Attilla [Some.Dude@Nightstar-7b74ceba.threembb.co.uk] has quit [Ping timeout: 121 seconds] |
22:23 | | Attilla_ is now known as Attilla |
22:46 | | Dusk is now known as AnnoDomini |
22:51 | < celticminstrel> | What's the argument for a boolean conversion operator returning a pointer-to-member rather than a pointer-to-void? |
23:00 | <@ToxicFrog> | ...can you expand on that? |
23:00 | | * ToxicFrog ponders mixins |
23:00 | < gnolam> | Kubuntu Netbook at least gets localization somewhat right. Finally. |
23:01 | < gnolam> | Let's see if the rest of it is actually usable... |
23:04 | <@ToxicFrog> | Argh. So many classes lying around I don't use anymore |
23:04 | < celticminstrel> | You asked me to expand on it? |
23:04 | < celticminstrel> | Well, writing an operator bool() has the problem that the class can also convert to integer type because bool is convertible to int, and that's rarely what you want. |
23:05 | < celticminstrel> | The easy way to fix that is to write an operator void*() instead, which is convertible to bool but not to integer types; however, I seem to recall that having some other problems. |
23:07 | <@ToxicFrog> | ...this is an edge of C++ I've never encountered. |
23:07 | <@ToxicFrog> | When is operator bool() called, for casts or coercions to bool? |
23:07 | < celticminstrel> | Yeah, both explicitly and implicitly. |
23:36 | | Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Connection closed] |
23:39 | | AnnoDomini [annodomini@Nightstar-97fe8dec.adsl.tpnet.pl] has quit [[NS] Quit: leaving] |
--- Log closed Mon Oct 11 00:00:16 2010 |