Just a minor detail...

General software. From trouble with the Banyan Tree to OCP Art Studio, post any general software chat here. Could include game challenges...
Post Reply
User avatar
Juan F. Ramirez
Bugaboo
Posts: 5137
Joined: Tue Nov 14, 2017 6:55 am
Location: Málaga, Spain

Just a minor detail...

Post by Juan F. Ramirez »

... that I found while playing Atic Atac:

This is the starting room:

Image

If you see the ACG helmet down left, we can see it has the letters ACG printed on it, but in a way according to the perspective of the whole screen, but if we turn the screen around, the helmet in particular, it is shown this way:

Image

but the correct position of the helmet on that screen should have been this:

Image

Ok, ok, I know that's a silly thing, but it's surprised me knowing how meticulous Ultimate were.

I thought I should share it! :mrgreen:
User avatar
stupidget
Dynamite Dan
Posts: 1644
Joined: Wed Jan 24, 2018 2:09 pm
Location: Sunny Wolverhampton

Re: Just a minor detail...

Post by stupidget »

If we're going to meticulous about things, that's actually a shield and not a helmet :D
User avatar
bluespikey
Manic Miner
Posts: 954
Joined: Tue Jun 30, 2020 3:54 pm

Re: Just a minor detail...

Post by bluespikey »

Bit anal, but a bit odd too. In the game, the barrels with 1884 are all rotated correctly depending on which wall they are on. But the grandfather clocks aren't. Depending on which wall they are on, they either read 5 past 9 or 5 to 3.
User avatar
Juan F. Ramirez
Bugaboo
Posts: 5137
Joined: Tue Nov 14, 2017 6:55 am
Location: Málaga, Spain

Re: Just a minor detail...

Post by Juan F. Ramirez »

stupidget wrote: Thu Aug 03, 2023 8:32 am If we're going to meticulous about things, that's actually a shield and not a helmet :D
Sorry but back in the day, when my teacher of english taught the parts of an armor I had got the flu! :lol:
User avatar
Lee Bee
Dynamite Dan
Posts: 1297
Joined: Sat Nov 16, 2019 11:01 pm
Location: Devon, England
Contact:

Re: Just a minor detail...

Post by Lee Bee »

Image
User avatar
HEXdidnt
Manic Miner
Posts: 224
Joined: Thu Mar 09, 2023 2:40 pm
Location: Harrow, London, UK
Contact:

Re: Just a minor detail...

Post by HEXdidnt »

Interesting... So the shields are vertically mirrored rather than rotated. Presumably that's easier to do in code, to save graphical memory? I'd guess the same would be true of the clocks: draw two orientations, flip for the other two, rather than draw one and rotate 90°, 180°, and 270°.

The other thing is, aren't the ACG shields all pointing toward the exit? If so, flipping rather than rotating keeps the arrow pointed in the right direction.
...Dropping litter in the zen garden of your mind

The Hub of all things HEXdidn't... | HEXdidn't... on YouTube ...on ZXArt ...on deviantart
User avatar
Alessandro
Dynamite Dan
Posts: 1910
Joined: Wed Nov 15, 2017 11:10 am
Location: Messina, Italy
Contact:

Re: Just a minor detail...

Post by Alessandro »

Juan F. Ramirez wrote: Thu Aug 03, 2023 8:10 am ... that I found while playing Atic Atac:

This is the starting room:

Image

If you see the ACG helmet down left, we can see it has the letters ACG printed on it, but in a way according to the perspective of the whole screen, but if we turn the screen around, the helmet in particular, it is shown this way:

Image

but the correct position of the helmet on that screen should have been this:

Image

Ok, ok, I know that's a silly thing, but it's surprised me knowing how meticulous Ultimate were.

I thought I should share it! :mrgreen:
Congratulations. I already noticed that in 1984. (And as already noted, it is a shield, not a helmet).

Well, better late than never... :P
AndyC
Dynamite Dan
Posts: 1408
Joined: Mon Nov 13, 2017 5:12 am

Re: Just a minor detail...

Post by AndyC »

HEXdidnt wrote: Thu Aug 03, 2023 11:21 am Interesting... So the shields are vertically mirrored rather than rotated. Presumably that's easier to do in code, to save graphical memory?
Yeah, vertically flipping an image is easy - you just draw rows of bytes in the "wrong" order. Whereas rotation or horizontal mirroring is a little bit more involved.
User avatar
Pobulous
Dynamite Dan
Posts: 1366
Joined: Wed Nov 15, 2017 12:51 pm

Re: Just a minor detail...

Post by Pobulous »

bluespikey wrote: Thu Aug 03, 2023 9:28 am Bit anal, but a bit odd too. In the game, the barrels with 1884 are all rotated correctly depending on which wall they are on. But the grandfather clocks aren't. Depending on which wall they are on, they either read 5 past 9 or 5 to 3.
Barrels are wrong as well - backwards on the bottom and right wall, according to the map in the database.
Ralf
Rick Dangerous
Posts: 2289
Joined: Mon Nov 13, 2017 11:59 am
Location: Poland

Re: Just a minor detail...

Post by Ralf »

I guess it applies to more global problem with mirroring objects in old games.

Let's suppose you have a sprite of guy with a gun. He's facing right.
So how to obtain his sprite facing left? You say mirror it. Easy, isn't it?

Not so easy. If you mirror a guy with a gun in his right hand, in the mirrored version he
will have his gun in the left hand :)

Yeah, most people won't even notice it but to do it legit, you would have to keep two different sprites
because mirroring isn't enough here.
User avatar
Joefish
Rick Dangerous
Posts: 2059
Joined: Tue Nov 14, 2017 10:26 am

Re: Just a minor detail...

Post by Joefish »

Ralf wrote: Thu Aug 03, 2023 6:09 pm If you mirror a guy with a gun in his right hand, in the mirrored version he
will have his gun in the left hand :)
That's why everyone in Dark Sceptre carries a sword in both hands:
Image

Though it got more interesting in The Legend of Zelda: Twilight Princess. Since Ocarina of Time we've seen that Link is clearly left-handed, wielding his sword in his left hand and holding his shield on the right. But in moving production to the Wii, with most people holding the 'Wii-mote' motion controller in their right hand, they had to mirror him. So they ended up mirroring THE ENTIRE GAME, map and all, just to put the sword in his right hand. The Wii-U HD update had the original left-handed version, with the mirrored Wii version provided as a harder 'Master Quest'.

No-one ever bothered to put a 'binary mirror' operation on the early 8-bit chips. Without it, it's quite a slow operation to shift one bit at a time out of one byte and into another in reverse order. But the ARM chip, and the virtual Z80 in the Next, has such an instruction.

Typically if sprite mirroring is done 'live' in a game (rather than being pre-stored), there'll be a table of 256 bytes on a page boundary somewhere in memory. You use a byte value to index into the table, then read off the byte that's there. It can be fairly quick, as the high-byte of the address of the lookup table is always the same. To balance things out, the sprite may be stored mirrored on alternate lines, with two sprite drawing functions, one to copy the odd-numbered lines and mirror the even-numbered ones, and another function to do the opposite. That means the sprites take just as long to draw whichever way they're facing.

All the major sprite-based 8-bit and 16-bit consoles had the ability to display mirrored sprites and even mirrored background tiles. The C64, despite being able to display sprites doubled in width and/or height, and being able to display them 'behind' the screen (i.e. only showing through where screen pixels are the global background colour), didn't have 'mirror' option flags for its sprites.
User avatar
bluespikey
Manic Miner
Posts: 954
Joined: Tue Jun 30, 2020 3:54 pm

Re: Just a minor detail...

Post by bluespikey »

Ralf wrote: Thu Aug 03, 2023 6:09 pm
Yeah, most people won't even notice it but to do it legit, you would have to keep two different sprites
because mirroring isn't enough here.
You've started something now. The only games I can think of with properly reversed sprites are Fairlight and Laser Squad.
User avatar
Joefish
Rick Dangerous
Posts: 2059
Joined: Tue Nov 14, 2017 10:26 am

Re: Just a minor detail...

Post by Joefish »

bluespikey wrote: Thu Aug 03, 2023 8:19 pm You've started something now. The only games I can think of with properly reversed sprites are Fairlight and Laser Squad.
If you look at the Warrior in Gauntlet, his axe is always raised to his right shoulder, whichever direction he is walking. No mirroring there.
But just because a game might have a 'handed' character that changes when it's mirrored, that doesn't mean it's doing the mirroring live. It may just have been lazy sprite design and it's actually stored both ways.

Often sprites need to be pixel-shifted before drawing, and doing that live is slow too. Far quicker to store sprites pre-shifted to 2-pixel positions, for example. And then there are animations, some of which may be keyed-in to the horizontal pre-shifting, but you can't really do that if they have to match up with a scrolling background. So there may be live pixel-shifting and mirroring going on, or the whole lot may be prepared and stored, resulting in tons and tons of sprite data.
User avatar
bluespikey
Manic Miner
Posts: 954
Joined: Tue Jun 30, 2020 3:54 pm

Re: Just a minor detail...

Post by bluespikey »

Er, this might be a 'Father Ted explains perspective' moment, but.....

Looking at the Atic Atac disassemblies, each wall furniture is stored once in its north position. So some sort of rotation must be taking place.

But looking at these four sample rooms :

Image

The bookkshelf is purely flipped once about its vertical so that the cyan book is always at the west end of the bookshelf. Fine, just like the ACG shield. But the barrel is then flipped again across the horizontal correctly, isn't it? So the 1 is at the west end on the north barrel, but the east end on the south barrel. So why is the barrel right but the booshelf isn't?
AndyC
Dynamite Dan
Posts: 1408
Joined: Mon Nov 13, 2017 5:12 am

Re: Just a minor detail...

Post by AndyC »

I'd put money on there being two versions of the barrel in an attempt to get it to look correct in both orientations. Probably didn't bother with other objects as they looked ok regardless.

Would need to dig through all the game memory to be sure though.
worcestersource
Manic Miner
Posts: 530
Joined: Thu Feb 03, 2022 11:05 pm

Re: Just a minor detail...

Post by worcestersource »

This sort of stuff fascinates me. The thought and processes that have to go into games makes them look simple but they’re really anything but.

I never really contemplated pixel shifting sprites back in the day but when I read about it in more recent times, it suddenly made huge sense.
User avatar
Pobulous
Dynamite Dan
Posts: 1366
Joined: Wed Nov 15, 2017 12:51 pm

Re: Just a minor detail...

Post by Pobulous »

bluespikey wrote: Fri Aug 04, 2023 12:15 pm Er, this might be a 'Father Ted explains perspective' moment, but.....

Looking at the Atic Atac disassemblies, each wall furniture is stored once in its north position. So some sort of rotation must be taking place.

But looking at these four sample rooms :

Image

The bookkshelf is purely flipped once about its vertical so that the cyan book is always at the west end of the bookshelf. Fine, just like the ACG shield. But the barrel is then flipped again across the horizontal correctly, isn't it? So the 1 is at the west end on the north barrel, but the east end on the south barrel. So why is the barrel right but the booshelf isn't?
Now I'm confused - in that map some barrels are correctly rotated and some are not - particularly on the East wall.
User avatar
Lethargeek
Manic Miner
Posts: 743
Joined: Wed Dec 11, 2019 6:47 am

Re: Just a minor detail...

Post by Lethargeek »

Joefish wrote: Thu Aug 03, 2023 6:49 pm Typically if sprite mirroring is done 'live' in a game (rather than being pre-stored), there'll be a table of 256 bytes on a page boundary somewhere in memory. You use a byte value to index into the table, then read off the byte that's there. It can be fairly quick, as the high-byte of the address of the lookup table is always the same. To balance things out, the sprite may be stored mirrored on alternate lines, with two sprite drawing functions, one to copy the odd-numbered lines and mirror the even-numbered ones, and another function to do the opposite. That means the sprites take just as long to draw whichever way they're facing.
iirc 3 weeks in paradise mirrors ALL character gfx once that character changes his walking direction
this would only work if there's no more than one such character per screen of course
User avatar
bluespikey
Manic Miner
Posts: 954
Joined: Tue Jun 30, 2020 3:54 pm

Re: Just a minor detail...

Post by bluespikey »

Doing some digging, there isn't any code to flip the colour palette horizontally that I can see. So the ACG shield and the bookshelf is only flipped once, otherwise the colours would be out of alignment on the second flip. The barrel is flipped twice because its only yellow on black.

However, the grandfather clock is only cyan on black, so I don't know why that isn't flipped correctly too. Maybe the 1884 text would make the barrel too obvious that it isn't the right way round, but no one notices the clockface. Didn't help with the ACG on the shield though....

Disclaimer : I'm an idiot and don't know anything. Don't trust anything I say.
Post Reply