Wizard's Fire -- an Missile Command style game

Back in 1984, I created the game “Wizard’s Fire” for a fledgling machine called the Macintosh. That game featured castles and dragons, but otherwise was similar to the Atari game Missile Command.

This game takes a different approach, but holds to the same basic idea. I plan to expand it to a complete game with upgradable towers, multiple defensive abilities, and those good old dragons, but I wanted to post this just to show the basics.

The time it took to code this from absolute scratch just setting on the couch with my iPad? About two hours. What a neat tool this is!

Sorry that each class is in a seperate link. I’m unfamiliar with gist.

https://gist.github.com/1384797
https://gist.github.com/1384799
https://gist.github.com/1384800
https://gist.github.com/1384801
https://gist.github.com/1384803

Nice. Hard! Needs a big “game over” when you die. :slight_smile:

Thanks.

I’m planning to get there. I’m trying to decide whether to code up my own simple little font for the limited characters I need, borrow the code generously provided for a more general solution, or wait for it to be included in the standard app.

And of course, the game won’t be quite so hard once you can fling a wall of shots. I’m planning on making it so that you can have as many active shots as you have towers, with houses upgradable to towers or other structures that improve the power of your shots.

Great! Just played it. It is pretty tough when you only have one active shot at a time.

Putting a screenshot here so others can see. (Side note: it’s much easier to do nice gradient skies now that Dylan has added the image class.)

Wizard's Fire

I fiddled a bit today and have multi-shot working, along with improved presentation and difficulty. I stored a series of temporary variables to route around the sound/random issue (not ideal, but it works) which cleared problems with missile clustering.

Not much left to do for the basic game but drag in a font and add scoring. Then on to some fun stuff.

This is the first time I’ve ever touched lua. There are just enough syntax quirks to keep me guessing, but the code is gradually getting cleaner.

Just got a chance to play your original version, very nice, brings back memories.

I’ll have a newer version up shortly. Multiple shots, level progression, scoring, etc. Starting to look like a game.

What’s funny: when I did the game on the original Mac, I had to sweat bullets to optimize the math using integers only and worry about cleaning up things a pixel at a time to cut down on redraws. On this version, I’m blowing away the screen on every cycle, playing with background images, and generally taking a brute force approach to the math. Despite this the iPad handles it neatly.

One of the biggest things I’ve had to unlearn from my old 8-bit programming habits is that compared to the old days, the ipad is blindingly fast. A lot of the old tricks - integer math, pre-calculating sin/cos stuff, and so on - are just premature optimization now, and not really necessary for smaller projects.

Yes, exactly. Table-driven logic, pseudo random ints, shift-left math… I bid them all a none too fond farewell.

Latest version now at Gist

https://gist.github.com/1418508

And more neatly, on Posterous…

http://devilstower.posterous.com/wizards-fire

Added for 0.3

– clouds that obscure shots on daytime waves after the first day
– a “comet” that launches missiles on night waves after the first day

Just about everything is in there I can think to put (at least until the next version of Codea) I think I may put this project to bed.

http://devilstower.posterous.com/wizards-fire-030

0.4 represents a fairly serious rewrite of the main loop, a complete re-do of the incoming missiles, and lots of touches to scoring, text, levels… you name it.

Still a couple of bugs to shake loose, especially around the start new game function, but the look of the game has definitely taken a jump.

http://devilstower.posterous.com/wizards-fire-040

Real nice update. I like the new look and feel.