Two 4 One

R_000042 2025-05-23 C64 One-File Demo (PETSCII) Tools: PETSCII Editor Tools: PETSCII Editor, C64 Studio, Exomizer Get it from CSDb.dk

Credits

Code & GFX: jmin
Music: Ass It

How it started

As so often, a quick lunchbreak doodle was the starting point. Goerp and me both having glasses and how to incorporate them into PETSCII portraits of us was something I've already dealt with for the Scan And Spin demo and the other demo project that was triggered by the diagonal portrait of Goerp. So how about having just one pair of glasses? This could be a neat take on the multiple-faces-merged-into-one photo montage etched into our Gen X brains by Queen or Cronenberg, BUT with glasses. And upside down?

Here's the result:

One day before deadling: Pixeling

The idea stuck and in the evening hours, I've worked on it some more. The upside-down spin didn't lead anyway, so I've kicked that out, but the rest turned out rather neat looking.

Having one slot left in the WiLD category of the Plain PETSCII Graphics Competition 2025, I thought about adding animations. While working on the pic, I've shifted it 20 chars to the left/right to check, if both halfs are reflecting different facial features while working for the joined head as well. This brought up the idea of first showing both heads separated and only later reveal that it's one head afterall.

Sliding in the halfs from left and right was of course a no-brainer, but at this point in time, I had no clue whatsoever of how to jumpt from two halfs to a single head. A problem for future jmin to solve.

Here's a mockup of me moving the head 20 chars out and thus having it re-appear on the left in PETSCII Editor.

The second demo FX was plain obvious: doing Simpsons' Blinky animation, I mean, it's right there, isn't it?


EDIT: OK, while I had Blinky in my mind almost right from the start, doing us as Simpsons characters is something that came up while writing this post a day after release. Just for fun, let's have a look how that would have looked like:

Uh,... well... nope, big fat nope!

Back to the story. END EDIT


So, anyway, where were we? Eyes, check, I thought about having those three pubils move around, even as a hidden feature allowing direct controls via Joy2 but let's face it, that's not gonna happen within the timeframe left, so what else can we do?

It's a one-file demo, so let's add some text, shall we?

PxP logo, check, h/t to Mayday! who are hosting the compo, check, greetings? Sure, why not!

Fitting them all in was tricky, so I had to skip some chars and mix short name and full handle. Also, it's the first time writing up greetings and I'm sure I've forgotten some fellow PETSCII heads but please feel included!

How about the ending?

No idea, all I have is sunglasses and that's it. Do they pop up just like that? Dunno. What happens afterwards? Dunno either.

After an evening of pixeling, here's a storyboard thingy that I sent out to Goerp.

Couple of hours before deadling: Coding

OK, this can't be that hard. Draw a PETSCII, move it around, update the eyes. All something that I've done in Scan And Spin, so let's do this!

Got the basic framework up and running and somethings missing! There's no music!

Oh boy, got side-tracked right at the beginning digging through DeepSID for finding a track and it almost took me an hour before stumbling upon Absolute cool by Ass it. That shall do for getting into a groove, right? It's kinda cool, it's short and it loops. Let's stick to that, shall we?

Next up, moving the heads in from left and right. Easy. Just do the "Box tower moving up"-code but sideways, but wait! I need to move things in both directions and thus draw the new lines of GFX in different positions! Oh, and I would need to move not only half of the screen but the whole screen for revealing the head too!

And that's when an easy subroutine turns into a bigger one, all with parameters being fed into it for different behaviour and well, in the end, its several subroutines but I've kept the parameters: two for selecting which part of the screen to be scrolled (e.g. 0-19 and 20-39), one parameter for the column that needs to be painted and a last one for defining which row of the PETSCII to be painted first.

With all this in check, I had my first half scroll in from the right. Sweet!

A couple of minutes later, I had the second half scroll in from the left. Sweet!

But then what? Scroll out again and just jump to the full head? Boring.

Maybe I just scroll on one half and thus move the other half automatically?

Well, right there, a happy accident occured. Instead of scrolling all out, I've just overscrolled the right side and endet up with half the face right where it should end up anyway. Looked nice, so let's try to see how overscrolling both sides look like.

And with that, the head-melt thingy was born. It's not perfect — in fact it's off center, but I only realized that a day later — but it's fast and kinda smooth and it takes you by surprise which is quite something.

Next up, eyes: Blinking was straight forward too, or at least I thought so, because what hadn't crossed my mind yet is that re-opening an eye means that the eye itself needs to be re-painted too. Easy if we're doing just pupils, but the concept had already evolved using the blinking as transitions between the different messages.

OK, after some fooling-around, it dawned on my, that I only need to get the blinking working and painting the messages isn't needed as it's part of the blinking!

Took me an hour or so to figure it all out, but once done, it was rather robust. It all came down to set a variable of what message to paint and trigger the eyes. And follow up with the next message as variable and blink. Or just blink to repeat the last message. Boom!

What about the ending?

It's getting late and except for the sunglasses there's no ending to the demo, so back to pixeling in PETSCII Editor for some inspiration.

Sunglasses are neat, but the shouldn't just appear. I already have the "PXP out" message, so maybe do a fade out? I've done color cycling in the last two demos, so meh, no, but how about doing the transition in PETSCII itself?

With only 16 colors available and having a lot of diagonals on screen, that's an impossible thing to do, but what I came up with was, going greyscale. At first with multiple shades of grey — which looked back when switching from color to greyscale due to the dark colors already used in the pic — and then just going mono dark-grey. As a second step, let's invert it and thus reducing the grey on screen even more before going full blank with only the glasses being visible anymore.

Huh? Glasses or Sunglasses? That's it, they're just glasses but now with the lights off, the eyes aren't seen anymore but instead a reflection. A reflection of...

CUT! Wait! Man, I've forgotten to do a BASIC fader!

Definitely no time for that and re-using the Scan And Spin one would be lame.

Aargh! Wait! Let's in fact do a BASIC fader, but let's pin it to the end? As a restart thingy?

And thus, READY was written on the glasses, all with a blinking cursor — which was surprisingly easy to implement — and fading out further making the glasses disappear and then cut it down to just one READY and... RUN it again!

Final tweaks

With the time running out slowly, all left to do was teaking all the pauses between the animations in order to a) sync to the music (only the heads appearing and the transition from light to dark was synced up really) and b) sync to the loop (which meant dragging out the READY parts and having a slightly too long green screen before the restart). Easy.

Now, let's zip it up, create a .gif for the screenshot and send it off!

Conclusio

What a joyride. I've done single PETSCII pix in short time before and even same-day as compo deadlines, but adding code hits different BUT is at the same time so much more rewarding. Joggers have their "runner's high", me, I definitely had a "coder's high" :-)


What's CSDb thinking about it

jmin (24.05.2025)

Thx, everyone! Happy to see this little pop culture thingy sparked some smiles :-)
Added my usual write-up.

Rebel 1 (24.05.2025)

Lovely and kewl!

Skleptoid (24.05.2025)

Love the nifty triclopean multi-'screens' effects on display here, reminds me of one of the wackier slot machines, or maybe even ye olde The Joker's Wild, heh. (Also thanks for the shoutout! :)

Katon (24.05.2025)

I like it very much, very interesting idea!

G-Fellow (24.05.2025)

Very creative. I like it alot.

LDX#40 (24.05.2025)

Very cool idea, brilliantly executed!

4gentE (24.05.2025)

Lovely!

Raistlin (24.05.2025)

Very cool! You're on fire this month!

t0m3000 (24.05.2025)

s U p 3 R b ! 10/10

Shine (23.05.2025)

0SecondsWarez! ;)

jmin (23.05.2025)

@Shine: Watched it already?! Wow.

Shine (23.05.2025)

Alter Falter! Der JMIN haut raus! :D
Excellent! <3