pouët.net

Bock's birthday 2003 by SMS Power! [web]

Bock's Birthday 2003

by Maxim

25/11/2003

Alternative title: Copyright Violation Episode 2: Attack of the Clones

This year I planned well in advance!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This readme contains spoilers! Run the demo in its entirety first! !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

This demo was coded in whatever spare time I could find throughout
November 2003. The hardest part was trying to get an idea for it. In the
end, I failed and ended up recycling whatever lame ideas I'd had
rattling around for ages.

So... how to make it better than last year's? First, I wanted music. But
I have no talent and a music engine is really hard to write. I had
theorised that since most games' music engines are self-contained in a
single bank, isolating one would be quite easy - and it was. 

Copyright violated: Ys, Falcom, Sound Team JDK, et al

Next, I decided to put into practice something I'd coded ages ago - I
took the decompression code out of Phantasy Star, teamed it up with the
matching compressor which I wrote last year, and hey presto! compressed
graphics.

Copyright violated: Phantasy Star, Sega (compression library used in
many games)

Bock had been asking to see photos of my trip to China in September,
which is a problem because my darling wife hates for anyone else to see
her photo. I'm not particularly comfortable with people seeing me
either. One possibility was for me to publish some photos in the form of
an SMS demo, since low-resolution 16-colour pictures are pretty
indistinguishable so we can maintain a sense of anonymity. So, the first
thing I did was convert a photo. Error diffusion gives better colour
representation but almost makes the compression much less effective :(

Copyright violated: Xiao

The next thing a demo needs is some text display. The ideal thing would
be a scroller, but I didn't feel like getting to grips with line
interrupts, so the next option was sprites floating over the images. I
had some ideas for complicated mathematical motion algorithms for it,
but they didn't pan out. Sprite-based text is tricky because of the
limit of 8 sprites on a line, hence the short lines and lack of long
words. Of course, I wanted a nice font, so I looked around at lots of
games. So many use the boring old Sega/Namco font, but in the end I
suddenly saw a couple I liked in Pete Sampras Tennis. I did a bit of
work to make a lowercase set too, so that part's my own, but the rest is
copied...

Copyright violated: Pete Sampras Tennis, Codemasters

At this point I has stumped for any ideas to continue. I put it to the
residents of #smspower, hoping for some inspiration from them, and they
totally failed me. Ah well.

Copyright violated: none!

So, back to my lame old ideas. How about Zero Wing? I'd considered, ages
ago, converting the intro to the SMS since it's (relatively) feasible on
the SMS. As it turns out, it's quite tricky to get a decent conversion
down to the SMS's graphics, but I think I pulled it off OK. I tweaked 
the text a bit to make it (kind of) relevant, although the joke is 
admittedly lame.

Copyright violated: Zero Wing, Toaplan

I wanted to signify the location of Paris, so I eventually managed to
get Where In The World Is Carmen Sandiego?'s random number generator to
let me go to Paris and steal that. A bit of image editing later, and I
had Paris out the windows of the Zero Wing ship :)

Copyright violated: Where In The World is Carmen Sandiego?, Parker Bros.

I also put in the South Park Bock picture, which Bock posted ages ago. I
had experimented with making an SMS South Park Studio, but the palette
has such lousy skintones, I gave up. I tried to do something with
dithering for Bock's picture but it's not ideal.

Copyright violated: South Park, Comedy Central
Copyright violated: Bock

My next tangent was a sample player. How about having the voices and 
pictures of SMS Power regulars wishing Bock "bon anniversaire"? So I 
wrote a sample player. Unfortunately, it worked terribly on eSMS and 
Meka, but perfectly on a real SMS. I emailed Martin about it and he
fixed eSMS admirably, but I could hardly email Bock about it - it'd
spoil the surprise, and he'd never have time to fix it quickly enough
anyway. So that fell by the wayside, which probably helps since I'd
have to code up some compression/ decompression for it anyway.

So, I had pictures and I had text. That's all very well, but ultimately
it's more Bock's Birthday 2002.1, not a full 1.0 version increase. What
this demo needs is an actual game!

So which game? I'd had ideas floating around... Bomberman... Pong... a
shooter (the script had lead me to being on the way to destruction of
*something*)... hmm. Bomberman is (kind of) taken by someone else...
Pong is either easy to code and dull to play, or hard to code and mildly
fun to play. In the end I was sat there playing the crappy games that
come with Windows, and just for the hell of it settled on Minesweeper,
since I thought I was pretty good at it. (I checked out some Minesweeper
websites, it turns out I'm not.)

Copyright violated: Minesweeper, Robert Donner, Curt Johnson, Microsoft

Now, it's actually a lot trickier than it looks, especially some of the
more advanced parts like the automatic clicking when you open an "empty"
area. I may well be the first person to code a deeply recursive
function on the SMS, which is fun since I massively overflowed the
stack. A bit of tweaking later, and it was working - it was really just
the debug builds with very few mines that had the problem anyway, but
it is always good to learn. I needed a random number generator; I
already had one from my Chip-8 interpreter, but I thought I'd maintain
my course and stole one I knew the location of...

Copyright violated: Phantasy Star, Sega

Anyway, that was a whole heap of frustration, but in the end I got it
working acceptably. It's horrible to look at; some kind of planning is
obviously useful with complicated projects - and this was just a little
Minesweeper clone. I figured out a way to tie it in with the script, and
wrote a traditional game plot to join them up. Of course, this was where
I got Mario into it...

Copyright violated: Mario, Shigeru Miyamoto, Nintendo

Once I'd got that working I put in some more stuff, like graphics and
sound effects (it turned out sound effects had come along with the Ys
engine so I made some use of them). For the mine explosion screen I used
the NiseSonic font from that nice Japanese Sega fonts website, the same
as I used for the SMS Checker splash screen; I'm pretty sure I'm
supposed to ask for permission to use it, and I'm confident that one day
I will.

Copyright violated: The Japanese guy who made the font

Still, the explosion screen showed up a bug in BMP2Tile so I fixed that. 
Next, I wanted to do something when you won the game. I settled on a 
sound test, since the real star of the demo is the music. (I hope you 
turned on FM emulation, it's even better.) One more wedding photo, a 
deep breath as I expose my pixelated self to the world, the second font 
I'd ripped out of Pete Sampras Tennis, and that was done. I couldn't
find the names for two of them tracks, please don't bother emailing me
about it.

Copyright violated: Xiao, Ys, Pete Sampras Tennis, and me!

Can I violate my own copyright? Ah well, I just did. However, I'd still 
left a big hole in the plot; Minesweeper with Marios is kind of 
illogical at best, so I needed to tidy up some loose ends in the plot. 
It occurred to me that I could neatly violate one more copyright by 
taking that picture that used to be what you saw when you tried to see 
the SMS Power museum, the one with Mario with a load of guns pointed at 
him. However, I couldn't find it. Again, I was faced with a problem that 
could easily be solved by contacting Bock, but that was out of the 
question. Then I remembered having seen some of the artwork drawn by tet 
- a regular in EFNet #smspower. It's deeply disturbing, but since what I
wanted was an image of multiple cloned Marios being killed, it's also 
ideally suited to this. Soon after, I had my first non-violation...

Copyright not violated: tet

A lot of testing, and some WLA DX bugfixes, later, I got to the end of 
it. What have I gained from this? Well, I am now more sick of Zero Wing
than I was at the height of All Your Base mania. I could go a few years 
without playing Minesweeper. And I've wasted all my doing-other-stuff-
like-updating-the-VGM-archive time.

Bah.






Source is not included because it ended up quite bad.

Tested on a real SMS and it works - mostly (some graphical glitches when
you lose the game, nothing serious).