Inventory System, Castles, Replication
by Thomas "elfprince13" Dickerson · 11/03/2009 (9:09 am) · 3 comments
Brick Inventory:

And toggled for items/weapons:

My original plan for this inventory was to have something along the lines of the live 3d preview that I'm using in the play selection menu. My immediate next thought was that I'd really prefer not to have to have that much for something that really doesn't need to be rotated or interacted with at all from a client perspective and is only going to be displaying one .dts at a time, from a fixed viewpoint. I was digging around in the ts rendering code, trying to figure out the best way to take a picture of a shape and save it to a file that I could use as a texture for a GuiBitmapCtrl when I discovered TSShapeInstance::snapshot and pretty quickly decided against reinventing the wheel. Instead, I made a new class called GuiDTSSnapshotCtrl, which basically mimics everything that GuiBitmapCtrl does, but instead takes values for shapeFile and skin which it uses, oddly enough, to specify which dts file should be loaded as a TSShapeInstance and what skin to load on it before calling snapshot, and using that as a texture directly. I've posted this class a resource.
When in the brick inventory (toggle between the two with, of all things, "i"), the keys 1-0 each represent one of the brick categories, and pressing one will select that as the active category (the one which is previewed in the center region). Scrolling with your mousewheel/touchpad or repeatedly pressing the corresponding category key will scroll through in slideshow fashion, with the center preview brick representing the current selection. The selected category is denoted with a black underline, which fades towards the center.
I've also been working on the map, based on the classic Lego Dragon Masters theme, which I posted about here, and work is progressing surely but slowly (taking second place to academics + actual programming of game functionality), but I've constructed about 30% of the first of the two bases. Right now I'm working on animations for the gates, portcullis, the dungeon door, and a couple other doors (the base is a mix of a single .dif interior and well scaled .dts components for the oooh-shinies). I realized that I won't be able to use dts/dsq animation sequences for the gates because of issues with collision-meshiness, so I'll be re-exporting it from Milkshape in individual components and animating via scripted rotations. I'm still having issues with the timing of client-side foliage and shape replication making up the forest between the two bases, as described here.
Feedback, and leads on any of these issues is of course appreciated.

And toggled for items/weapons:

My original plan for this inventory was to have something along the lines of the live 3d preview that I'm using in the play selection menu. My immediate next thought was that I'd really prefer not to have to have that much for something that really doesn't need to be rotated or interacted with at all from a client perspective and is only going to be displaying one .dts at a time, from a fixed viewpoint. I was digging around in the ts rendering code, trying to figure out the best way to take a picture of a shape and save it to a file that I could use as a texture for a GuiBitmapCtrl when I discovered TSShapeInstance::snapshot and pretty quickly decided against reinventing the wheel. Instead, I made a new class called GuiDTSSnapshotCtrl, which basically mimics everything that GuiBitmapCtrl does, but instead takes values for shapeFile and skin which it uses, oddly enough, to specify which dts file should be loaded as a TSShapeInstance and what skin to load on it before calling snapshot, and using that as a texture directly. I've posted this class a resource.
When in the brick inventory (toggle between the two with, of all things, "i"), the keys 1-0 each represent one of the brick categories, and pressing one will select that as the active category (the one which is previewed in the center region). Scrolling with your mousewheel/touchpad or repeatedly pressing the corresponding category key will scroll through in slideshow fashion, with the center preview brick representing the current selection. The selected category is denoted with a black underline, which fades towards the center.
I've also been working on the map, based on the classic Lego Dragon Masters theme, which I posted about here, and work is progressing surely but slowly (taking second place to academics + actual programming of game functionality), but I've constructed about 30% of the first of the two bases. Right now I'm working on animations for the gates, portcullis, the dungeon door, and a couple other doors (the base is a mix of a single .dif interior and well scaled .dts components for the oooh-shinies). I realized that I won't be able to use dts/dsq animation sequences for the gates because of issues with collision-meshiness, so I'll be re-exporting it from Milkshape in individual components and animating via scripted rotations. I'm still having issues with the timing of client-side foliage and shape replication making up the forest between the two bases, as described here.
Feedback, and leads on any of these issues is of course appreciated.
About the author
Computer Science and Physics major at Saint Michael's College. Lead developer + project coordinator for FreeBuild. Administrator, Cemetech tech community. Webmaster for the Village2Village Projects and the Vermont Sustainable Heating Initiative.
#2
Keep up the good work, the screens bring back old memories. :)
11/04/2009 (2:10 pm)
Lego-Torque... thats awesome, I'm sure getting the actual building process is a pain but it looks and sounds like your actually going to have your own 3D lego set!Keep up the good work, the screens bring back old memories. :)
#3
11/04/2009 (6:20 pm)
Building is actually the easy part :) It's all the little goodies that make it fun to run around and play against other people that make things difficult.
Torque Owner Thomas "elfprince13" Dickerson