different that the floor I'm running on. At the same time, it still seems to be in the same place. Effectively, I'm able to look 'around' the object! This is a very nice effect that I've always wondered about. Anybody know a way(s) to do it?Another thing I wondered about is the characters themselves... Items have magical properties, and some of these properties give a special effect. Example1: A 'Sword of Flame' will appear red, and will continue to do so until you change a weapon. Example2: An 'ethereal' weapon appears translucent, no matter how you view it and from any angle. My question about this is how do they get all the items to appear so? There are thousands of items and a large number of special effects for them, and then there are frames for special 'moves' (up to 30 different ones, + the normal ones) and frames for being hit. If you think about it, there are probably 16 or so directions a character can be in, and approximately 35 animations (each having about 5 frames, if they run them backwards, too). Then there are at least 50 different ways each weapon can look, and there are 100s of 'base' weapons. That means there are 16 * 35 * 50 * ~100 = 5000 * 560 frames (VB gets an overflow error multiplying those). That's a lot of frames. But, now we take into account that there are seven characters. Oh, and I've forgotten about the hundreds of monsters, too! And then there are the shields!Obviously, Blizzard must have come up with some other way of doing this. My very best idea so far is to 'flag' each pixel with a weapon on it, and use some kind of effect algorithm for each pixel. That way you could change the flagged pixels to other colors, which could possibly create D2's effect.Any other ideas?P.S. Sorry if I'm long-winded, but I have this undying desire to know...-Amrazek">
Diablo II "perspective" effect
Amrazek In the game Diablo II, there's an option for "Direct3D". Selecting it adds nicer lights and things, but the thing that interests me most is the way tall objects 'move'. It's quite difficult to explain, but I'm going to do my best. This particular effect will make tall objects seem... More 3D (but remember these are 2D). For example, if I walk past a tall spire that partially blocks my view, the tower will move at a rate different that the floor I'm running on. At the same time, it still seems to be in the same place. Effectively, I'm able to look 'around' the object! This is a very nice effect that I've always wondered about. Anybody know a way(s) to do it? Another thing I wondered about is the characters themselves... Items have magical properties, and some of these properties give a special effect. Example1: A 'Sword of Flame' will appear red, and will continue to do so until you change a weapon. Example2: An 'ethereal' weapon appears translucent, no matter how you view it and from any angle. My question about this is how do they get all the items to appear so? There are thousands of items and a large number of special effects for them, and then there are frames for special 'moves' (up to 30 different ones, + the normal ones) and frames for being hit. If you think about it, there are probably 16 or so directions a character can be in, and approximately 35 animations (each having about 5 frames, if they run them backwards, too). Then there are at least 50 different ways each weapon can look, and there are 100s of 'base' weapons. That means there are 16 * 35 * 50 * ~100 = 5000 * 560 frames (VB gets an overflow error multiplying those). That's a lot of frames. But, now we take into account that there are seven characters. Oh, and I've forgotten about the hundreds of monsters, too! And then there are the shields! Obviously, Blizzard must have come up with some other way of doing this. My very best idea so far is to 'flag' each pixel with a weapon on it, and use some kind of effect algorithm for each pixel. That way you could change the flagged pixels to other colors, which could possibly create D2's effect. Any other ideas? P.S. Sorry if I'm long-winded, but I have this undying desire to know... -Amrazek
AThttp://www.mwgames.com/voodoovb/phpBB2/viewtopic.php?t=144 The coloured weapons just have different palettes - transparent weapons are normal weapons which have been blended. Effect algorithms ?? No - they are just drawn down that way. And there are only a few types of weapons, shields, etc (one sword sprite will be used for several different types of sword for example) - plus sprites will be reused, not a whole set of unique animations for each special attack. If you can find a way to extract the weapon sprites from diablo you could have a look.
AmrazekI don't understand how you'd apply the pallette then, if you don't know which pixels they are. I would think it would affect the entire image, no? And the perspective post is interesting. I'll have to look in to that more.
ATThink of DooM - one player sprite, four player colours. When I say palette i'm just talking about the way in which the colours are changed, not about altering the actual display colour palette.
Eric ColemanIf diablo 2 is using 3D hardware accleration, then the tiles are probably just mapped to billboards. And to change colors, you can simply use DirectX for lighting or alter vertex colors manually.
PeterYeah, but D2 also works without hardware acceleration using plain old DirectDraw. Blizzard probably came up with some sort of clever scheme, they're tricky like that =)
AmrazekI'll post an example: Notice the red sword. In this case, it's a magical falchion. If I had been wearing a normal falchion, the sword would be white but look the same, and the character itself would not change. The same goes for an 'ethereal' item -- the sword would be a light gray and be translucent, but the character itself would be unchanged. The different magical attributes affect the color of the weapon -- the same goes for shields, helms, and armor. Since I believe the character itself is all one sprite, wouldn't changing the palette affect the character, too? Download Attachment: [url="http://vbgamer.strategon.com/msgboard/uploaded/Amrazek/2003325181058_Example1.jpg"][img]icon_paperclip.gif[/img]Example1.jpg[/url]
13.81 KB
ATThe character is not one sprite - a basic character is drawn down and then things like helmets and shields are drawn over them as seperate objects. My best guess - the items are stored as 8-bit bitmaps, and diablo will have several sets of palette information. Take one palette and add one image and you have the all the data you need to blt your item down - in the colours of whatever palette used. - to see what I mean : http://www.hyperfictions.com/palette1.jpg
Eric ColemanI know this is off topic, but that's a really cool ship [:)]
Mr. PaletteI read something about index palettes in the DirectX7 SDK. They contain values that refrence another palette's color table. I couldn't get it to work in my program though.
PeterHeheh, its the dreaded Blade Bug =) Yeah, like Andrew said, the characters are not made up of one sprite, instead the sprite is 'layered' For example, they will draw the basic model for the character /wout armour and weapons. Then they will have different armour animations without the character that can be drawn on top of it. They will also have sword animations without the character that can be drawn with it. It has to be done carefully, but the end result will look seemless.
AmrazekPretty clever. I would think it would be a lot of work to carefully place each item, but once you had it done for the basic items you could shift the palettes and get many, many different-looking items. It all makes sense, now. I was considering an RPG after my RTS (in isometric style) to further refine my engine to the kinds of tasks it may be put to use for, so these interesting effects are certainly good to dwell upon.
ATActually the work is not too bad - graphics are created with groups or layers (3d or 2d) around the same set of images which can then be processed by a game-tool designed to cut off the empty edges of the image and create a set of values for position used by the game.