Composite sprites

Show off your games, demos and other (playable) creations.
laperen
Prole
Posts: 27
Joined: Tue Jul 26, 2016 1:15 am

Composite sprites

Post by laperen » Thu Aug 11, 2016 5:01 am

I'm working on a game where the player controls a robot.
The robot consists of interchangable parts. in this case the head, body, legs, right arm, left arm. Here's the results so far:

Image
on the left is in-game, and on the right is the spritesheet with the robot in pieces.

Currently reading values off a csv to get the proper heights, widths, and offset the individual sprites should be in to create the robot.

next hurdle will be animating the composite sprite, although that is more art heavy than scripting heavy

Germanunkol
Party member
Posts: 706
Joined: Fri Jun 22, 2012 4:54 pm
Contact:

Re: Composite sprites

Post by Germanunkol » Thu Aug 11, 2016 8:13 am

Nice - how are you generating the art? Manual pixel painting? That would be a ton of work when it gets to animating. I think I'd use blender and render the parts from different angles instead - that way animation would be much quicker to set up, and adding new parts would also be quite easy.
Looks good so far - looking forward to seeing the animation!

I'm not too find of the background grass (I guess it might just be a placeholder?). It doesn't make the robot stand out enough - maybe lower the contrast on the grass a bit?
trAInsported - Write AI to control your trains
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de

laperen
Prole
Posts: 27
Joined: Tue Jul 26, 2016 1:15 am

Re: Composite sprites

Post by laperen » Thu Aug 11, 2016 1:20 pm

Yes the grass is a placeholder. It was for when I was using a non-composite sprite placeholder and I was just doing a preliminary test with this composite sprite

I am generating the art manually, although when I say animation its probably not as elaborate as it sounds. As some examples of my previous stuff and how I will continue with this one, this is the placeholder I was using before:
Image
rows are the facing directions and columns are the frames of the animation. 1 is stationary, 2-5 are walking.

And something else in gif form to show it would move like
Image
not too many frames for anything. walking is 4 frames, attacking maybe 2-4, etc etc.

Germanunkol
Party member
Posts: 706
Joined: Fri Jun 22, 2012 4:54 pm
Contact:

Re: Composite sprites

Post by Germanunkol » Sat Aug 13, 2016 8:26 am

Okay, sounds reasonable. I'd be way too lazy to draw all of these by hand, but hey, it looks good the way you do it, nice style! :)
trAInsported - Write AI to control your trains
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de

laperen
Prole
Posts: 27
Joined: Tue Jul 26, 2016 1:15 am

Re: Composite sprites

Post by laperen » Sat Aug 13, 2016 4:05 pm

WOW! what a ride these 3 days have been. Celebrated far too prematurely when I opened this thread

Been working on sorting the sprites properly. Mainly which arm should be infront and which should be behind based on the "rotation". In the end my solution was to swap the back frames of one arm with the front frames of the other in script, changing the right left separation to a front back one.

Also changed the way I composited the sprites, with a "ball and socket" style positioning. This makes the system more flexible, allowing the arm ball to follow the body socket. Also allowing for a larger variety of designs I can put in.

My animator script was a little wonky too, had to sort that out
Image
visually nothing much has changed, but now my project is finally ready to receive interchangeable "parts" and their animations. And yep, still crappy placeholder grass as ground

But before that, working on game side stuff with saving/loading, and UI for inventory(draggable icons)

User avatar
MadByte
Party member
Posts: 495
Joined: Fri May 03, 2013 6:42 pm
Location: Germany

Re: Composite sprites

Post by MadByte » Sat Aug 13, 2016 5:47 pm

Good job, your art looks clean and solid - i like it ! :)

bobbyjones
Party member
Posts: 728
Joined: Sat Apr 26, 2014 7:46 pm

Re: Composite sprites

Post by bobbyjones » Sat Aug 13, 2016 7:08 pm

For animation have you thought about skeletal animation? Something like spine could work.
http://esotericsoftware.com
Do you frequently have great ideas but immediately lose them? Check out the MVP for my website called IdeaVault. It is designed to solve that problem. Desktop browsers only currently.

laperen
Prole
Posts: 27
Joined: Tue Jul 26, 2016 1:15 am

Re: Composite sprites

Post by laperen » Sun Aug 14, 2016 3:22 am

MadByte wrote:Good job, your art looks clean and solid - i like it ! :)
thank you
bobbyjones wrote:For animation have you thought about skeletal animation? Something like spine could work.
http://esotericsoftware.com
That looks like a wonderful tool, but looks like it requires relatively high res images. Pixel art is a very different beast. Besides, the skeletal animation seems to only be good for side view or sideways motion, not for front or isometric views which I have as well.

bobbyjones
Party member
Posts: 728
Joined: Sat Apr 26, 2014 7:46 pm

Re: Composite sprites

Post by bobbyjones » Sun Aug 14, 2016 11:48 am

Skeletal animation can work with any resolution. You are just making a skeleton and putting parts on it. You end up animating the skeleton rather than the parts themselves which allows you to switch parts whenever you want. It's exactly what you will end up doing. And for other views you will need different pictures for each part and you will then need to transition between animations. Skeletal animation can be used for any perspective(idk if it's the right term) you would just animate the skeletons differently.
Do you frequently have great ideas but immediately lose them? Check out the MVP for my website called IdeaVault. It is designed to solve that problem. Desktop browsers only currently.

rosshadden
Prole
Posts: 3
Joined: Fri Sep 09, 2016 5:05 pm

Re: Composite sprites

Post by rosshadden » Sat Dec 03, 2016 2:22 am

Skeletal animation definitely seems like what you (and me) want. The only problem is that spine is the only one with a working (not to mention first-class, made by themselves) runtime for love2d. But it's incredibly expensive, has a restrictive license that is terrible for hobbiests and game jams, and just generally seems to be the evil Microsoft/Apple of this space.

There are other solutions, such as dragonbones. It's free (though not open source...) and actually has just about the same feature set as spine, including amazing mesh deformations. It does not have a Linux client, but there is a great tool called coa_tools (https://github.com/ndee85/coa_tools) that let's you use the illustrious Blender.

However there is currently no dragonbones runtime for love2d. So either we need to make one, or implement a runtime for the format used by coa_tools directly.

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests