Yarns: LÖVE Stories

Show off your games, demos and other (playable) creations.
Candall
Prole
Posts: 19
Joined: Sat Oct 31, 2009 1:09 pm

Yarns: LÖVE Stories

Post by Candall »

Greetings! Please allow me to introduce a project that I've been working on for a little while now.

It's called "Yarns" and is, in essense, a 2D machinima creator.

For those who may not know, "machinima" refers to movies made in game engines.

The final product is (or will be) a sum of many parts. My attention has thusfar been focused on three important aspects: a character creator, a costume creator, and an animation editor.

Image
This is the character editor. I'm building the interface to be keyboard-control only, so I implemented a ring menu to keep things tidy, neat and quick. As is (hopefully) obvious, the currently selected icon is the double-helix, which is the character's sex and skin color. All the "sex" variable really does is decide whether the character has boobs, but that may change later. The color box is highly subject to many changes, but you get the idea of what it does.

Using the other icons, you can change the character's nose, ears, eyes, mouth, hair (and hair color) and costume. The save icon is also already implemented; it allows for both saving and loading. I decided to keep the character editing and costume editing seperate so that characters could have costume changes that would not affect the rest of the character.

Image
This is the costume editor. Currently, the "gloves" icon is selected. Please note the filenames listed in the scrollbox. When the editor is loaded, it places all of the filenames in a certain folder into a table, and then that larger table is sorted into several smaller ones based on string matches in said names. The same is true of the body parts in the character editor.

For that reason, anyone can add any graphics they wish by simply placing appropriately named png images in folders in their "Yarns" save directory (all of which Yarns creates at loadup). "Yarns" is being designed with extreme extendability as a top priority.

Also, notice the "_replace" at the end of the filename for the currently selected glove. This tells Yarns not to draw the character's hand while the current costume piece is loaded. That way, for example, you can have a character with short sleeves (therefore, the rest of the upper arm should be drawn), but you can also have long sleeves or costume pieces (such as the skeletal arms) that either cover the entire limb anyway or simply need the arm to be hidden.

There's another modifier on filenames, which is "female_". That's used for filenames on shirt graphics that are female alternatives (with breasts) to otherwise identical shirt graphics with an otherwise identical filename. Selecting the "female" sex in the character editor automatically loads the female version of the costume file's shirt if a female version exists.

The rest of those icons change the shirt (including the torso, upper and lower sleeves), pants (including the torso, upper and lower legs), shoes, mask, and hair (seperate from the character's regular hair in case the costume needs its own; simply leaving "None" selected for the costume will keep the character's hair unchanged). As before, save/load is already implemented.

Image
Last but not least is the animation editor in its very early stages. So far, all I've implemented is the ability to select sliders for body parts and push them to alter rotation on the appropriate body part. Above you can see that I've twisted some of the parts around to demonstrate that it's functional. It has also demonstrated to me that I need to adjust the way some of the limbs are "pinned" together.

The editor will also include a frame selector (to which I'm planning to add a layer of onion skinning). Any adjustment to a slider will create a keyframe for the adjusted part inside that frame, and any unkeyed frames in between will interpolate (or "tween") the part's position between keys. There will also be a function to reset individual sliders inside a frame and delete the key.

I also intend to have an optional "auto-loop" function with an adjustable frame number so that during a chosen number of frames after the last key in the animation, all parts will interpolate back to their positions just before frame 1 so that things such as walk loops will be much easier and smoother.

I will also need to come up with a file format for animation, but I need to get everything else implemented before I can work out something efficient that won't require a lot of change.

Down the road:

The next few aspects of the program will be a set editor, a prop editor, a scene editor, and playback mode.

The set editor will be a very simple tile map editor for building backgrounds.

The prop editor is going to be a system that will allow the player to select a graphic out of a "props" directory and assign actions to it which will be passed as parameters to standard functions in the Yarns code. These will, for example, change the prop's graphic, play a sound effect, or move the prop.

The scene editor will be a system to tie everything else together. You'll be able to choose actors and place them where you want them, as well as selecting the set and placing props. You'll also be able to set the characters to move around and choose their animations.

Playback mode will be similar to the scene editor but will not include any of the GUI elements; it will simply play the scene.

I don't intend to even try to have video output since there are so many good freeware video capture tools (such as CamStudio).

Do I need help?

Yes I do! I have only actually created the bare minimum of graphics so far (for the purpose of testing implementation), and I really have little to no clue when it comes to programming. My code is sloppy and (I suspect) not highly efficient. If someone would like to help with optimization, I'd be willing to accept said help so long as any changes are well documented and well explained so that I can still read my own project's code ;)

I certainly wouldn't say "no" to anyone who wishes to work toward implementing other modes, either.

tl;dr

Yeah, I guess I got carried away. But since you're still reading, here are my formats for characters and costumes, respectively:

Code: Select all

eyes=eyes_Default-Green.png
costume=Casual.txt
skincolor=10
sex=Female
nose=nose_Pointed.png
mouth=mouth_Red-Lipstick.png
haircolor=20
fhair=fhair_Brushed-Parted.png

Code: Select all

bss=ss_Cotton.png,19
shirt=shirt_Cotton.png,19
bsp=sp_Boxers.png,7
pants=pants_Elastic-Band.png,7
fss=ss_Cotton.png,19
fsp=sp_Boxers.png,7
The numbers after the .png references refer to the costume piece's color.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Yarns: LÖVE Stories

Post by bartbes »

That really is a great project! And I must say it looks really good for something in it's 'early stages'.
I hope you know what you've gotten into, this project will haunt you for at least a few weeks, and when that stops, we are here to haunt you for another few weeks, so, basically, that means you've got a lot of work to do.

I'm looking forward to seeing some release, if this ever gets finished (or should I say when?), this is going to be epic!

(forgive me for not making this story as long as yours)
Candall
Prole
Posts: 19
Joined: Sat Oct 31, 2009 1:09 pm

Re: Yarns: LÖVE Stories

Post by Candall »

bartbes wrote:That really is a great project! And I must say it looks really good for something in it's 'early stages'.
Thanks! Yeah, even though the project as a whole is still in its early stages, the character and costume editors are pretty much as they're going to be in the first release. I'll probably add some options for additional facial features (freckles, scars etc.) to the character editor, and I'm definitely going to add hats to the costume editor, but visually, that's how they're going to be.
bartbes wrote:I hope you know what you've gotten into, this project will haunt you for at least a few weeks, and when that stops, we are here to haunt you for another few weeks, so, basically, that means you've got a lot of work to do.
:megagrin: Haunt away, guys! Since each aspect of the editing tools are so vastly different from one another, the concept stays very fresh from one piece to the next, so that's good... it keeps me interested in the project. On the other hand, it means that I have to do a lot of experimenting before I get get started on a new section, so that slows me down. I'm deep in experimental mode with the animation editor at the moment.
bartbes wrote:I'm looking forward to seeing some release, if this ever gets finished (or should I say when?), this is going to be epic!
I certainly hope that it's a "when!" :rofl: I'm painfully aware of the ratio of started projects vs. finished projects, and that's why I'm working to get enough of it finished that I can draw some interest from maybe one or two more people. Even the thought of pixelling enough clothing, hair, etc. is a bit daunting.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Yarns: LÖVE Stories

Post by Robin »

Candall wrote:I'm painfully aware of the ratio of started projects vs. finished projects
At least you started. ;) The heap of projects which are just ideas, which no-one ever got around to start is even larger.
Help us help you: attach a .love.
User avatar
beatthelastboss
Citizen
Posts: 63
Joined: Wed Dec 09, 2009 10:50 pm
Location: Jacksonville, Florida, USA

Re: Yarns: LÖVE Stories

Post by beatthelastboss »

Great job! Though I must admit, the bald lady scares me 0_o
IN SOVIET RUSSIA, LUA CODES IN YOU!!
User avatar
mikembley
Citizen
Posts: 72
Joined: Wed Dec 17, 2008 5:30 pm
Location: Blackburn, UK
Contact:

Re: Yarns: LÖVE Stories

Post by mikembley »

I love the character customization icons, They are so old skool Apple Macintosh!
User avatar
Rob
Prole
Posts: 6
Joined: Sat Dec 26, 2009 10:08 pm

Re: Yarns: LÖVE Stories

Post by Rob »

That looks great so far ^^ I wish I wasn't a LÖVE noob so I could offer some help, but I look forward to seeing the finished product :)
Candall
Prole
Posts: 19
Joined: Sat Oct 31, 2009 1:09 pm

Re: Yarns: LÖVE Stories

Post by Candall »

Hiya, folks! Just checking in to let you know that I'm still working on this.
mikembley wrote:I love the character customization icons, They are so old skool Apple Macintosh!
Thanks! I'm really happy that you said that. My goal from the start has been to give this a dithered, old-school pixelled feel instead of a polished, 32-bit anti-aliased feel (not that there's anything wrong with the latter, of course).
Rob wrote:That looks great so far ^^ I wish I wasn't a LÖVE noob so I could offer some help, but I look forward to seeing the finished product :)
Truth be told, I'm a noob as well, but I'm a dead determined noob. I've been learning LUA as I've gone and taking advantage of LÖVE's kind offer to take care of the truly dreadful parts. It's been quite a learning experience.

Since last time, I have actually managed to get animation mode working in the sense that you can insert keyframes and then actually play them back. Most recently, I've also worked in the ability to save the animations to a text file and then load them back in.

I have a few nagging things left to do (such as add hat graphics to the costume editor), but I'm still focusing on animation right now. My next step is to program the ALT keys to snap the current limb's position to the next lowest multiple of ten (in decimals). I also need to fix the delete key so that it will actually delete the current keyframe if it exists, and I'm going to map the "i" key so that it will insert a keyframe without the need to adjust the part first.

Here's my animation format in the form of half a walkcycle that isn't any good:

Code: Select all

part=btricep
x=1,-5.0499999895692
x=5,-37.699999883771
x=10,-17.549999943003
x=15,-32.699999902397
part=bbicep
x=1,8.3999999798834
x=5,-0.74999998323619
x=10,-11.412499973085
x=15,-29.329999908805
part=fthigh
x=1,17.499999934807
x=5,-0.04999996162951
x=10,-18.312499974854
x=15,-35.509999943897
part=fbicep
x=1,-11.649999953806
x=5,7.3499999940395
x=10,17.689999993891
x=15,33.771999988705
part=bhand
x=1,-4.3999999761581
x=5,-16.769999936223
x=10,-12.512499943841
part=bthigh
x=1,-23.649999964982
x=5,-4.1500000283122
x=10,8.824999933131
x=15,26.829999871552
part=torsoy
x=1,8.2000000402331
x=5,1.0000000707805
x=10,1.3500001048669
x=15,15.130000039935
part=bshin
x=1,1.0999999940395
x=5,2.849999954924
x=10,9.1124999453314
x=15,27.509999908507
part=fhand
x=1,-11.149999964982
x=5,-4.9999999813735
x=10,-10.487499972805
x=15,-14.989999961108
part=ftricep
x=1,-17.799999937415
x=5,-8.6999999824911
x=10,-5.3749999846332
x=15,-17.789999954402
part=ffoot
x=1,16.749999951571
x=5,15.099999960512
x=10,23.862499929965
x=15,0.65999995917082
part=fshin
x=1,29.499999899417
x=5,62.549999868497
x=10,70.437499822583
x=15,8.855499973055
part=bfoot
x=1,11.649999953806
x=5,2.0500000100583
x=10,-13.699999998789
x=15,6.1999999545515
"Part" is the limb to be rotated, and "x" is followed by the frame location of the keyframe and the limb's rotation level at said frame.

Oh! Nearly forgot. I've also built in the main menu screen to allow for choosing the correct mode. No more manually typing the mode into the main.lua file!

Image

Yeah, I've only bothered with graphics for the buttons that actually go somewhere. The really big one will be playback, and the three that aren't blank are the character editor, costume editor and animation editor.
User avatar
pygy
Citizen
Posts: 98
Joined: Mon Jan 25, 2010 4:06 pm

Re: Yarns: LÖVE Stories

Post by pygy »

This looks wonderful :-). Any update?

I might lend a hand once I'm done with my current project.

Cheers,
-- Pygy
Hermaphroditism is not a crime. -- LSB Superstar

All code published with this account is licensed under the Romantic WTF public license unless otherwise stated.
Candall
Prole
Posts: 19
Joined: Sat Oct 31, 2009 1:09 pm

Re: Yarns: LÖVE Stories

Post by Candall »

pygy wrote:This looks wonderful :-). Any update?
Thanks! As a matter of fact, I'm elbow-deep in the set editing mode, which is currently a simple but functional tile map editor.

The forum seems to be cutting off the right edge of my pictures, so here's a direct link.
pygy wrote:I might lend a hand once I'm done with my current project.
That would be excellent. If or when that happens, please don't judge me on the quality of my code. I'm basically a good person, I assure you.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests