#nuvie@irc.freenode.net logs for 8 Jan 2004 (GMT)

Archive Today Yesterday Tomorrow
Nuvie homepage


[08:04:06] --> SB-X has joined #nuvie
[08:59:13] --> Yuv422 has joined #nuvie
[08:59:24] <Yuv422> hi
[10:14:58] <SB-X> hello
[10:14:59] <SB-X> was afk
[10:22:32] --> armav has joined #nuvie
[11:33:46] <Yuv422> I'm back now too
[11:37:01] --> servus has joined #nuvie
[11:37:16] <Yuv422> hi servus
[11:38:05] <servus> Hi Yuv422. You *did* get that lightmap code, right?
[11:38:24] <armav> the lightmaps code! oh how i crave it
[11:38:45] <servus> It's already in. I meant the optimized one :P
[11:38:49] <Yuv422> I haven't code any lightmap code :(
[11:39:06] <servus> Hmm I thought I gave it to you... one sec
[11:40:23] <armav> servus: my computer is too slow for the unoptimized code :)
[11:41:22] <Yuv422> armav: What speed computer do you have?
[11:41:52] <servus> http://sourcepost.sytes.net/sourceview.aspx?source_id=9755
[11:42:18] <servus> I believe that's the newest version
[11:42:34] <armav> amd k6-2 350 mhz
[11:43:05] <Yuv422> I think SB-X is running Nuvie on a P200 IIRC
[11:43:12] <Yuv422> thanks servus
[11:43:48] <servus> Hope it works better, this one uses no expensive math except at startup
[11:43:48] <armav> nuvie works fine in daylight mode, but it's very slow at night
[11:44:32] <servus> The other one was a rough cut that *cringe* used up to several hundred squareroots per frame at night
[11:44:48] <Yuv422> hehe
[11:45:25] * Yuv422 patching it in now
[11:45:32] * armav rubs hands with glee
[11:45:39] <servus> This should only have muls and adds per frames
[11:46:47] <servus> Oh, for Screen::~Screen() you must add for( int i = 0; i < 3; i++ )
[11:46:47] <servus> if( shading_globe[i] ) free( shading_globe[i] );
[11:54:59] * Yuv422 compiling
[11:57:57] <Yuv422> globalradius?
[12:00:37] <Yuv422> also what's sqr()?
[12:00:44] <Yuv422> do you mean sqrt()?
[12:04:52] <servus> #define sqr(a) ((a)*(a))
[12:05:25] <servus> What's globalradius? I don't grep that anywhwere
[12:05:49] <Yuv422> hehe whoops
[12:05:51] <Yuv422> typo
[12:05:54] <Yuv422> globeradius
[12:06:01] <Yuv422> and globeradius_2
[12:06:41] <servus> Radius of the 3 globes, and then again divided by 2. static const uint8 globeradius[] = { 32, 64, 128 };
[12:06:41] <servus> static const uint8 globeradius_2[] = { 16, 32, 64 };
[12:06:47] <servus> That's at the top of screen.h
[12:07:28] <Yuv422> do you mean Screen.cpp?
[12:07:43] <servus> It's in screen.h, but Screen.cpp should work
[12:08:47] <Yuv422> better to put static globals in the .cpp file :_
[12:08:50] <Yuv422> :-)
[12:09:20] <servus> I suppose so
[12:11:27] * Yuv422 compiling
[12:12:33] <Yuv422> eep Nuvie is crashing now
[12:12:40] * Yuv422 runs gdb
[12:12:41] <servus> Uh oh
[12:12:49] <servus> Are you calling the build globes?
[12:12:59] <-- armav has left IRC ("Client Exiting")
[12:13:12] <Yuv422> should be
[12:13:15] <Yuv422> in Game.cpp
[12:13:56] <servus> Right before the main game loop starts.
[12:14:12] <Yuv422> yup
[12:14:30] <Yuv422> hmm it's faulting in drawalphamap8globe
[12:14:46] <Yuv422> shading_data[(y-shading_rect.y+i)*shading_rect.w+(x-shading_rect.x+j)] = MIN( shading_data[(y-shading_rect.y+i)*shading_rect.w+(x-shading_rect.x+j)] + shading_globe[r][(i+globeradius_2[r])*globeradius[r]+(j+globeradius_2[r])], 255 );
[12:14:59] <servus> Eek! (Let the record show that I formatted that better)
[12:15:14] <servus> Make sure that shading_data is allocated correctly.
[12:15:15] <Yuv422> r = 47
[12:15:20] <Yuv422> that doesn't sound right
[12:15:34] <Yuv422> (gdb) p shading_globe
[12:15:36] <Yuv422> $3 = {0x2860200 "", 0x2860600 "", 0x5869000 ""}
[12:16:03] <servus> R should be 0, 1, 2
[12:17:06] <servus> or 3
[12:17:30] <Yuv422> screen->drawalphamap8globe( 8 + (obj->x - cur_x)*16, 8 + (obj->y - cur_y)*16 , (tile->flags2 & 0x3)*16 );
[12:17:52] <servus> That's old
[12:17:54] <servus> Scrap the *16
[12:18:12] <servus> At the end, to make the last argument (tile->flags2 & 0x3)
[12:21:23] <Yuv422> :-)
[12:21:28] <Yuv422> k it's running now
[12:21:42] <servus> Looks OK?
[12:21:44] <Yuv422> what number do you use for the avatar's globe?
[12:21:46] <Yuv422> 3?
[12:21:48] <servus> 3.
[12:21:53] <servus> It's in the Clear Map function
[12:22:06] <servus> drawalphamap8globe( 88, 88, 3 ); at the bottom of Screen::clearalphamap8
[12:22:14] <Yuv422> yup already done
[12:22:17] <Yuv422> :)
[12:22:22] <Yuv422> funny thing
[12:22:42] <servus> Hmm?
[12:22:51] <Yuv422> when I load nuvie it draws the globes
[12:22:56] <Yuv422> during the day
[12:23:00] <Yuv422> till I move the avatar
[12:23:05] <-- Kirben has left IRC ("System Meltdown")
[12:23:42] <servus> That's because the initial call to clearalphamap8 before the main loop specifies an opacity of 0, day is 0xff
[12:23:46] <Yuv422> maybe I'm not initializing the ambient value properly
[12:24:05] <Yuv422> hmm
[12:24:22] <Yuv422> so we should clear the alphamap with the current opacity
[12:24:48] <servus> Call updateBlacking instead
[12:24:57] <servus> It does it correctly... do you have the newest I wonder
[12:25:47] <servus> map_window->updateBlacking(); instead of the initial ClearAlphaMap
[12:25:51] --> Kirben has joined #nuvie
[12:26:06] <servus> http://sourcepost.sytes.net/sourceview.aspx?source_id=9757 is my updateBlacking
[12:26:48] <servus> That solves that problem.
[12:28:36] <Yuv422> I still have the get_/set_ambient functions in mine
[12:29:09] <servus> Well, you can see mine, do what you want if yours already work
[12:29:19] <servus> works, but mine uses real day/night times I got from U6
[12:31:38] <servus> I think it may break in dungeons, on my updateBlacking, change the screen->set_ambient( 0x00 );
[12:31:51] <servus> (I Hate mIRC) to screen->clearalphamap8( 8, 8, 160, 160, 0x00 );
[12:33:30] <Yuv422> yeah
[12:33:42] <Yuv422> my updateBlacking is correct
[12:33:58] <Yuv422> I just needed to call map_window->updateBlacking() before the game loop
[12:34:13] <Yuv422> to initialize the globes correctly
[12:34:26] <servus> Yepyep.
[12:34:39] <servus> Mine works in all cases now, dungeons, outside at day, night, dusk, dawn
[12:36:39] <Yuv422> Yay Nuvie is a lot faster at night now :)
[12:36:46] <Yuv422> thanks servus
[12:36:55] <servus> Neato
[12:37:21] <Yuv422> 4115 Nuvie 38.5% 0:43.15 1 58 503 6.10M 16.6M 13.4M 123M
[12:37:37] <servus> Better.
[12:37:41] <Yuv422> yup
[12:38:29] <servus> OK, I need me some food then it's homework time! I've got 10 pages to write by noon!
[12:38:36] <Yuv422> hehe
[12:38:49] <Yuv422> I'll be off to bed soon
[12:39:09] <Yuv422> I'll see if I can commit these changes first. ;)
[12:39:26] <servus> Neato. I'll stick around in the channel
[12:39:29] * servus waves
[12:52:33] <Yuv422> ok those changes are in the developer CVS now
[12:52:56] <Yuv422> hopefully the anonymous cvs won't lagg behind.
[12:58:49] <Yuv422> time for bed
[12:58:50] <Yuv422> cya
[12:58:52] <-- Yuv422 has left IRC ("BitchX: nine out of ten doctors recommend it")
[14:48:00] <SB-X> time to go
[14:48:13] <-- SB-X has left IRC ("ZZzZzz")
[16:55:31] --> wjp has joined #nuvie
[17:36:10] <-- Kirben has left IRC (Read error: 104 (Connection reset by peer))
[23:23:04] <-- wjp has left IRC ("Zzzz...")