"unique" features

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andrew Davie

Going to post some videos here of the bits that I really like and that are, perhaps, quite unusual.

First, the 'mace' weapon. I really love the fluent and "organic" feel of this rope-like weapon.  It operates by using left/right to "guide" the direction -- although there is inbuilt randomness, so it's not a precise thing. Also, the angle at the base (where the player is) propagates along the length of the "rope", so there's a delayed reaction between your input and what happs to the 'mace' at the end.

10/10


Andrew Davie

This one I really like - a "chain reaction" converting geodoge to doge.
Also an interesting feature here is the dynamic "linking" of geodoge into a single block.


Andrew Davie

This one operates pretty much in the background and may not be noticed by most.  It's the dynamic "rounding" of the corners of blank areas. Rather than sharp right-angles, each character can have 4 independent rounded corners. The neat thing is that these corners are added dynamically at draw time by inspecting the surrounding characters. It's pretty cool.


Andrew Davie

#3
The fade-in (there's a similar fade-out) is kinda subtle, too -- but nice.  Interestingly, because ChronoColour combines three colours over three frames, the fade seems to be more subtle/nicer.  In the video I cycle through a few resets, with fade-in on each screen. Nice.


It's handled with a simple variable holding a modifier for the lum values of all colours used. There's a luminance, and a lumTarget. All I do is set lumTarget to -15 for a fade to black, or to 0 for a fade from black and the rest is kinda automatic. I can adjust the speed, too.



Bomberman94

Fantastic effect - please keep this. And as I understand it right, it's cheap data wise.

Andrew Davie

#5
This one has been around for a while, but I've just rewritten it.  Prompted, actually, by the automatic rounded-corners on the dirt that I posted in this thread earlier.  The dogecoin "conglomerate" -- that is, they join together to form large blocks. The blocks chain-react when you mine them (also shown in this thread).

Up until yesterday, managing this conglomeration was a bit of a pain. Every tine I put a geodoge down on the board, I had to update its shape based on the surrounding objects. Since there are quite a few places where geodoge are placed down (when they move, when they are generated - and more), there was quite a bit of management of the shape.

After doing the video for the rounded dirt, in this thread, I realised that the geodoge could do that same. Rather than placing one of 16 different geodoge shapes on the board (depending on neighbours) -- all I had to do was put the single (static) geodoge on the board, and choose the shape to display at draw-time.

So, that worked - it does cost a bit of time in the screen draw - but worth it. The video shows a debug/diag version where I hold the joystick button to display what's on the board, and otherwise display the "conglomerate" version.  It's nice because I previously had a routine that had to scan through the entire board, fixing up the conglomeration characters. It wasn't exactly a fast thing.

So, to improve the speed I tried only updating in the visible screen. That kinda worked, but I had to calculate which board characters were visible and which not. Not a huge ask, but occasionally I'd see a "non-conglmomerated" column where I got that wrong.

This whole new implementation (realtime, during draw) fixes all of that messiness.



Here's the code that does both the dirt corners and the geodoge conglomeration...

void grabCharacters() {

    enum ChName p2;
    enum ObjectType type;
    unsigned char udlr;

    for (int col = 0; col < 5; col++) {

        p2 = GET(p[col]);
        type = CharToType[p2];

        if (Animate[type])
            img[col] = charSet[revectorChar[*Animate[type]]];

        else {

            if ((inpt4 & 0x80) && Attribute[type] & ATT_GEODOGE) {

                udlr = ((Attribute[CharToType[GET(p[col - _1ROW])]] & ATT_GEODOGE) >> POS_GEODOGE |
                        ((Attribute[CharToType[GET(p[col + 1])]] & ATT_GEODOGE) >> (POS_GEODOGE - 1)) |
                        ((Attribute[CharToType[GET(p[col + _1ROW])]] & ATT_GEODOGE) >> (POS_GEODOGE - 2)) |
                        ((Attribute[CharToType[GET(p[col - 1])]] & ATT_GEODOGE) >> (POS_GEODOGE - 3)));


                img[col] = geoDoge[udlr];
            }

            else
                img[col] = charSet[revectorChar[p2]];
        }


        if (Attribute[type] & ATT_PAD) {

            udlr = ((Attribute[CharToType[GET(p[col - _1ROW])]] & ATT_CORNER) >> POS_CORNER |
                    ((Attribute[CharToType[GET(p[col + 1])]] & ATT_CORNER) >> (POS_CORNER - 1)) |
                    ((Attribute[CharToType[GET(p[col + _1ROW])]] & ATT_CORNER) >> (POS_CORNER - 2)) |
                    ((Attribute[CharToType[GET(p[col - 1])]] & ATT_CORNER) >> (POS_CORNER - 3)));

            corner[col] = roundedCorner[udlr];
        }

        else
            corner[col] = _CHAR_BLANK;
    }

    p += 4;
}


Andrew Davie

Quote from: Bomberman94 on 14 Jul 2026, 05:25 AMFantastic effect - please keep this. And as I understand it right, it's cheap data wise.

Extremely cheap. Firstly, there are two variables -- luminance and lumTarget.  When luminance is zero, all colours are fully faded in. Luminance is modified every frame to move towards the value of lumTarget...

void adjustLuminance(int speed) {

    static signed char lumSpeed = 0;

    if (--lumSpeed < 0) {
        luminance = approach(luminance, lumTarget, 1);
        lumSpeed = speed;
    }
}

The way the SECAM/PAL/NTSC works is that internally every colour is NTSC - and so whenever any colour is used anyhwere in the game, it needs to be converted from NTSC to the correct TV colour format. That's done with a pretty simple colour = convertColour(colour).

unsigned char convertColour(unsigned char colour) {
    switch (tvSystem) {

    case _TV_SYSTEM_SECAM: {
        colour = secamConvert(colour);
        return colour;
        break;
    }

    case _TV_SYSTEM_PAL:
    case _TV_SYSTEM_PAL60:
        colour = TranslateColour[colour >> 4] | (colour & 0xF);
        break;

    default:
        break;
    }

    return adjustBrightness(colour);
}

At the end there - the adjustBrightness -- that does the fading, by adding luminance to the luminance of the required colour.

unsigned char adjustBrightness(unsigned char colour) {

    // Remember if iCC is operating, we will see blended colours (with black/no pixel)
    // So even if we set all white, we WILL see shades of grey.  So we can fade to black OK
    // But we cannot fade to white - only fade to bright.

    int lum = (colour & 0xF) + luminance;

    if (lum < 0) {
        lum = 0;
        colour = 0;
    }

    if (lum > 14) {
        colour = 0;
        lum = 14;
    }

    return (colour & 0xF0) | lum;
}


And that's basically it.  To fade in, I do...

    luminance = -15;  // start attenuated (== black) (not needed if already faded)
    lumTarget = 0;  // fade to non-attenuated colours

That's all you do, and the fade happens.  To fade out...

    lumTarget = -15;  // fade to fully-attenuated

So, yes, it's almost zero-cost to add a fade in or out anywhere in the code.

Andrew Davie

#7
Picking up (and dropping) objects is a very new addition. It changes gameplay completely. It's pretty cool, and quite intuitive with the controls. Video shows a fair bit of this in action.

Also seen a fair bit during the end of this video is the "screen shake".  That's done by redrawing the whole screen with a pixel offset; there is, of course, no hardware scroll/shake.



Bomberman94

New possibilities for gameplay and freedom of solving puzzles (if this is part of the future gameplay).
Only suggestion is to hold the astronauts arms up while he picks up a rock or similar. 

Have you thought about a nice and fitting name for our little hero?

Andrew Davie

Quote from: Bomberman94 on 15 Jul 2026, 08:28 PMHave you thought about a nice and fitting name for our little hero?

Well,it's "Mellon Husk" at the moment.

Bomberman94

Quote from: Andrew Davie on 15 Jul 2026, 09:06 PM
Quote from: Bomberman94 on 15 Jul 2026, 08:28 PMHave you thought about a nice and fitting name for our little hero?

Well,it's "Mellon Husk" at the moment.


Uhh reminds us of a person some like and many others not.

I searched for cute names of robots and stumbled over this:

https://www.wikihow.com/Robot-Names

Among the male robot names i found ,,Andrew" - what a interesting coincidence 😉

Andrew Davie

Quote from: Bomberman94 on 16 Jul 2026, 04:51 AMI searched for cute names of robots and stumbled over this:

It's a guy in a spacesuit, not a robot!

TIX

#12
How about ->  Captain Lance Thunderpants  ;D

Also, if you want, I can come up with some frames (in all directions) of the spaceman with his arms up for holding stuff !


Andrew Davie

Quote from: TIX on 16 Jul 2026, 06:36 PMHow about ->  Captain Lance Thunderpants  ;D

Yeah, nah.

QuoteAlso, if you want, I can come up with some frames (in all directions) of the spaceman with his arms up for holding stuff !

Yes please. I've done some placeholders, but would love for you to continue.
Also, because of the larger ROM, my plan is to use ALL of the original frames and more. I realise the reflection in the helmet bothered you - we can now fix that so it's consistent regardless of facing direction :)

Andrew Davie

Yeah, the "star swipe" is pretty unique.