Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Customizable avatars in your RPG  (Read 2744 times)
0 Members and 1 Guest are viewing this topic.
Offline evilfrenchguy

Junior Devvie

Medals: 3

« Posted 2011-05-17 21:50:36 »

Hey everybody.  Grin

I'm new here (not new to game programming). My name is Darren. I look forward to contributing.

I wanted to ask how some of you achieved customized characters in your RPGs? By that, I mean in terms of appearance. For example, when the player creates their character, they choose x hairstyle, y shirt, and z pants. Ingame, they might be using an axe and be wearing a steel helmet.

Normally, that would be easy. Just substitute an equippedWeapon variable and your done. However, animations complicate things. Would I need to make separate animations for all actions for each item? What about two different equipment in the animation (i.e. sheathing a sword requires my armor and my weapon to animate together).

How did any of you achieve this?
Offline DzzD
« Reply #1 - Posted 2011-05-17 21:58:50 »

depending on the requested goal : use different layers, and a sprite hierarchie : like weapon is child of body

example :
have n weapons animations and only one body animation, if you want to just change clothes/skin/hair colors you may use same spritesheeet but with a tint filter, when user change weapon tou will just change its children weapon spritesheet/animation

Offline evilfrenchguy

Junior Devvie

Medals: 3

« Reply #2 - Posted 2011-05-18 11:26:00 »

Hey, you know, that's not a bad idea. I think I get what you're driving at. Thanks.  Smiley

Has anyone else had to climb this hill before?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Orangy Tang

JGO Kernel

Medals: 57
Projects: 11

Monkey for a head

« Reply #3 - Posted 2011-05-18 11:43:42 »

A lot depends on how much customisation you want to provide, and how much animation you want to have. Overlaying sprites can be really effective (see the RLTiles characters here: but that doesn't have animation. Alternatively you can do your animation by rotating and scaling body parts. That'll make doing the animation less costly, but the actual animation quality tends to suffer a lot.

Of course if you want the absolute best then you're probably looking at a proper 3d animated skeleton and 3d customisable body parts.

There's a nice post on Lost Garden about this: (although it's more from an artist's perspective and a little to geared towards customisation-as-a-selling-tool IMHO).

Personally I plan on letting the user pick from one of several prefab characters, then palette swapping the primary/secondary/skin/hair colours for further customisation. That means they don't get avatars with the exact equipment used, but it's a reasonable compromise between customisation and quality IMHO.

[ - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline evilfrenchguy

Junior Devvie

Medals: 3

« Reply #4 - Posted 2011-05-18 13:11:21 »

Thanks for the links! I haven't worked with 3d yet, but I wonder if there's a skeletal system for 2d sprites?
Offline Zushii

Senior Newbie

« Reply #5 - Posted 2011-05-24 16:47:36 »

A skeleton would only make sense, if youd have a ragdoll. Because in 2D you  are only moving images, and can't morph them, without getting very intense with math and it wouldn't look good Wink
Offline evilfrenchguy

Junior Devvie

Medals: 3

« Reply #6 - Posted 2011-06-02 13:03:13 »

Well, I was thinking that the new Terraria game on steam does it well. Something to that effect.

I imagine there is a sprite sheet for each bit of clothing with all animations on it. Example would be maybe chainmail.png, which has the chainmail torso piece with a jumping animation, a swinging animation, maybe an emote or two. Then, in Java, have like a Torso class to act as a parent to all pieces of armor. Same with maybe Legs, Head, Helmet etc.. Then in the Equipment class or something, have an object for each one that changes. Maybe a method like public void changeTorso(Torso torso). When rendering, do like feet.paint(g), legs.paint(g), torso.paint(g), etc..

Is that a sensible approach?
Pages: [1]
  ignore  |  Print  

EgonOlsen (79 views)
2018-06-10 19:43:48

EgonOlsen (59 views)
2018-06-10 19:43:44

EgonOlsen (78 views)
2018-06-10 19:43:20

DesertCoockie (261 views)
2018-05-13 18:23:11

nelsongames (159 views)
2018-04-24 18:15:36

nelsongames (158 views)
2018-04-24 18:14:32

ivj94 (901 views)
2018-03-24 14:47:39

ivj94 (162 views)
2018-03-24 14:46:31

ivj94 (813 views)
2018-03-24 14:43:53

Solater (177 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!