#exult@irc.freenode.net logs for 13 Mar 2003 (GMT)

Archive Today Yesterday Tomorrow
Exult homepage


[00:18:52] --> Kirben has joined #exult
[00:18:52] --- ChanServ gives channel operator status to Kirben
[01:38:09] --> ShadwChsr has joined #exult
[03:43:43] <-- Fingolfin has left IRC ("bye")
[04:11:38] --> Servus has joined #exult
[04:12:09] --> Yuv422 has joined #exult
[04:12:23] <Yuv422> hi
[04:13:57] <Servus> hi
[04:14:20] <Yuv422> do you remember what the third language in U6 was?
[04:14:49] <Yuv422> I'm looking at the U6 Fonts
[04:15:12] <Servus> gargoyle
[04:15:55] <Yuv422> so there is english britannian and gargoyle?
[04:16:23] <ShadwChsr> yup
[04:17:03] <Yuv422> they've got alot of chars in their font set that I've never seen used in the game.
[04:18:12] <Yuv422> there is a circle split in four.
[04:18:31] <ShadwChsr> numbers?
[04:18:49] <Yuv422> ?
[04:19:55] <Yuv422> it's nice that the fonts are layed out in ascii order. :)
[04:31:11] <Yuv422> ShadwChsr: gargoyle numbers?
[04:32:06] <ShadwChsr> I was just guessing ;P
[04:32:27] <ShadwChsr> did you look at my source code?
[04:32:35] <Yuv422> yeah.
[04:32:44] <Yuv422> looks good
[04:32:51] <Yuv422> nicely structured. ;)
[04:33:03] <ShadwChsr> thanks
[04:33:11] <Yuv422> I can't compile it obviously ;)
[04:34:37] <ShadwChsr> :
[04:34:39] <ShadwChsr> :)
[04:36:28] <ShadwChsr> oh come on you probably have a windows box ;)
[04:36:32] <ShadwChsr> Every gamer does ;)
[04:37:25] <Yuv422> hehe I'm running Ultima6 on an x86 emulator on my mac. :)
[04:37:49] <ShadwChsr> How much do you know about game programming?
[04:38:32] <Yuv422> I haven't do that much game programing.
[04:38:52] <Yuv422> do == done
[05:38:33] <-- Yuv422 has left #exult ()
[05:46:49] <Servus> just had a mind trip
[05:47:30] <Servus> i've read, oh... 500 pages of nothing but 3d terrain rendering algorithms, and im starting to understand some of the advanced concepts, maybe, maybe, by gum by golly!
[05:47:42] <ShadwChsr> what time?
[05:47:46] <ShadwChsr> err type
[05:47:51] <ShadwChsr> voxel? or polygon?
[05:47:54] <Servus> heightmap polygonal
[05:48:11] <Servus> youve seen my screenshots, im sure
[05:48:13] <ShadwChsr> I just guessed and figured it out at 3am ;)
[05:48:14] <ShadwChsr> no
[05:48:26] <Servus> well ive had a working engine for a while
[05:48:29] <ShadwChsr> What I decided was the bottom-center vertex of the tile will be the same as the Z coordinate
[05:48:43] <ShadwChsr> to determine the positions of the other 3 vertexes its not too difficult...
[05:49:07] <Servus> my current implementation is very easy on the brain :-)
[05:49:09] <ShadwChsr> left: height of Y-1 tile (provided Y axis is top-left of diamond)
[05:49:16] <Servus> and it's fast, but i can make it 5000% faster i think
[05:49:22] <ShadwChsr> right: height of X-1 tile (provided X axis is top-right of diamond)
[05:49:28] <ShadwChsr> top: height of X-1, Y-1 tile
[05:49:33] <Servus> http://4.60.125.19/images/misc/Engine14.jpg
[05:49:51] <ShadwChsr> ahh :)
[05:50:07] <Servus> im certain it's going faster than 70fps, but opengl limits me to my screen refresh hz, know how to get around that?
[05:50:11] <ShadwChsr> hmm that compass loo familliar ;)
[05:50:23] <Servus> it's ultima 9's, but i drew the needle myself:-P
[05:50:32] <ShadwChsr> dont know in opengl
[05:50:45] <Servus> you a direct3d boy? how would you do it there?
[05:50:47] <ShadwChsr> in direct-x its fairly easy, just a parameter you pass when creating the device
[05:50:56] <Servus> some type of dont_wait_for_render_to_be_completed flag while rendering it?
[05:51:05] <ShadwChsr> no
[05:51:09] <ShadwChsr> 1sec
[05:51:15] <Servus> ok
[05:52:02] <Servus> right now, i have a normal-looking grid that isnt CLOD at all, so i can only view about a quarter mile before frame rates start dipping... and right now i have absolutely no frustrum culling -- it attempts to render stuff behind the camera too :-(
[05:52:58] <ShadwChsr> In Direct3D->CreateDevice, in the "PresentParameters", you need to set...
[05:53:20] <ShadwChsr> PresentParameters.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
[05:53:22] <ShadwChsr> as opposed to
[05:53:28] <ShadwChsr> PresentParameters.PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT;
[05:53:49] <ShadwChsr> It's called the VBlank, or Vertical Blanking - thats when it does the flip, limited to the screen redraw
[05:54:02] <Servus> yeah im flipping, but maybe i should flush?
[05:54:14] <ShadwChsr> you will always flip
[05:54:22] <ShadwChsr> but the flip function call typically will wait for the VBlank
[05:54:38] <ShadwChsr> you need to find some parameter or option or function that turns that off so the flip is immediate
[05:54:56] <ShadwChsr> Why not just make a 3d engine the same way you would make an isometric one?
[05:55:03] <ShadwChsr> Have "tiles" of meshes
[05:55:12] <ShadwChsr> that way you just load whats rendered, no performance hit
[05:55:14] <Servus> yes that's what i mean
[05:55:24] <Servus> that's what i have
[05:55:27] <ShadwChsr> You wont be able to look into the distance as much but it will still be cool
[05:55:33] <Servus> my engine is _fast_, but i can make it __faster__ :-)
[05:55:54] <Servus> it loads a 2mb map, and calculates a FULL set of normals for every vertex in under a second :-)
[05:56:24] <ShadwChsr> what are you making?
[05:57:03] <ShadwChsr> (thank god its in windows! :) finally another project thats NOT linux ;)
[05:57:21] <Servus> it compiles in linux ;)
[05:57:37] <ShadwChsr> ;P yeah but you're developing it in windows ;)
[05:57:48] <Servus> well you saw my engine screenshot... i'd like to make a neat little RPG, but the coding for a framework is so daunting!
[05:58:02] <ShadwChsr> We should team up
[05:58:03] <Servus> i like xp, it's so much faster than a console
[05:58:05] <ShadwChsr> I have the other half of your code :)
[05:58:10] <Servus> can i see a screenshot? :-)
[05:58:26] <Servus> ive got some neat ideas for my engine, i plan to take it to ~1000fps tonight :-)
[05:58:33] <ShadwChsr> I'm doing raw coding, so it doesn't look like much, haven't bothered with a map editor yet
[05:58:42] <Servus> i made my map in a hex editor
[05:58:53] <Servus> as you can see, it supports different textures on each tile :-)
[05:59:40] <ShadwChsr> Here are some screenshots
[05:59:43] <ShadwChsr> different tests
[05:59:58] <Servus> i really need to make a map editor, cuz its hard to line textures up correctly in a hex editor :-)... but i cant make an editor til i finish parts of the engine
[06:00:15] <Servus> you're a developer for furcadia?
[06:00:19] <ShadwChsr> nope
[06:00:29] <ShadwChsr> Their artwork just makes handy test graphics :)
[06:00:34] <Servus> looks good, reminds me of Veil Of Darkness
[06:00:43] <ShadwChsr> I do have permission from quite a number of furcadia patchers to use their art though
[06:01:06] <Servus> i try to make most of my own art, it's funner that way(shhh bout ultima 9's compass:-)
[06:01:09] <ShadwChsr> The "larger" screenshots is using "open source" worldforge art before the artist went mental and took it all down or something ;)
[06:01:16] <Servus> looks good, how 3d is it?
[06:01:35] <Servus> the walls are sprites, yes?
[06:01:39] <ShadwChsr> Full Z coordinate like U7/U8/U9
[06:01:40] <ShadwChsr> err
[06:01:45] <ShadwChsr> I mean UO not U9
[06:01:45] <ShadwChsr> :)
[06:01:58] <ShadwChsr> everything is sprite, except rendered in the 3d pipeline
[06:02:02] <ShadwChsr> my plan is this:
[06:02:05] <Servus> well you saw my dabblings in 3d-izing u7
[06:02:11] <Servus> diamond textures? ewww
[06:02:13] <ShadwChsr> #1 - UOish graphics, 100% sprite
[06:02:18] <Servus> diamond textures are yucky
[06:02:23] <Servus> UO is 3d terrain ;)
[06:02:29] <ShadwChsr> oops
[06:02:33] <Servus> kinda, it's funky
[06:02:33] <ShadwChsr> then I mean u7ish ;)
[06:02:51] <ShadwChsr> #2 - switch terrain (still diamond) but have terrain height mapping like UO, and have true 3dish textures, cliffs, etc
[06:03:00] <ShadwChsr> #3 - 3d characters (wayyyy down the road)
[06:03:02] <Servus> diamond textures, but each "point" on it (top middle, etc, not actual edges) can be manipulated to stretch the texture over the terrain heights
[06:03:17] <Servus> care to try my engine out? it should be fast on a midrange comp
[06:03:30] <ShadwChsr> and then ultimately have 3d polygons for everything, except have it a TILE based 3d engine (the first ;-) That way you can build buildings componentized, instead of dropping some generic building
[06:03:41] <ShadwChsr> You could place a wall mesh, choose the texture, voila :)
[06:03:43] <Servus> my engines tile-based
[06:03:50] <ShadwChsr> Thats cool :)
[06:04:07] <ShadwChsr> Any chance you want to go back to somewhat 2.5D graphics and team up? :)
[06:04:15] <ShadwChsr> You could 3dify my terrain ;)
[06:04:34] <ShadwChsr> (here's working ceilings)
[06:05:56] <Servus> no @ 2.5d graphics, but all you have to do for that is to lock the camera position :-P
[06:06:12] <ShadwChsr> yeah
[06:06:17] <ShadwChsr> its just hard finding 3d artists ;)
[06:06:49] <ShadwChsr> I've never built anything yet, so I'm going to keep building until I hit UOish ;)
[06:06:57] <Servus> http://4.60.125.19/files/3DEngine.zip
[06:06:59] <ShadwChsr> after that, I'll expand into more new/fun things
[06:07:04] <ShadwChsr> but granted, no one has even done UO yet ;)
[06:07:06] <Servus> unzip it and it should run
[06:07:34] <Servus> ive always liked x-com type gfx
[06:07:37] <ShadwChsr> I could send you mine, right now WolfDude(tm) walks around bluegrid world with a bag on the ground
[06:07:41] <ShadwChsr> great test world hehehehe ;)
[06:07:48] <Servus> your engine reminds me more of xcom than anything
[06:08:15] <ShadwChsr> Just the way the graphics are, I could go in using insideUO, rip off UO's graphics, and it would run the same as that :)
[06:08:23] <Servus> downloading my engine?
[06:08:25] <ShadwChsr> yep
[06:08:40] <ShadwChsr> dont have SDL
[06:08:46] <ShadwChsr> 1 sec
[06:08:50] <ShadwChsr> <borrows dlls from exult>
[06:08:55] <Servus> oh whoops
[06:09:06] <Servus> want me to upload it?
[06:09:28] <ShadwChsr> hehe cool
[06:09:30] <ShadwChsr> it works
[06:09:38] <ShadwChsr> 56.0 fps
[06:09:53] <ShadwChsr> monitor @ 75 hz
[06:09:56] <Servus> secret keys : s and x
[06:10:05] <Servus> hold down ctrl and play with the arrow keys also
[06:10:07] <ShadwChsr> i figured out s, not x tho ;)
[06:10:20] <ShadwChsr> ooo ambience
[06:10:26] <Servus> changes the sun's vector
[06:10:42] <Servus> the map is *huge*, it should maintain the same fps all throughout
[06:11:25] <ShadwChsr> is the entire map little tiles? or "tile" meshes spliced together?
[06:11:25] <Servus> know that each tile could be a different texture without a performance loss
[06:11:41] <Servus> here's the map http://4.60.125.19/images/misc/Heightmap.jpg
[06:11:57] <Servus> map format is currently: header+texture data+heightmap data[file youre viewing]
[06:12:06] <ShadwChsr> ahhhhhhhhh so its rendered based on heightmap data?
[06:12:11] <Servus> indeed
[06:12:14] <ShadwChsr> voxelish?
[06:12:14] <ShadwChsr> :)
[06:12:17] <Servus> nope
[06:12:28] <ShadwChsr> yeah, but same kind of idea, from heightmap data :)
[06:12:35] <Servus> just a sec
[06:12:56] <Servus> oh, a and z to zoom
[06:12:59] <ShadwChsr> is the heightmap data calculated at runtime or at map-save/build time?
[06:13:14] <ShadwChsr> You need some mipmapping :)
[06:13:21] <Servus> it's saved in that jpg i showed you
[06:13:24] <Servus> it has mipmapping enabled
[06:13:35] <ShadwChsr> Ahhh
[06:13:41] <Servus> do you mean geometric mipmapping (level of detail)?
[06:14:00] <ShadwChsr> Nah, it was just the way I zoomed out and could see a grid/grass tiling :)
[06:14:06] <Servus> http://4.60.125.19/images/misc/Engine15.jpg
[06:14:07] <ShadwChsr> most games do that though (like neverwinter)
[06:14:25] <ShadwChsr> there we go! :)
[06:14:34] <Servus> i know how to get rid of that, with a radically different texturing scheme called texture splatting
[06:15:12] <Servus> but see how inefficient my terrain is?
[06:15:23] <Servus> even if the ground were flat as a board, it'd still render all those darn triangles
[06:15:25] <ShadwChsr> What I want to do in mine is have it still tile based, more like simcity 4 or UO, where the map is saved as actual integer/floating point heights for each tile, instead of loading from a graphic
[06:15:33] <ShadwChsr> that way you get precice object placement in the world
[06:15:40] <ShadwChsr> nothing worse than having a tree floating in midair ;)
[06:15:53] <Servus> how do you think graphics are saved? :-)
[06:16:09] <ShadwChsr> yeah, but theres something about it that bugs me ;)
[06:16:14] <Servus> the heightmap i showed you is an 8-bit grayscale ( one byte per pixel, or one byte per vertex height )
[06:16:20] <ShadwChsr> too many times in photoshop, slip of the mouse I guess ;)
[06:16:32] <Servus> i just chose to display it as a graphic for you
[06:16:43] <ShadwChsr> neat, so each pixel is a tile?
[06:17:33] <Servus> almost -- each pixel is the vertex of a tile
[06:17:51] <Servus> so each tile has 4 vertexes, as it's a quad, and thus it uses 4 pixels in the heightmap
[06:18:00] <Servus> but remember that quads in a grid, of course, share vertices
[06:18:30] <ShadwChsr> cool
[06:18:44] <ShadwChsr> what compiler do you use?
[06:18:52] <Servus> msvc++
[06:18:53] <Servus> 6.0
[06:18:55] <ShadwChsr> doh
[06:19:05] <ShadwChsr> if you had .net i could send you my source :)
[06:19:11] <Servus> pleh @ .net
[06:19:14] <Servus> is it really that different?
[06:19:22] <Servus> i have .net but not the HD space to install it :-)
[06:19:26] <ShadwChsr> Ohhhhhh yeah
[06:19:28] <ShadwChsr> .net is awesome
[06:19:37] <Servus> are you using sdl?
[06:19:39] <ShadwChsr> and .net 2003 is even better (form designer for c++! form designer for c++! :)
[06:19:41] <ShadwChsr> no
[06:19:51] <ShadwChsr> everything done by "hand"
[06:19:53] <Servus> vc++ has had a form designer for ages
[06:19:54] <ShadwChsr> even the API code
[06:20:01] <ShadwChsr> its a dialog editor, doesnt count :)
[06:20:09] <ShadwChsr> you cant do all your windows in it :)
[06:20:14] <Servus> oh ok
[06:20:19] <Servus> 3d math is so insane :-(
[06:20:33] <ShadwChsr> yeah, I started writing some classes for it
[06:20:35] <Servus> people write large pdfs on the subject but never describe what things like "error metric" means
[06:20:41] <Servus> i just now figured out what it means :-)
[06:20:51] <ShadwChsr> I have vectors, points, AABBs, Rays, and collision code for Ray->AABB and AABB->AABB
[06:20:58] <ShadwChsr> oh and rotation around an axis
[06:21:12] <ShadwChsr> i'm not as advanced as you yet :)
[06:21:25] <ShadwChsr> Here have some binaries
[06:21:25] <Servus> im very proud of my collision code though, i made it from scratch and i think i invented a new theorem or something :-P
[06:21:33] <ShadwChsr> You might need to fix the shortcut so it points to the right location
[06:21:36] <ShadwChsr> but run the shortcut
[06:21:45] <ShadwChsr> the player disappears because furcadia doesn't have 8 direction player graphics
[06:21:48] <Servus> i can find the height of any area on any type of functional quad:-)
[06:21:59] <Servus> UO only has you facing left, it mirrors...
[06:22:02] <ShadwChsr> this is fairly old code, the new code is alot better, even has a mode to limit the player to 4 directions ;)
[06:22:23] <Servus> you have an ini file! i want one
[06:22:28] <ShadwChsr> :) :)
[06:22:59] <ShadwChsr> BTW - collision detection and the sort order works, i just was lazy and in that demo neither is defined ;P
[06:23:07] <ShadwChsr> so use your imagination ;)
[06:23:15] <Servus> i need d3dx81ab.dll
[06:23:34] <Servus> it wont let you send a .dll to me
[06:23:46] <ShadwChsr> go into options and turn that off for good
[06:24:22] <ShadwChsr> DCC Ignore - disabled, and uncheck "turn back on in.."
[06:24:22] <Servus> ok try again
[06:24:52] <ShadwChsr> This is my old delphi version before I ported it all to C++ and vastly improved it (its a LOT better now...)
[06:25:16] <Servus> all i see is a blue grid
[06:25:24] <ShadwChsr> run the shortcut not the exe
[06:25:32] <ShadwChsr> it has command line parameters to tell it to load a certain map
[06:25:51] <Servus> ah, cool
[06:25:59] <Servus> looks a lot like veil of darkness
[06:26:12] * ShadwChsr does a search for veil of darkness
[06:26:27] <Servus> heh
[06:26:31] <Servus> its an old, obscure game:-)
[06:27:01] <ShadwChsr> :)
[06:27:13] <ShadwChsr> What do you think? not too shabby for my first game ;)
[06:27:34] <ShadwChsr> I just wish I had been less lazy and made a better map for the demo :)
[06:28:48] <ShadwChsr> try the new one ;)
[06:29:02] <ShadwChsr> its a little rougher around the edges since the maps are hardcoded until I bother making a map editor
[06:29:05] <ShadwChsr> and no ini file yet ;)
[06:29:22] <ShadwChsr> so all you need to do is put the GRF files in to C:\gameres (ugh, i hate hardcoded paths) and run the binary
[06:29:47] <ShadwChsr> This world is even better than the last one
[06:29:50] <Servus> http://www.justadventure.com/reviews/VeilDarkness/veilpic1.jpg *sigh* hard to find it
[06:29:50] <ShadwChsr> One backback and a wolf
[06:29:51] <ShadwChsr> ;)
[06:30:05] <ShadwChsr> looks cool :)
[06:30:26] <Servus> it looks good
[06:30:29] <ShadwChsr> psst file transfer :)
[06:30:38] <Servus> i dont see anything?
[06:31:07] <Servus> fast upload, what connection are you on?
[06:31:14] <ShadwChsr> This can render even complexer maps than the other demo i sent, but its hard to believe from this demo ;)
[06:31:18] <ShadwChsr> 1.5mbit/s DSL
[06:31:27] <ShadwChsr> 640k uplink
[06:32:02] <Servus> backpack in bluegrid world:-)
[06:32:06] <Servus> that must be expensive
[06:32:09] <ShadwChsr> yep!
[06:32:10] <ShadwChsr> ;)
[06:32:20] <ShadwChsr> At one point I had a tree and a bag too ;)
[06:32:37] <ShadwChsr> and 2 wall segments
[06:32:37] <ShadwChsr> :)
[06:32:47] <ShadwChsr> do you have the .NET framework installed?
[06:32:55] <Servus> yes
[06:33:17] <ShadwChsr> try this :)
[06:33:25] <Servus> dammit
[06:33:28] <Servus> it's beeping but no popup
[06:33:40] <ShadwChsr> ugh same mIRC bug
[06:33:44] <Servus> rejected .exe's
[06:33:47] <ShadwChsr> make sure you uncheck "turn back on in..." this time
[06:33:48] <Servus> buger
[06:33:52] <Servus> i did! just a sec.
[06:34:13] <Servus> ok
[06:34:32] <ShadwChsr> the resource editor is in C# since I could whip out an awesome UI fast
[06:34:34] --> Yuv422 has joined #exult
[06:34:45] <ShadwChsr> try opening those two GRF files i sent
[06:35:24] <Servus> that character templates icon looks familiar;)
[06:35:32] <ShadwChsr> :)
[06:35:38] <ShadwChsr> Gah I still need to program animation previews
[06:35:39] <ShadwChsr> :P
[06:36:05] <Servus> looks good, like insideuo:p
[06:36:09] <ShadwChsr> Yeah :)
[06:36:19] <ShadwChsr> I developed an entire file format for all of the game resources, even maps
[06:36:25] <ShadwChsr> works like a mini database :)
[06:36:42] <Servus> i need a hardcore map editor :-)
[06:36:47] <ShadwChsr> So do I
[06:37:01] <Servus> at least yours is 2d:p
[06:37:06] <ShadwChsr> the plan is to get Visual Studio .NET 2003 when its out, and recompile my game with a different UI, which does the map editing
[06:37:12] <Yuv422> my map is already made :P
[06:37:14] <Servus> you know how long it took me to figure out how to have the program know what triangle youre clicking?
[06:37:21] <ShadwChsr> Oh god
[06:37:24] <ShadwChsr> can you help me with that? :)
[06:37:27] <ShadwChsr> thats why theres just a backpack
[06:37:32] <Servus> in 3d?
[06:37:34] <ShadwChsr> i want to "select" the backpack
[06:37:37] <Servus> in direct3d it's a cinch
[06:37:45] <ShadwChsr> well, you look at the zbuffer, right?
[06:37:45] <Servus> it has helper functions for just such a thing
[06:37:56] <Servus> no, you call a function with your mesh and with the mouse coordinates:P
[06:38:10] <ShadwChsr> problem is, my "3d" is just two triangles arranged to make a rectangle - for the image
[06:38:10] <ShadwChsr> ;)
[06:38:33] <ShadwChsr> All my actual collision detection and "object bounding box" data is stored outside of direct3D in custom classes/objects
[06:38:33] <ShadwChsr> :(
[06:38:51] <ShadwChsr> And it gets even uglier since I can't automatically calculate the camera's position, so somehow I need to figure out the Z angle.. ;P
[06:39:07] <Servus> well since youre doing it 2d, it should be easy, since you dont have to deal with perspective or occlusion problems
[06:39:18] <Servus> i think you're overthinking it
[06:39:18] * ShadwChsr nods
[06:39:22] <ShadwChsr> maybe ;)
[06:39:34] <ShadwChsr> What I'm trying to do is cast a ray and collision detect it with my AABB's
[06:39:38] <Servus> ok, so youve got a map, and you click somewhere, and you want it to select something
[06:39:40] <ShadwChsr> ray being the cursor
[06:39:50] <ShadwChsr> well, two things
[06:39:54] <ShadwChsr> A) know what object it's over
[06:40:03] <Servus> do you want it to select it by what grid-position you select ( your mouse ray goes straight through everything til it hits the floor ), or you want it to hit a wall first, even if there's something behind it?
[06:40:05] <ShadwChsr> B) know what is the "ground" or "surface" it's over, for placing objects
[06:40:10] <ShadwChsr> i'm starting with A though :)
[06:40:26] <ShadwChsr> I already have the grid position working, doesn't help with 3d worlds though :)
[06:40:31] <ShadwChsr> since I have a z coordinate
[06:40:37] <Servus> say your mouse is over a wall, do you want it to select the wall, or the ground that it'd hit if the wall wasnt there? it makes a big difference:-)
[06:40:44] <ShadwChsr> the wall
[06:40:57] <ShadwChsr> just like in exult :)
[06:41:33] <Servus> since youre using sprites, you can simply check either if the mouse is inside the sprite's bounding box, or, you can check first to see if mouse is inside bounding box, then check again to see if it touches one of the pixels in the sprite
[06:41:51] <Servus> exult has problems with that, it only works on a bounding box level apparently
[06:41:55] <ShadwChsr> I'm doing method B after I get method A working :)
[06:42:00] <Servus> you cant click something through the middle of a donut -- it will select the donut
[06:42:09] <ShadwChsr> I noticed that while playing today :)
[06:42:25] <ShadwChsr> especially when i'm trying to get to the fish that has the key to the hoe of destruction
[06:42:25] <Servus> in exult i have a serious graphical glitch -- the screen flickers badly every now and then
[06:42:31] <ShadwChsr> the fish is under a large plant so i cant get to the fish ;)
[06:42:36] <Servus> hehe i found that easy enough in exult :-)
[06:42:45] <ShadwChsr> yeah so did I, its just trickier ;)
[06:43:10] <Servus> my screen flickers and i cant make it run as fast as i want, those are my exult complaints :-P
[06:43:16] <ShadwChsr> :)
[06:43:20] <Servus> 10fps isnt fast enough! i need 15fps at least, to play it how i remember
[06:43:36] <ShadwChsr> They say the party formation is improved, however, they just end up in a huge clump on my computer ;P
[06:43:39] <ShadwChsr> I dont know how thats improved ;)
[06:43:50] <Servus> that's how it's sposed to be
[06:43:58] <Servus> i have trouble getting in and out of combat mode
[06:44:03] <ShadwChsr> Yeah but it looks like some crazy unvirtuous act
[06:44:09] <Servus> ;)
[06:44:20] <ShadwChsr> what art thou doing avatar
[06:44:21] <ShadwChsr> anyhow
[06:44:28] <ShadwChsr> any thoughts on my little problem? :)
[06:44:29] <Servus> Yes avatar, that is PRECISELY the thing to do!
[06:44:34] <Servus> i just told you how to do it :-p
[06:44:57] <ShadwChsr> well I figured that much out on my own :)
[06:45:04] <Servus> since items can be any height tall, you will have to check the mouse against the bounding box of every sprite in teh scene
[06:45:07] <ShadwChsr> how do I determine which bounding box the mouse is over?
[06:45:22] <Servus> you can optimize it by only checking the bounding box of objects in a vertical line from the mouse
[06:45:32] <Servus> in blue-grid world?
[06:45:35] <ShadwChsr> yeah ;)
[06:45:48] <ShadwChsr> X and Y axis are rotated to be isometric
[06:46:10] <ShadwChsr> Z is simple, just doing a screenY - Z when determining where to place objects
[06:46:28] <Servus> every blue-grid is actually a square, and just has a diamond drawn inside it, right?
[06:46:53] <ShadwChsr> each cell is a tile, basically
[06:46:56] <Servus> so check the mouse against the square-bounding box of the tile
[06:47:09] <ShadwChsr> you mean in d3d?
[06:47:10] <Servus> then you've narrowed it down to the middle tile, and possibly those around it, so do a pixel-level check then
[06:47:21] <Servus> im not limiting the conversation to d3d
[06:47:45] <ShadwChsr> problem is, the tiles arent given square bounding boxes
[06:47:53] <Servus> lemme look at your engine again :-)
[06:47:57] <ShadwChsr> thats all abstracted into the renderer, the game doesn't handle that :)
[06:48:05] <Servus> but the blue grid diamonds are actually in a square .bmp or whatnot to begin with, right?
[06:48:11] <ShadwChsr> game tells the renderer DLL: draw me a tile at this location :)
[06:48:24] <ShadwChsr> normally, except the blue grid tiles are dynamically generated so that i can change the tile size later
[06:48:28] <ShadwChsr> but theoretically, yes
[06:48:28] <ShadwChsr> :)
[06:48:36] <ShadwChsr> they are generated and them become a bmp or whatnot in memory :)
[06:48:59] <Servus> the blue grid is just a series of lines then?
[06:49:05] <Servus> oh ok thought it was a blue-grid texture map
[06:49:31] <ShadwChsr> it is
[06:49:37] <ShadwChsr> here's how it works:
[06:49:45] <Servus> this will be better explained with a pic, just a second :-)
[06:49:56] <ShadwChsr> Tiles == sprites (with the exception of character animations)
[06:50:21] <ShadwChsr> a tile graphic is just a transparent PNG file with the middle being the nice isometric tile, being grass, a tree, whatever
[06:50:42] <ShadwChsr> so to place a grass tile, I just set that location in the map array (the ground is an array, nothing else) to be the Tile's ID
[06:50:54] <ShadwChsr> if the tile ID == 0 (in other words, empty), it tells the game to render TileID 0
[06:51:08] <Servus> yes thats what i thought
[06:51:21] <ShadwChsr> the game, upon starting, checks the compiled constants for the tile width and height, and draws the blue lines, creating the "default/empty" tile graphic
[06:51:22] <Servus> thats how UO works, it's a diamond drawn inside a rectangular-shaped graphic
[06:51:24] <ShadwChsr> make sense? :)
[06:51:37] <ShadwChsr> so right after loading, it becomes a static tile graphic
[06:51:42] <Servus> indeed
[06:51:47] <Servus> im drawing you a pic :-)
[06:51:48] <ShadwChsr> but if i go in and mess with the constants, the shape of the graphic changes
[06:51:50] <ShadwChsr> k :)
[06:52:24] <ShadwChsr> I know, because I "learned" how to program my engine by studying U8 and InsideUO :)
[06:52:32] <ShadwChsr> no reverse engineering, just looking at what they did
[06:52:53] <ShadwChsr> mine is a little more advanced then UO's though, kind of a combo U8/UO engine. Tile graphics don't need to be chopped up like in UO
[06:52:59] <ShadwChsr> has a better sorter :)
[06:53:15] <Servus> im considering using a single texture to cover my entire world
[06:53:16] <ShadwChsr> (that way i wont end up with stupid things like disappearing horse heads through walls like in UO :)
[06:53:21] <ShadwChsr> eekk ;)
[06:53:29] <Servus> that's something like a 100,000x100,000 pixel texture, and it's possible :-)
[06:53:31] <ShadwChsr> dont forget alot of cards are limited to 128x128
[06:53:50] <Servus> there's a lot of tricky stuff i've seen in the last couple weeks during my research
[06:53:52] <ShadwChsr> and most cards pre-geforce 2 go VERY slow once you get to 512x512 sizes
[06:54:08] <Servus> im talking about textures you couldnt ever load into system memory
[06:54:14] <ShadwChsr> what you do is chop up the texture into bitesize chunks at runtime and mess with UV coordinates, right? :)
[06:54:24] <Servus> 300mb textures, uncompressed :-)
[06:54:29] <Servus> yes
[06:54:40] <ShadwChsr> :) thats what my game does to render large sprite graphics
[06:55:05] <ShadwChsr> (err will do. all the framework code is there, the actual renderer just has a // TODO: program this
[06:55:06] <ShadwChsr> ;)
[06:55:47] <ShadwChsr> The way I'm programming the engine it should be straightforward to drop in 3d terrain and objects :)
[06:55:55] <ShadwChsr> possibly even integrated with sprite graphics :)
[06:56:53] <ShadwChsr> Another thing I'm going to do is have multiple descriptions for every object
[06:56:59] <ShadwChsr> I'm addicted to metroid's scan mode
[06:57:03] <ShadwChsr> a name just isn't enough ;)
[06:57:22] <ShadwChsr> I want to click on a tree, and if i have a good botany skill in the game, it will tell me when it blooms and what bees like it or something
[06:57:23] <Servus> http://4.60.125.19/images/misc/Tile.jpg
[06:57:23] <ShadwChsr> hehehe
[06:57:24] <ShadwChsr> ;)
[06:57:46] <ShadwChsr> Yeah thats how i had the tile checking
[06:57:50] <ShadwChsr> 1sec
[06:58:03] <Servus> http://www.geocities.com/russell_figowitz/images/Misc/3dchunk.jpg consider this
[06:58:21] <ShadwChsr> yeah
[06:59:01] <Servus> create a 3d mesh out of premade "complex tiles" like that
[07:00:01] <ShadwChsr> look at this screenshot
[07:00:04] <ShadwChsr> it even has the bounding boxes
[07:00:11] <ShadwChsr> how do i determine where the cursor is?
[07:00:21] <ShadwChsr> not the ground tile coordinate, which would be the grass, but the actual wall object?
[07:00:38] <ShadwChsr> pretend the white arrow is the cursor ;)
[07:00:55] <ShadwChsr> wolfguy is rendered in the wrong order so ignore him too ;)
[07:02:22] <ShadwChsr> objects can be anywhere, possibly even floating in midair (arrow? magic object?)
[07:02:27] <ShadwChsr> objects can also be stacked
[07:02:37] <ShadwChsr> ie/ 4 story house
[07:03:35] <Servus> http://4.60.125.19/images/misc/Selection.jpg
[07:04:13] <Servus> follow the bright strip from front-to-back, stopping at every tile and checking the mouse cursor against all objects in the tile
[07:04:34] <ShadwChsr> fair enough, now watch my dilemma...
[07:08:01] <ShadwChsr> You'll see why just checking the Y at that location is difficult ;0
[07:08:01] <ShadwChsr> :)
[07:08:14] <Servus> thats no problem
[07:08:47] <ShadwChsr> Really? 3 game axis (X, Y & Z) get translated into the Y screen axis
[07:09:02] <Servus> you know the height of the window, of course, so to convert mouse.y into world.y, just do (currentworldposition.y + screenheight.y) - mouse.y
[07:09:39] <ShadwChsr> the game axis's are rotated
[07:09:39] <Servus> currentworldposition.y - screenheight.y will get you the world coordinate of the bottom of the screen, so just subtract the mouse.y from that and you have the world coordinates, so to speak, of the mouse
[07:09:55] <ShadwChsr> it won't though :)
[07:09:59] <Servus> lemme see
[07:10:07] <ShadwChsr> take this for example:
[07:10:19] <Servus> one sec, ddrawing :-)
[07:10:20] <ShadwChsr> current world position 10x0
[07:10:33] <ShadwChsr> it's not rendered at the top of the world
[07:10:37] <ShadwChsr> it could be halfway down the world
[07:10:40] <ShadwChsr> its a diamond map
[07:11:08] <ShadwChsr> What I'd need to do is rotate the mouse position using matrix math into the same coordinate space, then translate/scale it into world space
[07:11:20] <Servus> yeah, thats why i took current world position into account
[07:11:29] <Servus> no rotations, translations, or scalings
[07:11:31] <Servus> :-)
[07:12:09] <ShadwChsr> there is no currentworldposition though :)
[07:12:18] <ShadwChsr> it's an pixel/integer offset from 0x0
[07:12:41] <ShadwChsr> 10 pixels to the right of world coordinate 0x0 will be an 10x0 render offset
[07:12:55] <ShadwChsr> the screen/camera coordinates are in screenspace, not worldspace :)
[07:13:35] <ShadwChsr> the camera just acts like the whole world is prerendered, it doesnt care if its an isometric map, hex map, or 3d map
[07:13:59] <ShadwChsr> .. I think
[07:13:59] <ShadwChsr> ;)
[07:14:23] <Servus> since youre using direct3d, you should consider using one of the helper functions that lets you select 3d items on the fly
[07:14:47] <ShadwChsr> I thought about that
[07:14:57] <ShadwChsr> the renderer code is abstracted
[07:15:09] <ShadwChsr> I wrote it into a DLL so that it could be directdraw, direct3d, opengl, whatever
[07:15:11] <ShadwChsr> :(
[07:15:40] <Servus> almost got your problem sorted out :-)
[07:15:40] <ShadwChsr> I think I painted myself into a corner ;)
[07:16:42] <ShadwChsr> :)
[07:17:17] <Servus> what size in pixels are your griddiamonds
[07:17:33] <Servus> 72x35?
[07:17:34] <ShadwChsr> as in, rectangular source images?
[07:17:40] <Servus> it doesnt matter, it's the same height
[07:17:48] <ShadwChsr> 70x36
[07:17:50] <ShadwChsr> you were close :)
[07:18:05] <Servus> :-P
[07:18:05] <Servus> ok
[07:18:52] <ShadwChsr> if I take that, calculate the isometric "angle", and put that into a matrix rotation about the axis, I get a square tile size of 39.35 in world space
[07:19:19] <ShadwChsr> but, i really need to rethink that because i think what i'm using that for is wrong :)
[07:19:52] <Servus> ive almost got it :-)
[07:19:59] <ShadwChsr> back in 2mins :)
[07:20:38] <Servus> oko
[07:24:08] <ShadwChsr> back
[07:25:25] <Servus> wb
[07:26:22] <ShadwChsr> any luck yet?
[07:28:21] <Servus> nearly there i think:-)
[07:31:41] <Servus> got it :-)
[07:31:54] <Servus> i think, dammit lemme check :-P
[07:35:58] <Servus> ok it works
[07:36:07] <Servus> but i have to check it with several sets of data before i give it to you :-)
[07:36:27] <ShadwChsr> ;)
[07:36:35] <ShadwChsr> show me anyways ;)
[07:36:46] <ShadwChsr> just incase it's wayyyy off and you're wasting effort :)
[07:36:56] <ShadwChsr> Not that it would be, but I understand the quirks of the engine :)
[07:37:06] <Servus> i can select any pixel on the sample scene you gave me, and tell you what "bluegridder" it's in
[07:37:20] <ShadwChsr> without source?
[07:37:20] <Servus> without doing any funny business, just using coordinates
[07:37:27] <Servus> i do it in notepad:-)
[07:37:30] <ShadwChsr> ahhhh ;)
[07:37:46] <ShadwChsr> bluegridder is easy
[07:37:50] <ShadwChsr> try doing 3d objects :)
[07:37:53] <Servus> that's what im doing
[07:37:57] <ShadwChsr> oh:)
[07:38:04] <Servus> 3d objects is an extension
[07:38:23] <Servus> once youve got what bluegrid youre in, you just do a vertical check on all the tiles vertical of the selected grid, and no a per-pixel test
[07:38:26] <ShadwChsr> I'm not so sure, but I'll trust you for now :)
[07:38:34] <ShadwChsr> you cant do a vertical check though hehehehehe ;)
[07:38:45] <ShadwChsr> there is no vertical in world space
[07:38:45] <ShadwChsr> :)
[07:38:58] <ShadwChsr> none of the axis line up with screen vertical
[07:39:08] <ShadwChsr> you would need to check every single game object
[07:39:23] <Servus> of course theres no vertical in world space
[07:39:26] <ShadwChsr> or.. is that what you mean? :)
[07:39:27] <Servus> there's a vertical in screen space
[07:39:39] <Servus> you can check every object on screen, but this is just to save a littel time
[07:39:48] <ShadwChsr> I loop through every object rendered to the display, check it's screen coordinates against the mouse coordinates?
[07:40:06] <Servus> draw a bounding box around the mouse cursor, then find out what objects are in the bounding box, then find out, among those objects, if any touch the mouse cursor with a pixel
[07:41:50] <ShadwChsr> Is there any way I can do it in world space?
[07:42:07] <ShadwChsr> Even if your method works, I'm still going to need the world space version for some other similar tricks I need to do :(
[07:44:02] <Servus> direct3d or opengl has appropriate functions:-)
[07:44:17] <Servus> direct3d doesnt need to do any rendering for the function work though
[07:44:32] <Servus> you just pass it mesh data and mouse cursor data, i think, i did it myself and it worked well :-)
[07:44:37] <Servus> let me dig it up
[07:45:20] <ShadwChsr> Well, what I'd like to do is loop through my own datasets to do the check
[07:45:22] <Servus> ooh youll like this program :-)
[07:47:20] <Servus> http://4.60.125.19/files/Marble.zip
[07:47:29] <Servus> it lets you modify the heightmap *and* paint
[07:47:44] <Servus> you can notice that i forgot to clear the light struct so it might take on a random hue
[07:49:06] <ShadwChsr> doesnt work
[07:49:10] <ShadwChsr> a window flashes then exits
[07:49:57] <Servus> make sure you have the data folder there
[07:50:10] <ShadwChsr> yep
[07:50:12] <ShadwChsr> not workin :(
[07:50:41] <Servus> http://4.60.125.19/files/Marble.zip re-download
[07:51:28] <ShadwChsr> nope
[07:51:35] <ShadwChsr> it doesnt like my pc
[07:51:35] <ShadwChsr> :)
[07:52:29] <Servus> Lemme get a screenshot
[07:53:16] <Servus> http://4.60.125.19/images/misc/Marble.jpg
[07:53:54] <Servus> i painted both the heightmap and the texturing in=program just now with the mouse
[07:54:12] <ShadwChsr> cool :
[07:54:12] <ShadwChsr> :)
[07:54:35] <Servus> wanna see the func for the mouse-choosing? it's UGLY
[07:54:45] <ShadwChsr> yeah
[07:55:18] <Servus> actually it's not bad at all, but it's clumsy
[07:55:33] <Servus> you can get it to return the triangle selected by chopping off most of the func
[07:56:15] <Servus> http://sourcepost.sytes.net/sourceview.aspx?source_id=4330
[07:57:17] <ShadwChsr> yeah thats not going to help me much, drat :)
[07:57:36] <Servus> actually it should
[07:57:50] <Servus> the only direct3d function it uses is D3DXIntersect, and it doesnt even need a rendering context set up to do that
[07:58:50] <ShadwChsr> // Get the pick ray from the mouse position
[07:58:53] <ShadwChsr> THAT
[07:59:01] <ShadwChsr> how, how, how do you get the proper ray?
[07:59:01] <ShadwChsr> ;)
[07:59:14] <Servus> v.x = ( ( ( 2.0f * (ptCursor.x) ) / (g_Width) ) - 1 ) / matProj._11;
[07:59:14] <Servus> 00030: v.y = -( ( ( 2.0f * (ptCursor.y) ) / (g_Height) ) - 1 ) / matProj._22;
[07:59:14] <Servus> v.z = 1.0f;
[07:59:18] <ShadwChsr> // Transform the screen space pick ray into 3D space
[07:59:20] <Servus> eek spammy, it pressed send for me!
[07:59:32] <ShadwChsr> yeah i hate that "feature" of mirc
[07:59:36] <Servus> it's ugly math, but it's all right there for you
[07:59:50] --> `daniel has joined #exult
[07:59:59] <`daniel> hello :)
[08:00:00] <Servus> hi daniel, no speaking of strange things tonight, y'hear?
[08:00:01] <`daniel> umm
[08:00:06] <Servus> :-)
[08:00:22] <`daniel> i searched for 'exult studio' in documentation and couldnt find what i wanted
[08:00:22] <Servus> im so excited! ive got some nice ideas about mesh optimizations:-)
[08:00:26] <`daniel> thought I'd ask here
[08:00:29] <`daniel> how do i use it?
[08:00:31] <ShadwChsr> Any idea what the actual algorithm is? :)
[08:00:33] <Servus> it's a separate download i think
[08:00:34] <`daniel> lol servus
[08:00:45] <Servus> not a clue, shadw, but ive got a neat concept
[08:00:55] <`daniel> no speaking of such weird things i'm afraid :/
[08:01:15] <`daniel> how do i access exult studio under the unix CVS?
[08:01:41] <Servus> :-/
[08:02:01] <Servus> i wish direct3d was opensource :_0
[08:02:02] <Servus> :-)
[08:02:07] <`daniel> lol
[08:02:15] <`daniel> i wish windows was opensource
[08:02:22] <Servus> id *really* like to see the math behind D3DXIntersect(
[08:02:25] <`daniel> so ppl could look at the code and scoff at the creators
[08:02:27] <ShadwChsr> :)
[08:03:03] <`daniel> yo ppl, please help me
[08:03:09] <Servus> i dunno
[08:03:11] <`daniel> I don't know howto get exult studio
[08:03:33] <Servus> http://exult.sourceforge.net/studio.php
[08:03:54] <Servus> download it here http://exult.sourceforge.net/snapshots/ExultStudio.exe
[08:04:09] <Servus> silly gooth ;-P
[08:04:57] <ShadwChsr> Servus: try this: http://www.realtimerendering.com/int/
[08:05:05] <ShadwChsr> I imagine Microsoft used publicly available algorithms
[08:05:18] <`daniel> Servus thats an exe
[08:05:24] <`daniel> something which is foreign to me
[08:05:27] <ShadwChsr> the Woo fast Ray/AABB intersection test is very popular, even quake uses it, and they teach it at universities :)
[08:06:44] <Servus> well thats all i see, too bad, try wine'ing :-P
[08:06:53] <ShadwChsr> Just don't use the "Pierre Terdiman" intersection test, his doesn't work!
[08:07:07] <Servus> well quakes opensource:-P
[08:07:19] <Servus> studios not working for me
[08:07:19] <ShadwChsr> I know, thats how I know they used the woo code ;)
[08:07:24] <Servus> stderr says "blackgate path not found"
[08:08:02] <Servus> For U*ix platforms you need to build Exult Studio from the source avilable from our source snapshot at http://exult.sourceforge.net/download.php. You will also need the GTK+ library installed as well as libglade.
[08:08:26] <Servus> i never understood why ppl say U*ix, that's dumb... Linux isn't U*nix, it's *nix
[08:09:29] <ShadwChsr> ;)
[08:09:49] <DarkeZzz> Because 'Unix' used to be a trademark, so when you were talking about a POSIX conforming 'unix' variant, you used to refer to it as 'U*ix'. This was way back in the dinosaur age though, I haven't seen anyone griping about the unix tradmark in ages. *grin*
[08:11:03] <`daniel> most programs made under linux can be modified to compile under 'Unix' varients like freebsd, openbsd and netbsd
[08:11:05] <Servus> well it's annoying :-P
[08:11:13] <`daniel> Unix if more general
[08:11:28] <ShadwChsr> its all the same to me ;P
[08:11:31] <Servus> i cant get studio to start up =-/
[08:11:40] <`daniel> some programs don't even need to be modified and can compile straight too
[08:13:05] <DarkeZzz> Linux isn't technically unix, since it doesn't conform to the appropriate spec, and IIRC you need to have it tested and registered to conform to legitmately become a 'Unix'. But for all intents and purposes, it doesn't matter. *Grin*
[08:13:56] <Kirben> Servus: is it in same directory as exult.cfg ?
[08:14:02] <ShadwChsr> *rolls his eyes ;)
[08:14:08] <`daniel> debian however is not linux
[08:14:14] <ShadwChsr> Personally they should drop linux and write something more modern :)
[08:14:19] <Servus> yes kirben
[08:14:19] <ShadwChsr> with a nice XML config store, etc
[08:14:23] <`daniel> it's a super mega and ultra elite distro at which all others tremble in fear of
[08:14:25] <ShadwChsr> microkernel
[08:14:32] <Servus> it tries to create its own exult.cfg though
[08:15:05] <Servus> ** (exult_studio.exe:3712): WARNING **: Failed to create from C:\Program Files\Exult\data/exult_studio.glade
[08:15:19] <Servus> because that file doesnt exist, and i dont have it anywhere
[08:15:38] <`daniel> debian owns you are cause you are so under elite its not funny
[08:15:54] <`daniel> fear in the power that is, DEBIAN
[08:16:26] <ShadwChsr> scary ;P
[08:16:32] <`daniel> lol
[08:16:36] <ShadwChsr> I've never gotten exult studio to run in windows servus
[08:16:42] <ShadwChsr> it just crashes all the time
[08:16:43] <`daniel> just an example of some ppl I've talked to
[08:17:09] <`daniel> real debian zealots... err to put it more politcally correct we shall say .... advocates
[08:17:15] <ShadwChsr> ;)
[08:17:26] <ShadwChsr> I found some weird exult bugs today
[08:17:34] <Kirben> maybe try unpacking file manually ? exult_studio.glade is definately included.
[08:17:37] <ShadwChsr> I get a weird "zzzzt" noise every few seconds when I play
[08:18:00] <Servus> exult flickers like crazy when i play
[08:18:05] <ShadwChsr> and whats the point of paying 30 gold coins if i cant even join the play? what good is the avatar costume?? :P
[08:19:25] <ShadwChsr> I also think theres a bug with training
[08:19:42] <ShadwChsr> they just train me forever
[08:19:42] <ShadwChsr> :)
[08:19:44] <Servus> ah-ha it opens up
[08:20:34] <Servus> but that flicker is unbearable
[08:26:53] <-- `daniel has left IRC ("Client Exiting")
[08:28:10] <Kirben> Try reading es docs.
[08:28:22] <Kirben> hmm I left a few images out of es snapshots.
[08:45:53] <Servus> binary triangle trees.. hurting brain...
[08:50:39] <ShadwChsr> :)
[08:51:14] <ShadwChsr> the file format for my game is actually a binary tree ;)
[08:55:00] <Servus> what type?
[08:55:21] <Servus> i just barely *really* realized what a binary triangle tree is and how it works
[08:55:58] <Servus> so im gonna use a binary triangle tree, i think, with a venn sphere for LOD
[08:56:07] <Servus> with some sort of error metric for each vertex
[08:57:22] <Servus> so im gonna use half a dozen binary trees for the express purpose of just the terrain! ick!
[09:13:19] <ShadwChsr> :)
[09:13:38] <ShadwChsr> mine is just a sort of linked list in a file with a "first child position" property ;)
[09:15:08] <Servus> my brains gonna melt
[09:15:12] <ShadwChsr> :)
[09:15:18] <ShadwChsr> yeah hehehehe
[09:15:19] <Servus> im not john carmack or jonathon blow
[09:15:25] <ShadwChsr> So what did you think of my little project?
[09:15:34] <Servus> tis cool, has potential i think:-)
[09:15:42] <Yuv422> sounds like you need to watch some mind numbing TV right away!
[09:15:53] <ShadwChsr> If you join my dark side then you dont need to melt your brains, as much
[09:15:54] <ShadwChsr> ;)
[09:16:02] <Servus> im trying to figure out how the hell to make a proper binary tri tree split itself correctly
[09:16:04] <ShadwChsr> you would be a l33t god
[09:16:08] <ShadwChsr> not carmack's pet monkey
[09:16:09] <ShadwChsr> ;)
[09:16:26] <Servus> youd learn a lot being carmack's pet monkey
[09:16:30] <ShadwChsr> :)
[09:16:40] <ShadwChsr> didnt mean that as an insult just bein silly :)
[09:16:47] <Servus> i know
[09:17:09] <ShadwChsr> You could make me some 3d terrain :)
[09:18:19] <Servus> a data file or what?
[09:18:27] <ShadwChsr> nah code :)
[09:18:39] <Servus> my rendering codes currently messy
[09:18:43] <ShadwChsr> port my 2d terrain to 3d like i envision :)
[09:19:12] <ShadwChsr> Mine would be sooooo easy :)
[09:19:20] <ShadwChsr> Anyhow I'll stop hasslin ya ;)
[09:19:50] <ShadwChsr> Tomorrow I might hack away at my ray picker code, once thats working I might build a mini map editor (ie/ debug mode) to create little maps in game
[09:19:56] <ShadwChsr> before I build the full map editor
[09:20:14] <ShadwChsr> kind of like in u7's debug mode -> create object :)
[09:20:53] <Servus> well you havent shown me any 2d terrain of yours, yet
[09:21:09] <Servus> and as i understand it, your things already 3d?
[09:21:14] <ShadwChsr> yep
[09:21:16] <Servus> or are you rendering in 2d projection mode?
[09:21:25] <Servus> why not just make some random Z values for your floor and see if it works?
[09:22:00] <ShadwChsr> nah its nothing like that at all
[09:22:20] <ShadwChsr> my "3d" has no z values, they're just rectangles that exactially match the source sprite
[09:22:26] <ShadwChsr> basically rendering 2d through the 3d pipeline
[09:22:30] <Servus> well the first thing youd have to do is to ditch your floor textures
[09:22:36] <ShadwChsr> that way i get hardware accellerated alpha blending & lighting
[09:22:48] <ShadwChsr> yeah I know. Not floor textures though, ground textures
[09:22:50] <Servus> all textures are square -- your textures are black squares with painted diamonds in them :-)
[09:22:55] <Servus> floor = ground to me :-p
[09:22:55] <ShadwChsr> floors would be objects on top of the terrain
[09:22:59] <ShadwChsr> :)
[09:23:08] <Servus> in fact, youll have to ditch all your art i think
[09:23:10] <Servus> sprites != 3d
[09:23:15] <ShadwChsr> it will work
[09:23:20] <Servus> do you want the camera to move around?
[09:23:23] <ShadwChsr> ground terrain rendered in 3d, render the 2d sprites over top
[09:23:23] <ShadwChsr> no
[09:23:27] <Servus> oh ok
[09:23:37] <ShadwChsr> i just want 3d terrain like UO
[09:23:37] <Servus> well hmm
[09:23:41] <ShadwChsr> just not as.. ugly
[09:23:42] <ShadwChsr> :)
[09:23:44] <Servus> you can keep ground textures then
[09:23:57] <Servus> you can anyways, actually, it's just a bit goofy
[09:24:01] <ShadwChsr> yeah
[09:24:08] <ShadwChsr> i want to give each ground tile/cell a Z value
[09:24:12] <Servus> just a matter of setting your texture coords on each vertex to the right value
[09:24:19] <ShadwChsr> that Z value corresponds to the height of the bottom vertex of the tile
[09:24:21] <Servus> can i see the code?
[09:24:29] <ShadwChsr> which code?
[09:24:32] <ShadwChsr> all?
[09:24:45] <ShadwChsr> here ye go
[09:24:46] <ShadwChsr> :)
[09:24:48] <Servus> yeah, alls probby bette
[09:26:12] <Servus> i can nearly compile it, im just missing directx9
[09:26:22] <ShadwChsr> <nods>
[09:26:26] <Servus> i have it, its just not installed
[09:26:27] <Servus> the sdk that is
[09:26:30] <ShadwChsr> ahhh
[09:26:34] <Servus> lemme install it
[09:26:41] <ShadwChsr> sdk doesnt need to be in debug mode, install as retail mode
[09:26:46] <ShadwChsr> that way it wont hurt your game performance :)
[09:27:03] <ShadwChsr> I'll be amazed if it compiles right off the bat :)
[09:27:16] <Servus> youve got a warning for an unusued bmInfoHeader
[09:27:22] <Servus> the only errors are for dx9err.c
[09:27:28] <ShadwChsr> bmInfoHeader?
[09:27:31] <ShadwChsr> never heard of it
[09:27:36] <Servus> its in your code
[09:27:37] <Servus> BITMAPINFOHEADER
[09:27:43] <ShadwChsr> oh
[09:27:50] <Servus> should i uninstall dx8sdk first?
[09:27:54] <ShadwChsr> no
[09:28:00] <ShadwChsr> they both run fine
[09:28:10] <ShadwChsr> thats the code that generates the blue grid tile :)
[09:28:20] <ShadwChsr> (UGH that was nasty code to write! NEVER touch that code! hehehehe)
[09:28:24] <Servus> but i have the full sdk installed
[09:28:41] <ShadwChsr> if you installed dx9 its allready messed up anyhow :)
[09:28:54] <ShadwChsr> leave the headers that way you can compile dx8 apps later if you want
[09:29:01] <ShadwChsr> right? :)
[09:29:13] <ShadwChsr> dx9 is backwards compatible, you can have the old headers too
[09:29:15] <Servus> #define DIRECTX_VERSION 0x0800 if you wanna do that
[09:29:32] <ShadwChsr> yeah but you still need the old headers :)
[09:29:36] <ShadwChsr> i think
[09:30:04] <ShadwChsr> memcpy(bmpbuffer + sizeof(bmFileHeader),&bmInfo,sizeof(bmInfoHeader));
[09:30:10] <ShadwChsr> your compiler is wrong, its definately used :)
[09:30:18] <Servus> maybe its somewhere else
[09:30:24] <ShadwChsr> nah only place I use it
[09:30:30] <Servus> precisely my point
[09:30:34] <Servus> ill see later
[09:30:38] <Servus> fucking sdk
[09:30:41] <Servus> grinding my HD and not doing crap
[09:30:53] <ShadwChsr> i did a search
[09:30:58] <ShadwChsr> :)
[09:31:45] <ShadwChsr> I tried to insanely document the code
[09:31:56] <ShadwChsr> theres some classes I havent done yet, but for the most part it should be good
[09:32:09] <ShadwChsr> clean code was my #1 goal
[09:32:19] <ShadwChsr> theres a few hacks but they're all labled as such and only temporary
[09:32:24] <Servus> hhehehe
[09:32:30] <ShadwChsr> like where in game::initialize I have hardcoded object creation :)
[09:32:31] <Servus> hacks are never "only temporary"
[09:32:36] <ShadwChsr> these are
[09:32:42] <Servus> look in the Quake code and see lots of comments like // FIX ME! HACK HACK HACK!
[09:32:46] <ShadwChsr> :)
[09:32:56] <ShadwChsr> we'll see :)
[09:33:02] <ShadwChsr> Every so often I go and fix as many as I can :)
[09:34:25] <ShadwChsr> hmmmm
[09:35:28] <ShadwChsr> there's one leak in the app
[09:35:34] <ShadwChsr> see if you can find it ;) hehehe easter egg hunt
[09:35:35] <ShadwChsr> :)
[09:35:37] <Servus> ko
[09:35:38] <Servus> ok
[09:35:41] <Servus> still installing dx9
[09:35:44] <ShadwChsr> ahhh
[09:35:47] <ShadwChsr> it takes awhile :(
[09:36:03] <ShadwChsr> hmmm
[09:36:26] <Servus> yeah it does
[09:36:51] <ShadwChsr> This is not 100% accurate anymore but still pretty much the same idea
[09:37:15] <ShadwChsr> actually, it is accurate :)
[09:38:04] <Servus> please tell me when you say "passes CurrentMap to World->Render" you just mean a pointer :-)
[09:38:11] <ShadwChsr> yes :)
[09:38:16] <ShadwChsr> I modified that slightly since
[09:38:27] <ShadwChsr> Map inherits the "isoregion" class
[09:38:35] <ShadwChsr> technically it passes a pointer to an isoregion
[09:38:56] <ShadwChsr> an entity's position in the game world is defined by 4 things
[09:38:57] <Servus> ok, as long as you dont have redundancy on a major scale being reiterated every frame :)
[09:39:05] <Servus> x,y,z,rot?
[09:39:05] <ShadwChsr> X,Y,Z coordinates in the map, and the map (iso region) it's in
[09:39:11] <Servus> ah
[09:39:50] <ShadwChsr> the camera has 3 pieces of info: the map it's "on" (even if it renders more than one, like near an edge), and the offset (int) from the 0x0 position of that map
[09:40:00] <Servus> ok now i can START installing dx9sdk
[09:40:05] <ShadwChsr> seemless world rendering isn't done, trying to get a single map happy first :)
[09:40:22] <ShadwChsr> just have a little bit of the framework in place so i dont need to reprogram the entire game later ;)
[09:41:11] <ShadwChsr> the app entry point is in Win32.cpp
[09:41:32] <ShadwChsr> Win32.cpp creates the window and then creates the Game singleton object, which basically runs everything
[09:41:50] <Servus> i intend to have my entire main map as a single map
[09:41:52] <ShadwChsr> in Win32.cpp is the main app/window loop, which calls Game::GameLoop as much as possible
[09:42:30] <ShadwChsr> the renderer (direct3d) code is abstracted into a DLL
[09:42:33] <Servus> im hungry, gonna get food while i install dx9sdk
[09:42:37] <ShadwChsr> so theoretically you could write a directdraw, opengl,e tc one
[09:42:41] <Servus> ja
[09:42:43] <ShadwChsr> i might go to bed
[09:42:46] <Servus> oh ok
[09:42:46] <ShadwChsr> its 1:42am :)
[09:42:48] <Servus> same here
[09:42:50] <Servus> los angeles
[09:42:55] <ShadwChsr> ahhh vancouver, BC here
[09:43:02] <Yuv422> 8:40pm here :)
[09:43:17] <Servus> heh, where in the world are you?
[09:43:21] <Yuv422> australia
[09:43:23] <Servus> britain is 9:43am, are you in the ocean?
[09:43:30] <Servus> oh, silly me confusing am/pm:-)
[09:43:37] <Yuv422> :)
[09:44:04] <ShadwChsr> You going to be on tomorrow Servus?
[09:44:06] <Servus> well ive got a lot of stuff to write down before i go to sleep, or i wont remember it as well
[09:44:11] <Servus> yes shadw
[09:44:16] <ShadwChsr> ok
[09:44:34] <ShadwChsr> if you hack around the code at all I'd definately be interested in what you think of the code design
[09:44:36] <Servus> im gonna redesign my entire map rendering setup to use binary trees and optimizations, it's gonna be "wicked" :_)
[09:44:38] <ShadwChsr> especially since I "winged" it ;)
[09:45:05] <ShadwChsr> cool :)
[09:45:17] <ShadwChsr> You'd probably have a seizure when you see my vertex buffer code ;)
[09:45:30] <Servus> the layout looks similar to mine
[09:45:41] <Servus> except i put a LOT of green before each function, just so that ican tell them apart :-)
[09:46:01] <ShadwChsr> Instead of a new vertex buffer for every sprite it's rendering, it determines the sprite's dimensions and looks for the vertex buffer with those dimensions in a cache ;)
[09:46:11] <ShadwChsr> then transforms it in 2d space to the proper position, and sets the texture :)
[09:46:28] <ShadwChsr> in the header or the CPP you mean?
[09:46:33] <Servus> cpp
[09:46:39] <Servus> i wouldnt recommend a vertex buffer for a sprite
[09:46:42] <ShadwChsr> ahhh I dont worry so much
[09:46:56] <ShadwChsr> I dont really have a choice, unless I'm missin something ;)
[09:46:59] <Servus> sprites are always just quads -- make the vertexes programatically
[09:47:06] <ShadwChsr> I am
[09:47:11] <ShadwChsr> and storing them in a VB afterwards :)
[09:47:11] <Servus> you can feed it vertex one by one as a function:P
[09:47:33] <ShadwChsr> I'm using DrawPrimitive, sending it a triangle list
[09:48:29] <Servus> yeah im not sure how to do it on direct3d, but on opengl you just glBegin( GL_TRIANGLE_LIST ); glVertex( 0, 0, 0 ); glVertex ( 1, 1, 1 ); glVertex( 2, 2, 2 ); glEnd();
[09:48:55] <Servus> which is actually a line :-p
[09:50:07] <ShadwChsr> well, I'm caching the FVFs not the VBs(?)
[09:50:40] <Servus> im not sure how to do it in direct3d, ill find out later ,dont worry bout it
[09:50:43] <ShadwChsr> ah no i'm write
[09:50:45] <ShadwChsr> right
[09:50:49] <ShadwChsr> hr = D3DDevice->SetStreamSource(0, tmpVB, 0, sizeof(RectVertex));
[09:50:56] <ShadwChsr> streamsource wants a vertex buffer
[09:51:02] <ShadwChsr> thats how you tell it where to get the vertex data
[09:51:16] <Servus> yeppers, but theres more than one way to remove a feline of its clothing
[09:51:25] <Servus> s/remove/deprive
[09:51:43] <ShadwChsr> yeah
[09:51:48] <ShadwChsr> I'll muck with that code later
[09:52:12] <ShadwChsr> Want to get a walkable world going :)
[09:52:13] * DarkeZzz blinkblinks and misparses the "removing feline of it's clothing". Let's not go there, shall we?
[09:52:16] <ShadwChsr> with collision detection and buildings, etc
[09:52:46] <ShadwChsr> It wasn't a parsing error, it was an AI error :)
[09:53:00] <ShadwChsr> I /kind of/ understand what he means ;)
[09:53:03] <Servus> killing kittens isnt easy, and if the thought makes you feel queasy... grab a pitchfork from the shed... and kill a puppy instead!
[09:53:35] <Servus> ive gotta restart my computer for dx9 (evil!)
[09:53:39] <ShadwChsr> yep
[09:53:42] <ShadwChsr> see ya tomorrow
[09:53:45] <Servus> and i dont really support killing kittens or cats
[09:53:46] <ShadwChsr> bedtime for moi
[09:53:48] <Servus> ill brb in 1 min if u want
[09:53:52] <ShadwChsr> k
[09:53:52] <Servus> your program compiles
[09:54:00] <ShadwChsr> it does?
[09:54:02] <ShadwChsr> :)
[09:54:03] <Servus> yep
[09:54:05] <Servus> cant link it yet tho
[09:54:10] <ShadwChsr> ahhh
[09:54:11] <Servus> brb, bye if you leave
[09:54:12] <ShadwChsr> reboot away!
[09:54:15] <-- Servus has left IRC ()
[09:54:20] <ShadwChsr> curious to see if it compiles in v6 :)
[09:54:44] * DarkeZzz snickers.
[09:56:48] --> Servus has joined #exult
[09:57:16] <ShadwChsr> wb
[09:57:19] <Servus> ty
[09:57:43] <Servus> 28 linking errors
[09:57:48] <ShadwChsr> what were they?
[09:58:11] <Servus> probably cuz you didnt give me the d3d renderer project
[09:58:14] <Servus> and the workspace wants it
[09:58:43] <ShadwChsr> oh :)
[09:58:44] <Servus> public: void __thiscall IsoRegion::TileToDisplayCoords(long,long,class Point3D const &,long &,long &)" (?TileToDisplayCoords@IsoRegion@@QAEXJJABVPoint3D@@AAJ1@Z) is one
[09:59:26] <ShadwChsr> weird
[09:59:38] <ShadwChsr> the renderer shouldnt stop it from compiling
[09:59:42] <Servus> i dont see that class anywhere
[09:59:51] <ShadwChsr> iso.h
[10:00:17] <Servus> i dont have that
[10:00:30] <Servus> oh ido
[10:00:35] <Servus> its in external dependencies, tsk tsk
[10:00:50] <ShadwChsr> it is
[10:00:51] <ShadwChsr> ?
[10:01:14] <Servus> maybe its cuz were in different ides
[10:01:22] <ShadwChsr> yeah
[10:01:34] <ShadwChsr> you dont have the vc6 project files
[10:02:06] <ShadwChsr> just add all the source and H files in to the IDE
[10:02:12] <ShadwChsr> into the project i mean
[10:03:48] <ShadwChsr> here's the dll source
[10:04:37] <Servus> nah i shouldnt need iut
[10:04:54] <ShadwChsr> yeah, but if you want to see my d3d code you will :)
[10:05:54] <Servus> tell ya what
[10:05:57] <Servus> ill have .net installed soon
[10:06:06] <ShadwChsr> do you have MSDN?
[10:06:16] <ShadwChsr> as in, MSDN Universal?
[10:06:20] <Servus> i believe so
[10:06:24] <Servus> i have msdn for sure
[10:06:33] <ShadwChsr> I really, really, really need the Visual Studio .NET 2003 final beta
[10:06:41] <ShadwChsr> I cant do any sort of map editor until I have that form designer :(
[10:06:45] <Servus> why install a beta?
[10:06:49] <ShadwChsr> Since it will really speed up the process
[10:06:51] <Servus> use VB >:-)
[10:06:54] <ShadwChsr> MFC and raw API is awfull
[10:07:07] <ShadwChsr> Well I'd use C# except it needs to compile the actual game sources
[10:07:10] <Servus> or QB >:-)
[10:07:19] <ShadwChsr> it's going to "host" the game class and use the game itself
[10:07:27] <ShadwChsr> it will just wrap it in a UI for object placement
[10:07:37] <ShadwChsr> kind of like how the warcraft 3 editor works
[10:07:51] <ShadwChsr> Im not going to rewrite the game as C#, and MFC is.. evil
[10:07:52] <ShadwChsr> :)
[10:08:09] <ShadwChsr> They just arent selling beta cds anymore and I dont have universal :(
[10:08:22] <ShadwChsr> ah well
[10:08:42] <ShadwChsr> Maybe my hack in game object creator will tide me over :)
[10:09:50] <Servus> hmm
[10:10:09] <Servus> try the dx3dintersect function
[10:10:13] <Servus> and the code i gave you :)
[10:10:38] <ShadwChsr> The code you gave me is almost exactially from the directx samples :)
[10:10:42] <ShadwChsr> I looked at that too
[10:10:47] <ShadwChsr> I have various little pieces of code now
[10:10:55] <ShadwChsr> maybe I can hack something together later :P
[10:11:05] <ShadwChsr> the only thing i'm having trouble with is the angle of "Z"
[10:11:12] <ShadwChsr> since its not straight down, Z is at an angle
[10:11:15] <ShadwChsr> 30 degrees?
[10:11:17] <Servus> make it full-3d then
[10:11:24] <ShadwChsr> i dont know how to calculate it without guessing
[10:11:31] <ShadwChsr> full 3d is way over my head
[10:11:31] <Servus> ok lemme calculate it
[10:11:44] <ShadwChsr> I want a project i might be able to finish :)
[10:11:48] <ShadwChsr> k
[10:11:53] <Servus> considering the blue tiles are square, take the ratio between their width and height
[10:11:58] <Servus> on the screen
[10:12:04] <ShadwChsr> that will give you Z?
[10:12:15] <ShadwChsr> I have the ratio, look in settings.cpp
[10:12:17] <Servus> 70/36 right?
[10:12:36] <ShadwChsr> IsoAngle = atan(((double)TileSizeY / 2) / (((double)TileSizeX+2) / 2));
[10:12:39] <ShadwChsr> well, i used to
[10:12:52] <ShadwChsr> I only used it to determine the angle so i tossed it directly into it
[10:12:53] <Servus> if you were looking straight down, the squares would be at a ratio of 1:1
[10:13:00] <ShadwChsr> good point :)
[10:13:08] <Servus> if you were looking directly lateral to the tiles, they would be at a ratio of 0:1 (paper thin, invisible)
[10:13:23] <ShadwChsr> so is that angle i'm calculating the same as the Z angle?
[10:13:31] <Servus> almost
[10:13:36] <ShadwChsr> whats different?
[10:13:36] <Servus> whats the tile width again?
[10:13:39] <Servus> 70x36?
[10:13:42] <ShadwChsr> TileSizeX
[10:13:43] <ShadwChsr> yeah
[10:13:55] <ShadwChsr> you do the +2 because it's padded by a single pixel on each side
[10:14:13] <-- Servus has left #exult ()
[10:14:17] --> Servus has joined #exult
[10:14:36] <ShadwChsr> the 2 pixel space between tiles is where the bottom & top of other tiles go
[10:14:41] <ShadwChsr> hence the +2 you see there
[10:14:49] <Servus> when angle = 0, ratio = 1:1, when angle = 90, ratio = 0 : 1
[10:15:11] <Servus> our ratio is .51 : 1, so it's at a near-45' angle
[10:15:19] --> wjp has joined #exult
[10:15:19] --- ChanServ gives channel operator status to wjp
[10:15:27] <Servus> hlowjp
[10:15:33] <wjp> hlosrvs
[10:15:47] <ShadwChsr> atan is the same as "tan-1" (the -1 being superscript), right?
[10:15:58] <Servus> youre facing straight forward, then you look down 46 degrees
[10:16:06] <Servus> i think so :-)
[10:16:13] <wjp> 'kind of'... :-)
[10:16:24] <ShadwChsr> well, how do i punch in "atan" on my graphic calc? :)
[10:16:28] <Servus> i dont have a scientific calc in front of me
[10:16:31] <ShadwChsr> its been awhile ;P
[10:16:38] <Servus> what calc?
[10:16:43] <ShadwChsr> ti-85
[10:16:48] <Servus> didnt know they made those:P
[10:18:50] <ShadwChsr> yeah its 27.2 degrees
[10:18:53] <ShadwChsr> thats the angle
[10:19:05] <ShadwChsr> so is that the angle at which Z is above the ground?
[10:19:18] <ShadwChsr> i dont know the technical mathy/3d term for that
[10:19:19] <ShadwChsr> ;)
[10:19:19] <Servus> 27.2? are you sure?
[10:19:33] <Servus> 0' is looking straight-forwad
[10:19:45] <ShadwChsr> 62? is that better?
[10:19:45] <Servus> 90' is looking straight-down
[10:19:55] <Servus> id say .51*90 = 46
[10:20:00] <ShadwChsr> atan(70/36) = 62
[10:20:06] <Servus> why you atan?
[10:20:06] <ShadwChsr> atan(36/70) = 27
[10:20:35] <ShadwChsr> well, draw out an isometric dimond in a rectangle
[10:20:36] <Servus> tan ( opposite / adjacent )...
[10:20:40] <ShadwChsr> take the lower right quardrent
[10:20:50] <ShadwChsr> you get a right angle triangle
[10:21:08] <ShadwChsr> two sides: adjacent being 70/2, opposite being 36/2
[10:21:11] <Servus> but you have no idea how heigh the camera is
[10:21:30] <ShadwChsr> of course, since you're doing 70/2 / 36/2, you can remove the /2's, get atan(70/36)
[10:21:33] <ShadwChsr> yeah I know
[10:21:35] <ShadwChsr> :)
[10:21:37] <ShadwChsr> ideas? :)
[10:21:54] <Servus> tan ( ground length from camera / height of camera ) = angle of viewing
[10:21:57] <ShadwChsr> that gives me the angle of the isometric, the skew I guess (makin this up as i go ;)
[10:22:03] <Servus> dont use trig at all, the angle is 46'
[10:22:12] <ShadwChsr> how the heck do you know that? :)
[10:22:44] <ShadwChsr> hmm *rereads
[10:22:45] <Servus> wait what were the tile widths/heights again?
[10:22:58] <ShadwChsr> 70x36
[10:22:58] <wjp> isn't that atan(height/ground length) = angle?
[10:23:11] <Servus> 36/70 = .51, so (36/70)*90 = 46.2857
[10:23:22] <ShadwChsr> thank you :)
[10:23:24] <Servus> no
[10:23:35] <ShadwChsr> no?
[10:23:46] <ShadwChsr> oh that was to wjp
[10:23:49] <ShadwChsr> ugh brain shutting down
[10:23:50] <Servus> tan ( opposite = adjacent ) and we are looking for the angle in the top-corner of this right triangle, so the opposite is the floor and the adjacent is height
[10:24:02] <ShadwChsr> What should I call this angle? thats the 3d term for it?
[10:24:11] <ShadwChsr> declination? some word like that :)
[10:24:26] <Servus> m_CamRot.z? :-p
[10:24:35] <wjp> anyway, the tan/atan thing is still wrong
[10:24:41] <Servus> actually it'd be some sort of gimbly x/y configuration
[10:24:44] <ShadwChsr> well there's 3 terms
[10:24:47] <Servus> dont use tan or atan at all
[10:24:48] <ShadwChsr> skew, pitch, yaw?
[10:24:53] <wjp> you can't take a tan of a number; only of an angle
[10:24:56] <Servus> roll/pitch/yaw, yep same thing
[10:25:03] <ShadwChsr> ahhh 2/3 not bad ;)
[10:25:10] <ShadwChsr> I guess calling it pitch isn't accurate
[10:25:18] <Servus> those are airplane terms :-)
[10:25:20] <ShadwChsr> or is it? CameraPitchZ?
[10:25:25] <ShadwChsr> i've seen them used with 3d apps too :)
[10:25:30] <Servus> whatever you wanna use
[10:25:36] <Servus> i for one just used x,y,z for them :-p
[10:25:39] <ShadwChsr> yeah but I dont know ;)
[10:25:50] <ShadwChsr> If i call it something like AngleZ im going to get confused in a month :)
[10:25:57] <Servus> heh
[10:26:13] <wjp> draw a nice ascii-art picture in the comments to illustrate :-)
[10:26:17] <ShadwChsr> :)
[10:26:39] <Servus> i thought i already showed that the angle is 46':-p
[10:26:49] <Servus> without trig at all!
[10:26:52] <ShadwChsr> thanks :)
[10:26:54] <ShadwChsr> Tres cool
[10:27:13] <ShadwChsr> thats why I hang out in this channel, I knew eventually I'd get some freekin cool piece of info like that :)
[10:27:18] <Servus> or maybe it's 44', depending how you look at it, id just use 45' :-)
[10:27:28] <Servus> i bet it was designed to be 45'
[10:27:44] <Servus> using tile widths of 35,70, it is 45'...
[10:27:57] <wjp> hm, replacing an atan by a simple multiplication? that sounds fishy
[10:28:05] <ShadwChsr> my atan was wrong
[10:28:08] <ShadwChsr> i just made it up
[10:28:08] <ShadwChsr> ;)
[10:28:19] <wjp> what are you trying to calculate, anyway? :-)
[10:28:23] <ShadwChsr> servus sounds right, 45 degrees sounds like a nice little number
[10:28:28] <ShadwChsr> the.. uh.. z angle
[10:28:30] <ShadwChsr> hehehe :)
[10:28:39] <ShadwChsr> The angle the camera is looking down at the 2d isometric sprites
[10:28:40] <Servus> ok wjp youve got a picture of a grid taken from an unmoving camera position
[10:28:49] <Servus> so find out camera angle :-)
[10:28:57] <wjp> a rectangular grid?
[10:29:03] <wjp> or square?
[10:29:33] <ShadwChsr> Servus.. I got it ;)
[10:29:36] <Servus> http://4.60.125.19/images/misc/Axis.jpg this pic
[10:29:46] <ShadwChsr> we're not compensating for the 2 blank pixels (padding)
[10:29:56] <ShadwChsr> 36/70+2 = 0.5
[10:30:02] <ShadwChsr> 0.5*90 = 45
[10:30:02] <ShadwChsr> :)
[10:30:03] <Servus> yea
[10:30:44] <ShadwChsr> awesome :) Not only did you figure out the angle, it can be computed in code! :)
[10:30:58] <Servus> once you take it to full 3d, you wont even have to worry about rendering in order
[10:31:08] <Servus> the 3d card will make sure things are rendered in the right order
[10:31:17] <ShadwChsr> yeah
[10:31:34] <ShadwChsr> this is different though, this is so I can create the pickray from the mouse cursor at the right angle
[10:31:41] <ShadwChsr> ie/ translate from view space to world space
[10:31:44] <ShadwChsr> need that angle :)
[10:31:59] <Servus> for the algorithm i gave you?
[10:32:26] <ShadwChsr> yeah
[10:32:28] <ShadwChsr> anyhow, nite :)
[10:32:34] <ShadwChsr> thanks!
[10:32:41] <-- ShadwChsr has left IRC (Read error: 104 (Connection reset by peer))
[10:32:42] <Servus> night
[10:33:01] <Servus> wjp do you know anything about complex binary space partitions used for triangle nodetrees? :-)
[10:35:10] <Servus> guess not right now, 'ta :-)
[10:35:11] <-- Servus has left IRC ()
[12:09:14] --> Dark-Star has joined #exult
[12:18:13] <-- Yuv422 has left IRC ("BitchX: shaken, not stirred")
[12:31:21] <-- Dark-Star has left IRC ("Leaving")
[12:59:51] --> Colourless has joined #Exult
[12:59:56] --- ChanServ gives channel operator status to Colourless
[13:00:16] <Colourless> hi
[13:00:31] <wjp> hi here too :-)
[13:00:36] * Colourless wishes to notify any persons who may come into this channel that he will not act as developer support for Direct3D :-)
[13:00:44] <wjp> :-)
[13:06:23] <Colourless> just because I have used and written Direct3D applications from the mundane and useless, to applications of such a technical nature you need to understand the basic mechanics of how 3d accelerators work, doesn't matter...
[13:31:28] <wjp> that angle stuff from earlier was probably quite wrong
[13:32:12] <Colourless> can't say i read through it... so much text...
[13:32:22] <wjp> this was from the point where I walked in
[13:32:34] <wjp> I didn't read the logs either :-)
[13:33:12] <wjp> Servus' reasoning: an angle is 0 for a quotient of 0, and 90 for a quotient of 1, so it must be 45 for a quotient of 1/2
[13:33:25] <wjp> (see logs for which quotient/angle exactly)
[13:33:41] <Colourless> it's not
[13:33:45] <wjp> however, it should be an arccos
[13:33:57] <Colourless> yeah
[13:34:03] <Colourless> not tan
[13:34:09] <Colourless> rotations are done with sin and cos
[13:34:54] <Colourless> 30 degrees give you a quotient of 1/2
[13:35:30] <wjp> depending on which angle you take exactly, I guess
[13:35:37] <wjp> my 60 is 'the other one' :-)
[13:35:50] <wjp> (I really don't know about conventions for this :-) )
[13:36:30] <Colourless> tranformations in 3d (rotation, translation, scaling, etc) are all done with a 4x4 matrix that is multiplied to a 4x1 'vertex' (4th coord is w and is always 1)
[13:36:48] <wjp> hm, projective?
[13:36:58] <wjp> (i.e., with homogeneous coords?)
[13:37:19] <Colourless> projection is done using a divide by the homogeneous w
[13:37:51] <wjp> I meant: so you're working in a projective space?
[13:38:21] <wjp> come to think of it... is that the right translation for the dutch "projectieve ruimte"...
[13:39:29] <wjp> my perspective on 3d engines purely mathematical... I don't have any real experience with them. I guess that can lead to some interesting miscommunications :-)
[13:39:40] <wjp> s/purely/is purely/
[13:40:08] <Colourless> well, mathmatics is pretty much all that's too do with it
[13:41:15] <wjp> true, but it's applied math... quite different from knowing the theory behind it :-)
[13:41:31] <Colourless> that is true
[13:53:10] <Colourless> btw, here is just a screencapture of the matrix rotations page from the d3d sdk
[13:53:11] <Colourless> http://www.users.on.net/triforce/rotations.png
[14:08:09] <-- Kirben has left IRC (Read error: 104 (Connection reset by peer))
[14:51:09] <-- DarkeZzz has left IRC (capek.freenode.net irc.freenode.net)
[15:03:24] --> Dark-Star has joined #exult
[15:12:26] <-- Colourless has left IRC ("casts invisibility")
[15:12:31] --> DarkeZzz has joined #exult
[15:28:11] --> armav has joined #exult
[15:36:50] <-- armav has left IRC ("Client Exiting")
[15:50:13] <-- Dark-Star has left IRC ("Leaving")
[16:02:53] <-- wjp has left IRC ("bbl")
[17:33:27] --> Rixa has joined #exult
[17:33:36] <-- Rixa has left IRC (Read error: 104 (Connection reset by peer))
[18:47:29] --> wjp has joined #exult
[18:47:29] --- ChanServ gives channel operator status to wjp
[19:03:53] <-- DarkeZzz has left IRC (Read error: 110 (Connection timed out))
[19:09:01] --> armav has joined #exult
[19:20:56] <-- armav has left IRC ("Client Exiting")
[19:32:29] --> ShadwChsr has joined #exult
[19:33:09] <wjp> hi
[19:33:54] <wjp> to quickly follow-up on this morning's/last night's angle stuff: you need an arcsin, not a simple multiplication by 90
[19:34:22] <wjp> so camera angle is 30 if the y/x ratio is 1/2
[19:38:27] <ShadwChsr> oh, so its not 45? :)
[19:38:57] <ShadwChsr> thanks :)
[19:39:03] <ShadwChsr> 30 was the magic number I had heard before
[19:45:08] <ShadwChsr> hmm weird
[19:45:38] <ShadwChsr> sin-1(0.5) on the calculator gives me "30", but asin(0.5) in c++ gives me 0.523..
[19:46:07] <wjp> same thing
[19:46:32] <wjp> your calc. is set to degrees; C++ returns the angle in radians
[19:46:53] <ShadwChsr> <hits forehead> duh :)
[19:47:35] <wjp> one thing to look out for when using arcsin/arccos/arctan: the result will always be in a fixed range, while they're actually multi-valued functions
[19:48:00] * ShadwChsr nods
[19:48:20] <ShadwChsr> I had weird math dreams all night long
[19:48:24] <ShadwChsr> hehehehehe
[19:48:34] <wjp> excellent :-)
[19:48:52] <ShadwChsr> I have another question for you - how do I determine the size of an isometric tile in world space?
[19:49:10] <ShadwChsr> in world space all 4 "sides" of the tile have the same length (ie/ it's square due to the rotated axis)
[19:49:26] <ShadwChsr> I hae some code but I think it's wrong
[19:51:10] <wjp> hm, in which unit?
[19:51:40] <ShadwChsr> thats where I'm kind of confused ;)
[19:52:01] <wjp> I guess you can just call the length of the sides 1
[19:52:08] <ShadwChsr> thats what I did, in world space
[19:52:15] <ShadwChsr> and it's floating point, so i can define halfway between tiles, etc
[19:52:37] <ShadwChsr> i use the "side" calculation from pixels to do my pixel->tile coordiante conversion
[19:53:11] <wjp> side calculation?
[19:53:43] <ShadwChsr> Point3D tmpPoint = Transform3D::XYAxisRotateOrigin(-IsoAngle, Point3D(HalfTileSizeX, HalfTileSizeY, 0));
[19:53:43] <ShadwChsr> IsoTileLength = tmpPoint.GetX();
[19:54:02] <ShadwChsr> it's ugly, evil and i'm pretty sure just plain wrong ;)
[19:54:04] <wjp> it should just be a couple of multiplications and additions
[19:54:42] <ShadwChsr> What i'm doing is rotating "pixel axis" into "world/iso axis", to determine what the length of the isometric tile is, in the rotated axis, in pixels
[19:54:43] <ShadwChsr> ;P
[19:55:07] <ShadwChsr> Supposedly when i want to convert from pixel->tile coordinates, i rotate the pixel coordinates, divide by the "length" i calculated earlier
[19:55:12] <ShadwChsr> but it just seems weird and wrong
[19:55:13] <ShadwChsr> :)
[19:55:22] <wjp> I don't get it, in any case :-)
[19:55:43] <ShadwChsr> I need two things, that are either wrong or weird right now ;)
[19:56:02] <ShadwChsr> One is pixel->tile coordinate conversion (this point on the screen = this tile, not taking Z into consideration)
[19:56:18] <ShadwChsr> the other is I need to know how many pixels to move for every "1" of Z
[19:56:30] <ShadwChsr> as in.... ScreenYPosition =- Z * SomeValue
[19:56:52] * wjp gets some graphing paper and starts drawing pretty pictures
[19:57:14] <ShadwChsr> originally I just had z = # of pixels, but I recently converted it into world space (1.0=1 tile), but the Z coordinate doesn't have tiles ;)
[19:57:21] <wjp> doing some actual applied math for a change should be good for me :-)
[19:57:27] <ShadwChsr> :)
[19:57:45] * wjp tends to only do the theoretical abstract kind of mathematics :-)
[19:58:10] <ShadwChsr> scary stuff :)
[19:58:22] <ShadwChsr> today I get to do the tax kind of mathematics ;)
[19:58:37] <wjp> :-)
[19:58:48] <wjp> that's the voodoo kind :-)
[20:00:32] <wjp> let's see... if z is the change in z-coord, and p is the on-screen change
[20:00:37] <wjp> and alpha the camera angle,
[20:00:59] <ShadwChsr> don't forget there's multiple camera angles :)
[20:01:01] <wjp> then: cos(alpha) = p/z
[20:01:28] <wjp> (so p = z * cos(alpha))
[20:02:02] <wjp> and cos(alpha) = sqrt(3)/2 if alpha=30deg
[20:02:26] <ShadwChsr> so cos(alpha) is the "Z" length, in pixels? :)
[20:03:24] <ShadwChsr> still something missing though, not sure what
[20:04:17] <ShadwChsr> your not taking into account the size of the tile, ie/ what X = 1.0 is in pixels
[20:04:45] <wjp> yeah, I know. I was kind of expecting you to :-)
[20:05:23] <ShadwChsr> Not sure how to do that ;) Do I take the real distance? rotate it into world space and take the distance?
[20:05:38] <ShadwChsr> I'm not very good at advanced math, apparently ;P
[20:05:41] <wjp> well, it's just a fixed constant
[20:06:09] <ShadwChsr> I calculate most of my constants at runtime when the app starts, that way I can dynamically change the tile size later
[20:07:35] <wjp> your tile size was 72x36, right?
[20:07:59] <wjp> so if the tile is a diamond, the pixel distance between the left/right points is 72, and between the top/bottom points 36?
[20:08:37] <wjp> so, the "1" in world coords would be 72/sqrt(2)
[20:08:54] <wjp> pixels, that is
[20:17:10] * wjp draws box in xfig with the specified dimensions to see if it looks right
[20:17:29] <wjp> and luckily it does :-)
[20:19:42] <wjp> to summarize: 1 Z corresponds to 'tile width' * sqrt(6) / 4 pixels
[20:19:47] <wjp> if alpha = 30
[20:20:18] <wjp> 'tile width' * cos(alpha) / sqrt(2) pixels in general
[20:46:15] <ShadwChsr> how did you get the sqrt(2)?
[20:46:42] <wjp> that's the diagonal of a square with sides 1
[20:46:50] <ShadwChsr> ahhh
[20:47:07] <wjp> and since the diagonal (from the left to the right point of the diamond) is the only non-distorted line, I'm using that one
[20:47:40] <ShadwChsr> so... 70 * cos(30) / sqrt(2) * ZCoordinate = amount to subtract from "screen Y" when rendering
[20:48:20] <ShadwChsr> it's weird.. 70 is the actual width, yet when placed on the screen it had a padding of 1 on each side
[20:48:24] <wjp> if tile width = 70, camera angle = 30, yes
[20:48:25] <ShadwChsr> so you get 72
[20:48:57] <wjp> you get about 43
[20:48:58] <ShadwChsr> to calculate the camera angle perfectly at 30 degrees I used 72, but im not sure if I should use 70 or 72 for this one :)
[20:49:00] <wjp> (43 * z coord)
[20:49:37] <wjp> it shouldn't matter much
[20:49:53] * ShadwChsr nods
[20:50:27] <ShadwChsr> 72 is for calculating the slope, i'll use 70 for everything else
[20:51:00] <ShadwChsr> What do you think the proper terminology for the length?
[20:51:08] <wjp> no idea :-)
[20:51:08] <ShadwChsr> as in the 70 / sqrt(2) line
[20:51:18] <ShadwChsr> I just call it "isolength" but that seems wrong :)
[20:51:39] <wjp> well, it's the length in pixels of the side of the grid square... soo... uhh...
[20:51:53] <wjp> gridpixelsize?
[20:52:05] <wjp> dunno, really :-)
[20:52:40] <ShadwChsr> In any event, if you remove the "camera" from the scene, it gets you size, in pixels, of the original cube
[20:52:43] <ShadwChsr> Am I correct? :)
[20:52:46] <ShadwChsr> or is it something else?
[20:52:57] <wjp> that's it, yes
[20:53:21] <wjp> if the camera would be right above the scene, that's how big the square would be
[20:53:32] * ShadwChsr nods
[20:54:00] <ShadwChsr> how about "IsoLengthPixels"? :)
[20:54:28] <ShadwChsr> or maybe IsoLengthScreen; // "original" length of the isometric tile in screen (pixel coordinates)
[20:55:13] <ShadwChsr> Maybe IsoTileSize :)
[20:55:18] <wjp> whichever you prefer :-)
[20:55:31] <ShadwChsr> You're supposed to say "ooo that one makes more sense than the others"
[20:55:33] <ShadwChsr> hehehe ;)
[20:55:43] <ShadwChsr> SomeWeirdValue; it is! :)
[20:56:10] <ShadwChsr> I think I'll just call it IsoTileSize, then change my TileSizeX TileSizeY (size of the source image) to something else
[21:02:29] --> Dark-Star has joined #exult
[22:03:51] <wjp> I have to go; night
[22:03:57] <-- wjp has left IRC ("Zzzz...")
[23:00:15] <-- ShadwChsr has left IRC ()