   Items on character (Diablo 2 style)
  Over the last year or so (off and on), ive been designing many aspects of my game, along with programming some of them. After hours of figuring out how im going to allow items to be shown on a character, i thaught i had a good way. But the problem is, it takes far too much disk space, and memory.Ill start by explaining the basic graphics of my game. First of all, character images are based on their race. Character classes will not have their own character image. Instead they will have default items assigned to them. Each character class will be given a race, chosen by the player when they create their character. The reason i am doing it this way, is because i want some races to be leaning forward (Undead, for instance), and some to be standing straight up (Humans), and some to be tall or short (elves and goblins, respectively).I will be using 16 directions of display. North, NNE, NE, NEE, E, and so on. Lets assume every animation will have 5 frames. 16*5 = 80 frames just to cover the directional animations of 1 action. Then theres Swimming, Attacking, Casting, Dying, Standing, Running, Walking. Thats 80 frames PER action that EACH race can do. If i have 15 actions, each race will consume 1200 images in its file. Lets say i have 25 races (including Mobs/NPCs), thats 30000 images total.Thats a lot of space that gets taken up on the hard drive. I have 5 player races so far. Then when players go into dungeons, more races (from mobs) will be loaded. Thats a ridiculous amount of memory. But thats only the beginning.Now, in order for every time to fit perfectly on each character race, action, and animation frame, it must be in the same format as the race image. So one item will have to fit perfectly on EVERY race, match every direction, and every action. That comes out to a single item taking up 1200 images per file, and 25 files per item. Therefore one item takes up 30000 images, spread throughout 25 files. This will simply not work. Every player, and character, will have their own set of items. If a player is around 15 different players who each have different items, and are all 5 different races, that comes out to be 90000 images. Thats way too much, not only to hold on disk and memory, but id have to have 9000 people working on the item graphics.The only other way i can think to make items display on characters is to do 3D. I attempted to program in 3D once, a few years ago, and failed miserably.Anyone have ideas or suggestions? And anyone know how Blizzard pulled this off in Diablo 2?   
  With this many directions the usual solution is to model in 3D and set up a skeletal system or similar which means you don't have to make all these by hand.  Diablo 2 took this approach AFAIK.  If memory serves me right, they even gave you the choice between "2D" (the art prerendered in 16+ directions) or "3D" (the art rendered in realtime) in your graphics setup.If you're sticking with 2D hand-drawn, the usual solution is to eliminate as many multipliers as possible.  Taking ragnarok online for an example -- they have 8 cardinal directions, but attack animations lock to 4 diagonals (half of which were just mirrored from the other 2), and lots of different weapons reuse the same art.  We can further reduce the number of pieces by reusing art -- having all weapons swing the same as each other, the same for each class, the same for each race, etc.  They further reduced the number of animations needed by only having the weapon visible for attack animations (or battle-ready idle).   ;  Although i don't think Diablo 2 works the way MM remembers, he's got the right solution:  Do it in 3D and your assets get much more manageable. (I seem to remember Diablo2 having a GIGANTIC install, coupled with slow load times... i wouldn't be surprised if they actually DID had all the character permutations on disk, or at least an automated system of creating them at level load.  Also, not all weapons actually looked unique... I'm pretty sure there were weapon and armor types that differed only in color palette, which would have made asset management a little easier.)If you can't (or don't want to) make your game fully 3D, then you'll probably want to write some plug-in that automatically renders each character in all permutations.  The artists would just create weapons and armor with standardized attachment points, and let your tool chain automagically put 'em all together.  You could combine it with a database system to look up which characters are allowed to wear/wield particular items.If you're committed to doing it all by hand, you're probably screwed.  ;-)   ;  I have no intension of doing it by hand! My original plan was to take 3D models, and move them around certain degrees (16 times in a 360 degree circle) for each animation frame of each action, in a viewer and create a texture 2d, and put that into the tile library for that item. But even that will take a long time.I think i will be doing it in 3D. Im going to have to do a lot of learning tho. I have absolutely to idea how to create animations for a 3D object. Ill probably do all objects as 3D models, and just do the landscaping and static structures such as buildings as hand-drawn 3D.The game world will remain 2D, similar to Diablo 2, but objects will be 3D so i can create items faster and with better management.   ;  thats a cool way to do it. Lots of games were made this way, including command and conquer, do you think they drew every rotation angle for their smoothly rotating tanks and vehicles???This method is probably going out of date by now, but back 10 years or so it was one of the best ways to make a game.I was making a voxel editor for a platformer with "gear", but i wasnt going to make it so they all swing the same sprite, i was just going to have separate sprites rendered for each character.Maybe rle compression would definitely be needed, because there would be a lot of translucent pixels.Maybe it would have taken loads to store, but isnt that what cd's are for these days? for storing the load of graphics that your game needs to run.Diablo 2 worked, so I guess its possible to store everything, diablo2 was pretty small sprites.One thing that would take less to store is you only store gear "overlays" for the main characters that actually swap items, and make the monsters never do this.I am a pretty good artist, but theres no way even I think id be able to draw every single sprite the 2d game would need.   Rendering either voxel sprites or 3d models into 2d sprite compartments would definitely be the only way to do it.Especially if its isometric, do you realize how hard and monotonous it is to draw every angle of motion?I dont think its impossible to make a game this way, just set aside the amount of ram you require as a prerequsite, then decide how you are going to disperse this among sprites.You have to make ram concessions to make a game, but its possible. Just think how you can make your game a little smaller, but I still suggest keeping the liquid animation, that would make the game look amazing.Just think how pretty you can make your renders, because its all precomputed.Even having only one base class to be, and everyone looks the same is a good way to go about it.  the game would still be good, flashback (for ages ago) all the characters looked just about the same because they probably came from the same motion capture. And that game had really nice animation.But you could have 5 or so classes i bet, i could fashion it out myself.Its not impossible.But you do unfortunately need to write the 3d program that makes these voxel sprites or poly models and renders them at orthogonal angles, so if you cant do 3d im afraid this will be too tough for you.   ;  You're going to have to make some compromises on animations or the number of races you have in your game.3D can be easier to manage at the end of the day, but the art isn't any less complex or time consuming to put together.  Sprites are fixed and a lot of drawing is required (a lot), but 3d requires texture art, models, and skeletal animations.Once done, it's a little more efficient.  The trick there is the whole "done" part.  3D art is just as hard to come by as 2d art.As for D2, it uses all 2d sprites, but they were clearly rendered in some kind of 3d program.  It uses a paper doll system as well (hence why sometimes in extreme lag you might see your arms, but your torso and head is gone).That (probably) reduced their number of frames dramatically, and may be a method you should consider.  That or you compromise on complexity (for example, don't show items on characters).   