#pentagram@irc.freenode.net logs for 12 Mar 2003 (GMT)

Archive Today Yesterday Tomorrow
Pentagram homepage


[00:53:07] <-- Dark-Star has left #pentagram ()
[04:17:13] --- ChanServ removes channel operator status from DarkeZzz
[07:16:31] <-- Kirben has left IRC (Read error: 104 (Connection reset by peer))
[07:16:36] --> Kirben has joined #pentagram
[07:16:36] --- ChanServ gives channel operator status to Kirben
[09:52:58] --> Servus has joined #pentagram
[12:02:48] <-- Servus has left IRC ()
[12:18:10] --> Colourless has joined #Pentagram
[12:18:15] --- ChanServ gives channel operator status to Colourless
[12:21:43] --> wjp has joined #pentagram
[12:21:43] --- ChanServ gives channel operator status to wjp
[12:29:51] <wjp> Colourless: read my little note in the logs a couple of days ago? (about the mace?)
[12:30:16] <wjp> is that a 5th weapon type or did that share graphics too?
[12:31:03] <Colourless> share graphics afaik
[12:31:34] <wjp> hm, with what?
[12:32:07] <Colourless> there are 2 swords, a dagger and a hammer/mace weapon overlays
[12:32:25] <wjp> what about axe?
[12:33:30] <Colourless> it'a mace (241) sword (243), axe (244) and dagger (245)
[12:33:58] <wjp> () = shape num in u8shapes.flx?
[12:34:02] <Colourless> yes
[12:34:11] <Colourless> 243, 244 and 245 don't have frame 1
[12:34:22] <Colourless> s/frame 1/frame 0/
[12:34:28] <wjp> ok, good; then our guesses about wpnovlay.dat are still valid :-)
[12:35:53] <Colourless> you should know that i was checking through all the shapes while we were discussing it
[12:40:06] <wjp> all of them? yikes, that's a lot of shapes :-)
[12:41:08] <Colourless> oh come on, it's only 850 + :-)
[12:41:19] <wjp> what do you think of having a separate class for the current map, btw?
[12:41:28] <wjp> (see comments in Map.h)
[12:44:24] <Colourless> yes yes yes. much split things into 'glob' sized chunks. too slow to access items for collision detection otherwise
[12:44:37] <Colourless> and as such, only for the current map
[12:45:26] <Colourless> now we can have 2 items lists. one unsorted, which would just be a flat 1d array. the other would be the 'glibsorted
[12:45:43] <Colourless> glob sorted 'list'
[12:47:00] <Colourless> the glob sorted list doesn't need to be anything fancy. just something like if an item is in, or partially in a 'glob' chunk, then it gets added to the 'list'
[12:47:52] <Colourless> to reduce memory usage, the lists for the individual globs should only be allocated if it's required
[12:50:39] <wjp> hm, it wouldn't cost that much memory to allocate all lists, would it?
[12:50:45] <wjp> (except for when one is empty, maybe)
[12:51:44] <Colourless> well, 128x128 lists... there will be a fair amount of empty ones i think.
[12:52:00] <Colourless> that 16384 * sizeof(List)
[12:52:10] <Colourless> where List is the 'list' type
[12:53:49] <Colourless> granted, even if the list size was 64 bytes, we'd still only use 1mb of memory
[12:53:51] --- Colourless is now known as Cless|Away
[13:04:35] * wjp nods; some empty list pointers won't hurt
[13:08:02] <wjp> about object ID allocation (also see World.h comments):
[13:08:17] <wjp> I was thinking of adding an assignID() function to Item (or probably to Object)
[13:08:36] <wjp> in the case of containers it would then recursively call assignID() on its contents
[13:08:51] <wjp> (in some fixed, reproducable order)
[13:09:35] <wjp> something similar for clearID, although that doesn't have to be recursive, since there should be a map of objectID->object somewhere
[14:17:04] --- Cless|Away is now known as Colourless
[14:17:06] <Colourless> got to go
[14:17:08] <-- Colourless has left IRC ("casts invisibility")
[14:43:28] <-- Kirben has left IRC ("sleep")
[15:11:17] <wjp> note for logs: size of a std::list<int*> is apparently only 4
[15:11:51] <wjp> (of course this doesn't say much about how much memory it allocates outside of the class)
[15:30:58] <DarkeZzz> Isn't there a function floating around the posix libs that allows you to find out how much memory the app is currently using? Or is it just how many pages? If it's an exact value you could write a quick program to printf the memory, then new a std::list, then print the memory again.
[15:32:47] * DarkeZzz 's a bit surprised it only uses four bytes though, he'd have thought a minimum of 8, for the internal 'start' and the 'end' pointers.
[16:05:41] <wjp> hm, no idea... I'd have to check :-)
[16:05:52] <wjp> I'll take a peek when I get home... more books there :-)
[16:05:56] <-- wjp has left IRC ("going home")
[17:32:17] --> wjp has joined #pentagram
[17:32:17] --- ChanServ gives channel operator status to wjp
[19:44:00] <wjp> allocating 1.000.000 std::lists puts memory usage at about 34Mb
[19:44:19] <wjp> so they're somewhere between 30 and 40 bytes
[23:30:53] <-- wjp has left IRC ("Zzzz...")