Hey guys, im now working on an RPG diablo style. For now im keeping it simple, just a nice single player. Later I would like to use a socket server to add multiplayer. I've learned a bit from my last project and this time, im trying to do better with mapping EVERYTHING out on paper before even writing any code. So while making a list of what I need to do, and what I dont know how to do, ive come to you guys for guidance.
Part one, as im still learning better ways to do things every day, I want suggestions on best practices.
Part two, is where I would like to ask for advice or direction on if and how to do certain things.
PART I
1a) Screen class, loading class, xml parsing class. These are used to create the tile level. It loads all the PNG's from the server, including the xml for level layout. It then draws the isometric map onto the screen. It can be scrolled and only whats displayed is shown. Is there anything to worry about. Loading times, png size, anything I might come across that stumbles me. This is going to be very graphic intense.
1b) Drops class. IE) gold, items etc... Will initialize the class, addChild it to screen class. Create listener for click. Also all drops will dissapear after 30 seconds.
PART II
2a) Is it possible to show different clothing on an avatar class? As you guessed I have an avatar class that I would to be a naked character monster etc. If I initialize the class as the players hero, rather than having 100s of movie clips for each direction and attack animation, i would rather have a few for the avatar class. Then impose the clothing over that depending on what the character has equiped.
Thats all for now, ill be updating this as needed.
1.) make a decission of what the server should compute (level rendering/ fetching/ sorting/ initializing,...) and what the client should.
Imagine you have a 2k map (2048*2048 pixels),- flash wouldn´t be able to handle that and even if it would it would take a very long time computing or reading out values from it and interprete it as level elements.
So in that case a server could slice out smal parts and send it to flash.
2.) depends on how you create the graphics. if you work with vector graphics or flash as drawing tool you are pretty much pinned to loads of movieClips.
If you´d use for example a 3d package like they did with Diablo 1 & 2 with Lightwave you could render sprite sheets (little scripting for automization) and switch those. With a complete rigging it would be likely easier to add more cloth elements or change them.
The downside: takes very long to learn and master (not something to begin with in a few month´s)
in response to your answer of 2. Im not so much worried about how to make the graphics. To animate avatars in flash, for game purposes, there is a MC, with frames for the different animations. I would like my naked character to be the bones so to say of the animation. But if possible would like clothes or armor to appear over the frames. I guess the question is can i do this dynamicaly, or do i need lets so 120 frames worth of animation x each peice of custom armor. or can i at run time depending on whats equiped, apply clothing to the animation dynamicaly.
create a rig system in flash and let the body and clothing parts move,scale,rotate on the bone parts.
For simplification matters you could build some stick figure and read out all the limb movieClip parts and the transformation properties,- then apply those transformations to the dynamic clothing parts.
Brain, Body, Clothes, Computer Chair, Room, House, Neighborhood, City, State, Country, Continent, World, Galaxy, Universe, and on?
Posts
811
He's saying you'll basically animate a "skeleton" MC and place "clothing (or weapons w/e)" MC on top of the "bones" and rotate/move the clothes to match the bones' rotation/position. With this set up you can simply swap the clothes MCs to change the appearance of the character w/o reanimating anything.
Okay based on the setup I was going to use for animation I would have a movieclip. Lets say frame 1 - 5 is a barbarian walking north. When you click the map north of the avatar. The avatar movieclip would play, and repeat untill arriving at destination.
Now what I would like to do, is show custom armor on that animation as he walks north. That way I dont need 50 mc with 5 frames each (to show the different equipment combos). Because in the end thats just one direction, one avatar of many.
I dont understand how you would implement the ideas your mentioning.
I dont understand how you would implement the ideas your mentioning.
I dont have the time and will writing a example flash file,- but this is something that is essential for a good flash developer developing own new ways/ mechanics him/herself.
Just play around,- how would you do it? - perhaps you depend on more on the timeline or maybe more on actionscript in the end you will have to find your own way anyway.
be creative,- after all that is what this thread is about- getting and creating ideas.
a technical tip though:
if you tween movieClips on the timeline make sure that before you create tweens that the movieClips have unique instance names. After that it´s the classic way by putting a bone- movieClip to a layer - extend the time with F5, right click "create tween..." add a new keyframe F6 and animate.
From now on each keyframe shares the same Instance name of the movieClip so that you can later on grab that information in actionscript and use it to your advantages.
For example the onEnterFrame event can grab the the current transofrmations from each movieClip including tweened ones from the timeline if they have propper instance names like I explained before. For example
or alternatively alter the bone movieClips and attach Clothing MovieClips in it at 0,0 so that the naked body gets filled with graphics within it body MovieClip parts. But again make sure that with the tweenings in the timeLine each Body part has the unique instance name on EACH keyframe.
in the armor movieclip would load / add the correct armor into the placeholders and make it go to the same frame-direction as the player, depending on what frame the player/object is at you may need to arrange depths to allow a hand to go below a leg
dofus a flash game is doing a skeleton in dofus 2 or their new game. i only use as3. im really trying to understand the concept. can anyone break the as3 concept down for me. i dont need actual code, ill fill in the blanks once i have a guide line on how to make an avatar with customizable code that can run attack etc.
I'm 3/4 through making a somewhat Diablo like RPG so I can give some advice on what I did wrong.
Loading tons of small .png's or whatever files from the server is slow. Flash takes a ton of time processing the files even though you'd set it up to load multiple files at the same time. So you might be stuck downloading the assets at 10kB/sec
Embed almost all assets to get full bandwidth use when downloading.
Paperdoll stuff is always an issue and it mostly depends on how much animation you're gonna have, how many directions is your character gonna have and how much equipment you're gonna have.
I use pre-rendered(or actually hand drawn) paperdoll items but I only change the shield and it's always in the same position so that's 8 frames per shield.
ColorTransform is really useful. Instead of making 50 different sets of armor for the paperdoll, do 10 and change their colors.
renderhjs pointed out a pretty clever way which I would probably use if I had fully customizable characters and/or more time.
You really have to think about how you're going to make content management easy. I've noticed that's a huge pain in the ass in RPG's and probably all content driven games.
If it takes you a day to add a new room or a new item, you're never gonna finish the game.
It's really easy to get in over your head. Diablo style games are made by something like 50 (professional) people working for a few years 5 days a week for 8 hours. You have to come up with really clever ways to cut that time to 1/100th without losing too much of the genres charm.
Okay it's impossible doing that alone. Just learn to hide that somehow.
Randomly generated content is always a good time saver but everything can't be random either.
Okay in my FLA there are 8 directions of movement. So if i understand the concept, I would make an avatar MC with several layers.
The base layer for 8 key frames would be of my naked avatar facing each direction. There would then be a layer above the naked avatar called bodyArmor, headGear, legArmor, leftShield, rightWeapon. Each of these would be extended 8 key frames for each direction of movement.
Now as an example of application. Lets say my naked avatar is facing the screen looking south. Now i choose to equip him from his naked state, and add bodyArmor. I would then need to addChild the armor MC for the south direction onto the naked avatar_mc.
Going deeper: If this is correct so far, then if my avatar turns to the right, or east direction, i would need to advance to another keyframe for that armor for the east direction. Doing this for each piece of equiped armor.
Even deeper: this armor would also have key frames not just for movement, but also for attacks. So for every animation or keyframe movement on the avatar, i would need a system to control the multiple armor keyframes?
If this is all correct, is this the easiest fastest method?