#pentagram@irc.freenode.net logs for 7 Mar 2005 (GMT)

Archive Today Yesterday Tomorrow
Pentagram homepage

[00:32:30] --> Kirben has joined #pentagram
[00:32:30] --- ChanServ gives channel operator status to Kirben
[00:38:49] <-- Fl00der has left IRC ()
[02:25:54] --> Chetic_ has joined #pentagram
[02:32:10] <-- Chetic has left IRC (Read error: 60 (Operation timed out))
[03:25:39] * watt thinks yet again... might as well only pool object with size < 256... the rest the allocator can simply malloc and free... but then again.. I dunno. I'm going to attempt the 256 byte pool now
[03:26:13] <sbx> :)
[03:32:38] <-- sbx has left IRC ("BRB")
[03:35:04] --> sbx has joined #pentagram
[03:56:54] <watt> hmm.. no guarantees in structure packing.... can't simply ptr - sizeof(NodeHead) to find the begining of a Node.
[03:58:12] <watt> unless the "Node" isn't a structure and instead is just bytes of memory.
[03:58:19] <watt> hmm
[03:59:36] <watt> still might want to wrap it in a struct for conveneince though.
[05:04:29] <watt> sbx:Boost has a lot of pooling documentation
[05:04:32] <watt> http://www.boost.org/libs/pool/doc/
[05:06:58] <sbx> "simple segregated storage"
[05:08:50] --> Colourless has joined #Pentagram
[05:08:50] --- ChanServ gives channel operator status to Colourless
[05:11:04] <sbx> looks like boost has a lot of other documentation too
[05:11:08] <sbx> hi Colourless
[05:14:08] <Colourless> hi
[05:15:00] <watt> hiyas
[05:15:27] <watt> Boost has loads of stuff..
[05:16:22] <watt> wondering if we should just attempt to use their Pool... it says, "The Boost Pool library is a header file library"
[05:16:51] <watt> might be worth it.... need to check their license though
[05:25:31] <Colourless> i wouldn't bother with using someone else's library for something as simple as we want to do
[05:28:22] <watt> ok. agreed.. it's neat stuff though.
[05:28:49] <Colourless> for your node pointer offset stuff you want to do something ugly like this: offset = (Sizeof(NodeHead) + (sizeof(uintptr)-1))&~(sizeof(uintptr)-1)
[05:29:08] <Colourless> makes sure you are alligning to pointer sized boundries
[05:29:56] <Colourless> so you have a block that looks like this [NodeHead][padding for allign][Allocated Object]
[05:31:17] <watt> ooh.. didn't think about that one.
[05:32:12] <Colourless> so you are thinking of having a flat pool?
[05:34:15] <watt> yup.
[05:35:46] <Colourless> i'm guessing that would be for items
[05:36:27] <watt> All objects.. they tend to all be around the same size
[05:37:11] <watt> largest I found so far was 208 bytes
[05:37:30] <watt> PaperDollGump
[05:38:26] <Colourless> UCProcesses IMO should have a pool all to their own that fits their exact size. the UCStack at the moment uses a allocated memory block, but it probably should actually use an array (so the memory becomes part of the UCProcess object)
[05:39:29] <Colourless> the 'Free Me' list though will always be slightly problematic
[05:40:54] <watt> I'm having a bit of trouble figuring out how to define the pool nodes... I want to make them a typedef of a chunk of memory.
[05:41:59] <Colourless> what do you mean?
[05:42:28] <watt> typedef uint8[2xx] PoolNode;
[05:42:38] <watt> may not be a clean idea though.
[05:43:26] <watt> or I could malloc the entire mess at once... i dunno
[05:44:18] <Colourless> i would just allocate a big array and access from that
[05:44:58] <watt> hmm.. yeah.. sounds like the right move.
[05:45:26] <Colourless> doesn't really matter though
[05:46:10] <Colourless> to ensure you are getting good memory alignment, you should allocate an array of uintptrs
[05:46:41] <Colourless> of use typedef uintptr[2xx/sizeof(uintptr)] PoolNode;
[05:47:03] <Colourless> reason being, using uint8s could have awful memory alignment
[05:47:11] <Colourless> and slow things down
[05:47:29] <watt> yeah.. makes sense
[05:49:40] <watt> typedef uintptr[(NODE_MEM_SIZE + sizeof(PoolNodeHead)) / sizeof(uintptr) + 1] PoolNode;
[05:50:10] <watt> I think that would be the best definition if I try it that way
[05:50:25] <Colourless> sounds resonable
[05:59:20] <-- sbx has left IRC (Read error: 54 (Connection reset by peer))
[06:04:49] --> sbx has joined #pentagram
[06:24:32] <-- pizzasleep has left IRC (Read error: 110 (Connection timed out))
[06:27:48] <watt> oh.. I'm retarded.. that the wrong order on the typedef ;-)
[06:28:42] <watt> or not.. huh?
[06:29:14] <watt> ok.. I think I see
[06:29:39] <watt> typedef uintptr PoolNode[(NODE_MEM_SIZE + sizeof(PoolNodeHead)) / sizeof(uintptr) + 1];
[06:31:20] --> pizzathief has joined #pentagram
[06:34:45] <watt> almost got something to compile.. I need sleep.. night.
[06:37:14] <sbx> bye
[10:21:44] <-- sbx has left IRC ("BRB")
[10:27:57] --> SBX has joined #pentagram
[10:37:15] --- SBX is now known as sbx|afk
[10:50:41] <Colourless> i'm going to be breaking save games... i don't think anyone is going to mind too muc
[10:50:42] <Colourless> h
[10:51:25] <Colourless> changing things to tighten up the fast area
[10:52:02] <Colourless> added a small gump to visualize the fast area and IMO it was too large at 320x200
[11:03:08] <Colourless> then again maybe not now that i've looked at the fast area code
[11:03:15] <Colourless> savegames wont break
[11:49:22] <-- Lightkey has left IRC (Read error: 60 (Operation timed out))
[11:57:39] --> Lightkey has joined #Pentagram
[14:06:43] --- Chetic_ is now known as Chetic
[14:09:52] <-- Kirben has left IRC ("System Meltdown")
[16:09:04] <Colourless> ah, much better fast area size now
[16:09:31] <Colourless> but cvs don't seem to be working
[16:55:29] <Colourless> now it is. committed
[17:08:10] <wjp> hm, I'm rather curious how that fastarea gump will look :-)
[17:08:14] * wjp updates and builds
[17:08:27] <wjp> or rather... *tries* to update
[17:08:45] <wjp> ah, there we go
[17:16:26] <Colourless> :-)
[17:16:42] <Colourless> the fastarea gump 'almost' looks like a minimap
[17:16:57] <wjp> so I see
[17:20:00] <Colourless> makes me wonder.. would there be a way to generate a minimap
[17:20:25] <Colourless> maybe something of an addon
[17:20:43] <wjp> should be possible
[17:21:04] <wjp> interesting idea
[17:23:39] <Colourless> have a small bitmap that could start out blacked out which would be revealed using fast area info i.e. the chunk is revealed on the minimap when it enters the fastarea
[17:23:49] <wjp> yes, my thoughts too
[17:26:19] * wjp thinks
[17:26:27] <wjp> some tricky issues, though
[17:26:45] <wjp> e.g., changing maps
[17:26:53] <wjp> (catacombs, mainly)
[17:27:17] <Colourless> hmm yeah dynamic maps would be a problem
[17:28:05] <wjp> bbl, dinner
[17:34:19] <Colourless> hmm.. i have an idea... not sure how well it would work, but it's an idea
[17:35:44] <Colourless> start off with a black bitmap. Each frame we'd do 1 (or more) traces for each chunk in the fast area (depending on the size each chunk is in the bitmap)
[17:35:52] <Colourless> if chunks are 2x2 then we'd do 4 traces
[17:37:03] <Colourless> each trace would find the top object along the z axis at the point. thinking only roof or floor object types. Then we'd find the colour of the item at that point and fill in the minimap with that colour
[17:37:13] <Colourless> so if the map changes, the minimap would automatically be updated
[17:38:20] <Colourless> the minimap would then be saved into the savegame (in some obviously compressed format)
[17:42:53] <Colourless> one interesting side effect would be roof popping
[17:43:31] <Colourless> it would sort of work
[19:15:48] <wjp> hm, I see
[19:30:53] <Colourless> might try coding something this week end
[20:12:55] <Colourless> later
[20:13:03] <-- Colourless has left IRC ("casts improved invisibility")
[20:17:40] --- sbx|afk is now known as sbx
[20:29:06] --> Dominus has joined #pentagram
[20:29:06] --- ChanServ gives channel operator status to Dominus
[20:51:56] --> Dark-Star has joined #pentagram
[20:52:02] <sbx> hi Dark-Star
[20:52:04] <Dark-Star> hi
[20:52:09] <Dark-Star> long time no see :)
[20:52:27] <Dominus> hi
[20:52:29] <Dark-Star> just tried out CVS a couple of minutes ago...
[20:53:05] <Dark-Star> I noticed that msvc_include.h (which still doesn't seem to be in CVS btw ;-) lacks a #define VERSION "0.1cvs"
[20:53:14] <Dominus> colourless even mentioned working on sound soon :)
[20:54:12] * Dark-Star is compiling a release build right now because the debug bild is sooo sloooow ...
[20:55:49] <Dark-Star> (well it could be that only my version of msvc_include.h lacks this, I got it a long time ago from here I think)
[21:41:41] --> Kirben has joined #pentagram
[21:41:41] --- ChanServ gives channel operator status to Kirben
[21:43:21] * Dark-Star kicks MSVC. hard.
[22:01:53] <-- Dominus has left IRC (Read error: 110 (Connection timed out))
[23:49:29] <-- Lightkey has left IRC (Read error: 60 (Operation timed out))
[23:58:22] --> Lightkey has joined #Pentagram