Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Of pythons and other reptilian madness

TL;DR: remember my last post when I said I was going to test some ideas using Pris as my guinea pig? I did it and this is (a ridiculously small fraction of) the result.

See the 15 expressions above? They were generated procedurally - and I've got, like, 350 more of them. And that's just the first pose out of five.

BWAHAHAHAHA... I'm beyond salvation.

Oh, and - see the tiny numbers under each face? That's a code! I put those little numbers into the magical thingamajigger and - BOOM! - I get the complete sprite!

... Ehr, kind of.

That last part in particular is, uhm... work in progres. And also, like... just a tiny bit more complicated than that.

WHATEVER! This is nothing short of a quantum leap from my previous (UNBEARABLY TEDIOUS) workflow. Creating expression for my character is now a matter of lazily look at a bunch of faces (all of which silently judging me), pick those I like the most and paste the code inside an array - boom, automagical sprite generation. With all-natural lemon and lime flavour!

=========================================================================================================

And now for the corner of boring stuff and blah blah blah white-collar technobabble dead ahead

1) I already knew. Honestly. I just needed time to digest the truth. When it comes to facial features my workflow *sucks*. So a couple weeks ago I decided to stop whining and do... something. "Something" being, story everything neatly inside dictionaries.

2) "great idea, I totally approve it!" I told myself. "How do we do it?" Well, I did the last thing I thought I'd ever do.

I coded.

Yeah, I confess it: I wrote a small,  humble python routine that takes a features atlas, slices it into tiny little pieces - according to a mapping matrix I graciosly provide - and then store the result inside specific keys of the dictionary. And yeah, I liked it. In a forbidden, lewd way.

3) At that point I was satisfied and decided I could move over At that point I happened to think, "I need more code! MORE! CODE!" "why not using such an (arguably) witty and  (you must be kidding) streamlined structure to pre-generate the complete facial expression?" And, as an ominously inevitable corollary, "why not store the results in an equally witty and streamlined look-up table like, say, an array of codes made up of the dictionary indexes of each feature I used for that specifc  expression?"

4) Great, good, fantastic, and - to my utmost surprise - WORKING LIKE A CHARM! But - yeah, there still was a but. How do I tell "good codes" (those that result in a facial expression that makes sense) from "bad codes" (... don't want to talk about it, really)? Sure, I could keep GiMP open 24/7 and manually check every possible brows-sclera-pupil-mouth combinations made sense. A perfectly tasteful workflow that was

(a) at a high risk of resulting in duplicate codes and/or unwittingly skipping meaningful variants

(b) BOOOOORING!!!!!

5) that's when the epiphany came: I looked at the screen and - yeah - I SAW all those faces looking at me, judging me, daring me to discard them! And - of course, of course! - I already had everything I needed! I just had to politely ask ren'py to show me EVERY POSSIBLE COMBINATION at once!

6) At this point though - really, why should I ever discard a combination? On which basis? The parts that make them are not going to disappear and save disk space! So why not SHUFFLING expressions? So that I don't get ONE neutral expression, but rather two... ten... six-hundred-million-ninety-seven-thousand-three-hundred-forty-six! Appearing at random so that you're NEVER sure you're seeing the same expression twice =P! Or - yeah yeah this is crazy - what about having an expression shift randomly as you talk with a character?

You think I've gone mad?

Don't worry.

You're right.


I... yeah, I think that's enough for today.

Need a coffe. Or a bed.

Maybe both.

Support this post

Did you like this post? Tell us

Leave a comment

Log in with your itch.io account to leave a comment.