#pentagram@irc.freenode.net logs for 4 Mar 2009 (GMT)

Archive Today Yesterday Tomorrow
Pentagram homepage

[00:05:48] <-- watt has left IRC ()
[00:57:39] <-- ShadwChsr has left #pentagram ()
[01:28:56] <pupnik> 2
[02:53:40] --> watt has joined #pentagram
[02:53:40] --- ChanServ gives channel operator status to watt
[03:13:16] <-- watt has left IRC ()
[08:07:26] <pupnik> 09:05 < pupnik> you know who is in power during iraq and afghanistan invasions?
[08:07:28] <pupnik> 09:05 < pupnik> it is the 60s generation!
[08:07:31] <pupnik> 09:05 < pupnik> WHAT THE FUCK
[08:07:34] <pupnik> p
[08:14:45] <-- pupnik has left IRC ("leaving")
[11:36:52] <-- Kirben has left IRC (Read error: 60 (Operation timed out))
[12:26:06] --> pupnik has joined #pentagram
[14:47:04] --> pupnik_ has joined #pentagram
[14:54:45] <-- pupnik has left IRC (Read error: 145 (Connection timed out))
[16:12:51] <-- Mrrrr has left IRC (Read error: 113 (No route to host))
[16:14:00] --> Mrrrr has joined #pentagram
[18:16:18] --> ShadwChsr has joined #pentagram
[19:02:36] <ShadwChsr> U8 uses a sort of map block system, right?
[19:02:45] <ShadwChsr> Rather than a "load the entire map" approach?
[19:58:16] <wjp> yes
[20:03:08] <wjp> and we're emulating it to prevent subtle scripting bugs
[20:03:33] <wjp> (at some point we did load the entire map for convenience, but that had interesting side-effects on various triggers :-) )
[20:07:22] * ShadwChsr nods
[20:08:32] <ShadwChsr> I guess I was thrown off by the lack of a "CurrentMapBlock" class :)
[20:09:14] <wjp> the glob eggs I mentioned earlier are one aspect of this. They're expanded when you get near
[20:09:39] * ShadwChsr nods
[20:09:46] <ShadwChsr> How is movement handled between blocks? That is, if I change the position of an item - how is it's block changed inside of CurrentMap?
[20:09:57] <wjp> Item::Move
[20:10:43] <wjp> the Item object is itself responsible for staying in a consistent state
[20:11:31] <ShadwChsr> Is it possible for a move to be issued to a block that's not loaded yet?
[20:11:41] <ShadwChsr> Would it go into the void in that case?
[20:11:57] <wjp> all movable objects are always loaded
[20:12:24] <wjp> if an item is temporary, it'll destroy itself when it moves outside the 'fast area'
[20:12:43] <ShadwChsr> What happens to a moveable object if it's underlying block unloads?
[20:13:20] <wjp> that's Item::leaveFastArea
[20:13:53] <ShadwChsr> hehe
[20:13:56] <ShadwChsr> - // CHECKME: what do we need to do exactly?
[20:13:57] <ShadwChsr> :)
[20:14:04] <wjp> yes :-)
[20:14:20] <wjp> it varied a bit over time while we were figuring out what U8 expected
[20:14:40] * ShadwChsr nods
[20:14:50] <wjp> it might be that this is the cause of people falling through the floor sometimes...
[20:15:12] <wjp> animations _should_ handle this properly, but it's possible there's a corner case we overlooked
[20:15:47] <ShadwChsr> What happens if the arrow keys are used to move the player beyond the boundary of the map?
[20:15:53] <ShadwChsr> Wouldn't that destroy the avatar?
[20:17:38] <wjp> short answer: no :-)
[20:17:55] <ShadwChsr> Hehehe
[20:18:08] <wjp> two reasons: first is that the 'fast area' is centered on the camera which is typically centered on near the avatar
[20:18:21] <wjp> second is that most actors are never deleted
[20:18:34] * ShadwChsr nods
[20:18:41] <wjp> (other than monsters and other temporary npcs that are explicitly marked temporary)
[20:21:01] <ShadwChsr> I've been dabbling a bit with my own seamless loading engine, that's why I'm curious
[20:21:17] <ShadwChsr> ActiveMap -> ActiveMapBlock -> Items
[20:21:30] <ShadwChsr> Blocks are 8x8.
[20:21:47] <wjp> for comparison, how large is a screen roughly?
[20:22:05] <ShadwChsr> 800x600, roughly double size tiles compared to U8 I'd guess
[20:23:04] <ShadwChsr> Planning to have a small server in C# as well - I imagine I would use the 'in range blocks' to determine which packets to transmit to which users
[20:23:51] <ShadwChsr> My problem is that I want to keep Items encapsulated - maybe it's a broken requirement, but I don't want it directly manipulating the ActiveMap, since it creates a circular dependency between the two
[20:24:21] <ShadwChsr> Other games seem to have a master item list at the map level, then use grid or quadtree spatial indexing
[20:24:47] <ShadwChsr> In this case, blocks are a discreet 'entity' in the game, so I can't cleanly isolate it like that ;)
[20:25:42] <ShadwChsr> I was debating using events, but the "chain" gets too scary -
[20:26:09] <ShadwChsr> Block loads/unloads, Item movement, Item add/remove in a block, and Child items
[20:28:01] <ShadwChsr> Having items on the block objects also creates other fun issues - potential race conditions where the blocks get unloaded before the entities.
[20:28:41] <ShadwChsr> Although I could just implement something like U8 where it nukes all the entities too - might make more sense - especially since the server likely will be the one controlling block load/unload
[20:37:23] <ShadwChsr> (unrelated to Pentagram though - just a small tile based system I'll never complete ;)
[20:37:50] <ShadwChsr> I looked a bit more into the carpet issue
[20:37:57] <ShadwChsr> (@ the Zealan Shrine)
[20:41:17] <ShadwChsr> The carpet is definitely in the wrong spot position-wise
[20:41:44] <ShadwChsr> The middle statue, the shrine, and about 4-6 carpet tiles are all positioned wrong.
[20:42:06] <ShadwChsr> The Avatar was positioned in the right spot - the mispositioned altar just made it seem weird.
[20:42:31] <ShadwChsr> Each item appears to be {-7,-7,0} off from where it should be - translating to a vertical difference of -2 pixels
[20:43:16] <ShadwChsr> I haven't had much luck parsing through the itemcach.bin file yet :P
[20:49:58] <ShadwChsr> I have this weird (probably wrong) hunch the sorter can be simplified
[20:50:15] <ShadwChsr> Almost like ignoring x/xfar and using the center x/y point instead.
[20:51:13] <ShadwChsr> Aside from z (and zflats) you might be able to do something like si1.xCenter + si1.yCenter != si2.xCenter + si2.yCenter
[20:51:34] <ShadwChsr> It would cover non-intersecting bounding boxes, biased bounding boxes, and the partial checks all in one go
[20:51:56] <ShadwChsr> Which only leaves Z checks and the "give up" shape# and frame# sorts
[20:52:21] <ShadwChsr> And if you're really sneaky there might be a way to combine Z with the call - creating a single 'hash' integer value for render sorting
[20:52:39] <ShadwChsr> And pipe that into a zBuffer when/if you go OGL
[20:53:23] <ShadwChsr> Maybe I'm just na´ve and insane ;)
[21:02:44] <wjp> :-)
[21:04:58] --> Kirben has joined #pentagram
[21:04:58] --- ChanServ gives channel operator status to Kirben
[21:30:38] <ShadwChsr> (x + y) - (z * k) ;)
[21:30:59] <ShadwChsr> k being some magical constant ;)
[21:36:55] <Colourless> the original game used a z buffer of some sort
[21:37:22] <ShadwChsr> Hrmmmmm, interesting :D
[21:37:29] <Colourless> i think they rendered all occluder shapes into the z buffer and used it to discard shapes that were occluded
[21:37:39] <Colourless> but i don't know the specific of what it did
[21:37:49] <Colourless> it was probably very coarse
[21:40:11] <Colourless> we used to have problems with halbreds being drawn through the roof of castle tenebrae.
[21:40:40] <Colourless> occlusion detection would have stopped the guards from even being drawn
[21:41:12] <Colourless> i ended up just changing the code to work around the problem
[21:41:15] <ShadwChsr> What objects with transparency?
[21:42:00] <Colourless> the sprite of guards holding halbreds is significantly taller than the 3d size of the object
[21:42:33] <Colourless> they could appear between the roof tiles depending on the draw order
[21:42:53] <ShadwChsr> What did you end up changing?
[21:43:47] <Colourless> if i'm not mistaken i made it so z sorting was most important
[21:44:11] <Colourless> so higher things always drawn last
[21:45:03] <Colourless> though looks like i screwed things up a bit... *avoids looking at troll bug*
[21:47:12] <Colourless> intersecting shapes though have always been causing me trouble. i don't know what the exact criteria the originals used
[21:47:16] <Colourless> anyway, gtg
[21:47:21] <ShadwChsr> cya
[21:56:31] <ShadwChsr> I might be on to something here ;)
[21:56:50] <ShadwChsr> I commented out all the non-flat rendering code and replaced it with a Z check followed by my crazy centerx+centery check
[21:57:11] <ShadwChsr> Haven't checked much yet, but the initial screens looked sane :O
[22:14:00] --> LordNAway has joined #pentagram
[22:14:22] <-- Lord_Nightmare has left IRC (Read error: 110 (Connection timed out))
[23:52:17] --> ShdwChsr has joined #pentagram