home *** CD-ROM | disk | FTP | other *** search
/ AMOS PD CD / amospdcd.iso / 551-575 / apd570 / bomber / bombertutorial_page1.asci < prev    next >
Text File  |  1978-01-13  |  5KB  |  23 lines

  1. AMOS NEWSLETTER EDITORS - PLEASE NOTE!
  2. THIS ARTICLE IS A RE-PRINT FROM THE AUSTRALIAN AMOS NEWSLETTER AND
  3. CHRIS MAGUIRE AND SHOULD BE CREDIT TO BOTH IF YOU PLAN TO USE IT
  4. IN A PUBLICATION OF YOUR OWN. THANK YOU.
  5.  
  6. KIND REGARDS,
  7. WAYNE JOHNSON.
  8.  
  9. AUSTRALIAN EDITOR.
  10.  
  11.  
  12. A GAME TUTORIAL
  13. Here is a program written from scratch, from a beginner's point of view.
  14. As a programmer, I'm about your average doodler. Enthusiastic, but when I see the miracles coded by Wayne Johnson, Jason Hutchens, 10-liners, et al, I get a bit disheartened. "I wouldn't know how to think that out". I've done  bits of `education' programs for the kids, but as for games, how do you think one up? They've all been done by experts. But an arcade would be nice.
  15. Wayne gave us a tutorial in ACAR about twelve months ago, but I've seen nothing else, until I bought Stephen Hill's `Amiga Game Maker's Manual'. (A local book shop ordered it in for me). A brilliant read - and read, and read. It made my head spin with facts and ideas.
  16. From my Microbee, I remembered a little game called BOMBER. The letter `X' (the Bomber) traversed the screen gradually descending. Press a key, and it dropped the letter `I' onto rows of letter `H' (the City) which, if hit, silently disappeared from the screen. You had to `bomb' the lot to land safely, else if the Bomber hit one of those remaining, it disappeared with a faint `Plop' - You're Dead. Something like that.
  17. I wanted a REAL bomber, dropping REAL bombs, with REAL explosions, KABOOM, KABOOM, KAB@#$%BOOM. So here it is. (A doddle for programmers, I admit, but probably not for learners). There's enough scope for an enthusiast to enhance it considerably.
  18. Two points before I proceed - there is a bit of AMAL, so the program will not run in Easy Amos. Also, for convenience, I opened a drawer called `Bomber' on my disk with MakeDir and put the program, background picture and sprite bank, all into it.
  19. So, what do we need? A background for a bit of colour, the images in a bank, and the program to bring it all to life. (Stephen Hill recommends Bobs and sub-routines rather than Sprites and procedures. Who am I to argue!)
  20. IN DLP
  21. First, the picture. Lowres, 16 colours will do, on a 320 x 256 screen. Coordinates on. Think out your colours carefully. I chose a range of browns for the background; dark brown at the top of the sky descending to a pale dusty pink! I drew a straight horizontal line (hold down <Shift>) across the screen at Y coord 230, as the base for the `city' to sit on. Then filled the screen above the line, not forgetting (after selecting the Fill tool) to hit F10 to hide the Tool Bar temporarily. Else you don't get a full screen of colour in AMOS. Next, press `J' on the keyboard for the spare screen. On it can be designed, say, a moon and the BOMBER title, picked up as brushes, `J' again, and plonked down at the top of the picture. There you have an evening sky, albeit a brownish one. It remains to choose a couple of light colours to freehand some faint mountain ranges rising from your Y=230 baseline. Save this as BomberBgrdIFF.Amos in your Bomber drawer. That's one done. Easy, eh?
  22. Now for the Bobs. If it has gone, load your background picture again. Clear the screen, and you are left with the palette you need. For the image bank, we'll need two views of the bomber, one facing right, picked up as a brush and flipped to face left - Images 1 and 2. (Leave adequate space between them for a clean grab later). Next, the bomb; simply 6 vertical pixels in white - it is surprising how big this appears when it falls - Image 3. For the buildings, we'll make 4 images, each based on a simple bar 8 pixels wide and 16 long. The lowest of these (in our program) will be dark brown with, say, a couple of `windows' painted on (not background colour 0) - Image 4. On top of that will be the same, but in a slightly lighter colour. A few `windows' again, and this time, say, two pixels near the top in colour 0 to let the light shine through - Image 5.The next two Images, 6 and 7 will be basically the same, but each `sculpted' at the top for a bit of variety, eg: one like a tower. There can be more `windows' in colour 0 in these. A point of interest (bear in mind I had not altered the Hot Spot, so it was still at the top left of each Bob) - even though I had `sculpted' images 6 and 7, and there was no pixel, the hot spot was still deemed to be at top left. Important, the Hot Spot.
  23. The best description I can give my explosion images is `flatulent'. I borrowed some nice bold ones from Extras:aliens, enough to mix for two different explosions (see later).