Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (603)
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 1895 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: 56
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: http://rltiles.sourceforge.net/) 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: http://www.lostgarden.com/2008_04_01_archive.html (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.

[ TriangularPixels.com - 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  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (33 views)
2014-12-15 09:26:44

Mr.CodeIt (23 views)
2014-12-14 19:50:38

BurntPizza (51 views)
2014-12-09 22:41:13

BurntPizza (84 views)
2014-12-08 04:46:31

JscottyBieshaar (45 views)
2014-12-05 12:39:02

SHC (59 views)
2014-12-03 16:27:13

CopyableCougar4 (58 views)
2014-11-29 21:32:03

toopeicgaming1999 (123 views)
2014-11-26 15:22:04

toopeicgaming1999 (114 views)
2014-11-26 15:20:36

toopeicgaming1999 (32 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org 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‑gaming.org
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!