šŸ” Chicken Invaders 1 Remastered #10

Introductory sequence

I have been looking forward to this and also equally dreading it for the past few days. But first, some context. As you might recall:

So the ā€œcoreā€ is the CI1 mission itself, and the ā€œwrapperā€ is the CIU engine, menus, settings, introduction ā€“ basically anything except the core.

The introduction is part of the wrapper (*). The good news is that we donā€™t have the same strict remastering constraints as the core. We can take some creative liberties, back-port newer graphics from the episodes, plus we can run at 100+ fps (the core is always at 25 fps).

* In the original, the introduction uses its own independent rendering loop and its implementation is very ugly. So even if I wanted to keep it part of the core, I would still have to re-implement it from scratch.

The bad news is that the introduction is a cutscene, and cutscenes are typically very time-consuming to produce. There is no visual scripting, so everything has to be choreographed and synchronized with code. And everything is on a linear timeline, which means I canā€™t just randomly jump to an arbitrary point in time to view a particular cutscene segment (this is particularly problematic because the longer the cutscene becomes, the longer it takes to get to the most-recently added segments). Luckily I can speed up time within the engine, and I can also try to comment out large sections of code to ā€œget to the chaseā€ sooner (this doesnā€™t always work if there is a dependency on previous segments).

Anyway. Although we can do whatever we like for the introduction, I decide to keep the ā€˜plotā€™ and the ā€˜scriptā€™ of the cutscene exactly the same, but implement it using some fancier technology.

image

image

I take mental stock of the work ahead, and immediately decide to apply the ā€œprinciple of least effortā€ liberally. Iā€™m going to reuse pre-existing building blocks. Namely, the ā€œstar wars scrollerā€ (*) from CI3, the earth from CI4, the space burger graphics from CI4+. In fact, the only thing I ended up re-rendering for this introduction was the player spaceship (although I could have got away with re-using one of the frames from the mission)

* Although I did end up using the scroller as such, I did eventually decide that it didnā€™t look good enough when using the plain new white font, so I spend some time ā€œimprovingā€ it. Interesting how something that was supposed to save me time ended up costing me time. At least CI1 is now arguably better than CIU in at least one way.

The only thing noteworthy here is this scene from the original:

image

I donā€™t like this. Iā€™ve never liked it. What is this supposed to be? Invading chickens? Eggs? Guano? (*)

* Spoiler alert: Itā€™s re-used smoke frames.

Weā€™re not constrained by 1999 technology anymore, so letā€™s see how we can improve this. I come up with the idea of re-using the code from the CIU asteroid belts (*):

* Asteroid belts are one of the very few places in CIU where actual 3D calculations take place.

A small modification here, a little tweak there, et voilĆ !

image

Now THIS is a proper invasion!

Sound and Music

This quote says it all:

With regards to the music, however, I have decided to use 2dBā€™s excellent 120th Anniversary music track, which was expressly inspired by CI1ā€™s music, so it fits perfectly. The remaster also has an additional perk: The ā€œin-game musicā€ setting allows you select between continuing to play it during the mission, or complete silence (as in the original game).

Sound code was inherited from the CI2 remaster, which I see only has a 25% stereo pan (controlled by where on the screen horizontally a particular sound is emanating from) . Iā€™m not sure if this was intentional or a bug, but the CI1 remaster pans 100% regardless. (*)

* Will this be retro-fitted to CI2? Hmmā€¦

Odds and Ends

In no particular order, some other relevant notes about the remaster:

  • Uppercase letters Iā€™ve decided to keep all existing in-mission text strictly lowercase, as in the original. Any new text as well as anything in the wrapper uses uppercase letters, naturally.

  • Lives HUD. I have fixed the ā€œright playerā€™s lives extend outside the screenā€ issue. This appears to be an oversight in the original, since the code to right-justify the missiles is literally on the very next line ā€“ I just didnā€™t apply the same treatment to the lives for some reason.

  • Player 1 and Player 2. In the remaster, the left player (Player 1) is controlled by the mouse or the arrow keys, and the right player (Player 2) is controlled by WASD. This is the opposite from the original. I think the thought behind that decision was that when two players are sitting on the same computer, the left one (physically) would be using WASD and the right one the arrow keys. But it seems non-standard nowadays, so I flipped it around.

  • Visual Studio stale builds. I wasted some time trying to understand why my code changes would not appear in the game. Turns out that Visual Studio, even in 2022, has a nasty habit of unilaterally deciding not to re-link the .exe properly, resulting is stale builds. The easier way to detect this is to set a breakpoint in your new code. If the breakpoint is always shown as ā€œinactiveā€, then you need to clean the whole solution and rebuild.

  • Fader. Iā€™ve implemented a circular fader specific to this episode.

  • Reset scores. Iā€™ve added a ā€œreset high scoresā€ button in the options menu.

  • Cheats. Oh, yes!


Next part in the series

Start at the beginning

24 Likes

Honestly when I first saw this as I was young I thought it was SNOW.

3 Likes

So what do you have left?

Can you add options look like volume , share lives , original music etc