★ APPLICATIONS ★ AIDE A LA CREATION DE JEUX ★ LASER BASIC ★ |
Laser Basic (Microstrad) | LASER BASIC (CPC Amstrad International) | LASER BASIC (Happy Comptuer) | Laser Basic (Amstrad Computer User) |
Chris Wood looks at an aid to programming from Ocean IQ Let me start by saying that Laser Basic is not just 'a', but the games writing utility on the market. Published and marketed by Ocean it is written by the Oasis software house, who are famous for their Forth based utility 'White Lightning' which appeared on the Spectrum and the CBM64. They are sure to become more famous with this program. There is a Basic compiler in the offing, which will enable your Laser Basic programs - and presumably your normal ones - to run even faster than they do now, and Amstrad Basic is not particularly slow at the present. Well, what do you get for your money? A huge video case sized box with two cassettes containing no fewer than twenty six between them. These are not all programs, and include several banks of sprites, showing the extent of the effort put into the package by the programmers. Of course, if you coughed up the extra few pounds you get a disc with the programs on. You also get a 128 page manual which details and explains the 200 or so commands. Although the box only says 464/664 the manual says 464/664/6128 and this is indeed correct, I suppose the box covers were designed before the 6128 was around, and it shows how long Oasis have been working on this project. The best advertisement for the program is in the sample demo which must run for some five to ten minutes, and really shows off the program - and the Amstrad. I was particularly impressed by the opening tune that plays while a message to 'Press a key' scrolled smoothly across the bottom of the loading screen. I never knew the Amstrad could make such sounds. Indeed all the tunes show off the sound capabilities very well, and it is good to see this deépartment has not been skimped, as it so easily could have been. Although Laser Basic is designed mainly to enable you to write platform games, this is not as limiting as it sounds. Platform games come in all shapes and sizes, and it is just as easy to write a shoot-em-up with Laser Basic. The platform game, being the most common format, has been used as the basis for most of the examples. Laser Basic is capable of doing whatever most sprite based games do. There are around 200 commands, divided up into eleven classes. Some classes do not have certain features available to other classes. This is sometimes because of the nature of the command - for instance, you would not need a FILL routine to run under interrupt - and sometimes for speed, for instance you would not need the collision detection on all your sprites in a game. If you designed your game so that none of the 'bad guy' sprites passed in front of anything, but your 'good guy' sprite was free to roam at will, then you only need to have the 'bad guys'checking if they hit anything, and if they do it can only be you that they have hit. This is a method used in many games, Jet Set Willy to name just one. Some of the classes of command will also not work in mode 2 (80 column mode) such as the command to print in front or behind something that is already on the screen. This is because in mode 2 there are not enough colours to show a difference, although these commands are very effective in the other two modes. Sprite control You can enlarge, flip and mirror your sprites, you can define a window on the screen and set them bouncing around inside it, in fact several windows and several sprites, animating as they do so. You can even define a window inside a sprite and get the window to scroll/mirror/flip/enlarge. Have you seen those games with little space-ship sprites with rotating bands of coloured lights? Define a thin window inside a suitably designed sprite and set it scrolling with 'Wraparound'i.e. what goes off one side comes on the other, and Bob's your uncle. There is also the very useful BILD instruction which is used for storing compacted screen data. It works by scanning through the data in one sprite which contains the shape of the screen. For every bit in the byte that is set it will print the second sprite in the appropriate place on the screen. Rather like a character designer, where you have a small version of the character and a large version of the character to work on, instead of just having a larger version of the character you could have it made of bricks, or stripy, and you could of course have any shape you wanted. If your screen layout wants to be more than eight blocks wide (the number of bits in a byte) you simply move the point that you start the BILDing from and expand the data from another sprite. In this way you can have very complex screen layouts in incredibly small amounts of memory. The sprites also have very sophisticated collision detection and pattern recognition. If you place a platform game type 'object' in front of a piece of background, it is still possible to pick out the shape of the object and recognise it, and sprites can check collisions with other sprites in the same way. All the collision detection is pixel perfect, none of this dying-before-the-monster-is-anywhere-near-you stuff. Although it would have been nice to have a simpler form of collision detection in case you want to do a shoot-em-up type game where pixel accuracy is not too important. Mini Basic There are just so many commands that it is impossible to list all their virtues, and I am sure that you would be hard pushed to find something that cannot be done with Laser Basic, in fact there are plans to publish a Mini Laser Basic which will only contain the most often used commands, and dispense with ones such as FILL which you would only use in designing a sprite or title screen, and ADDR which will give you the actual address of a command should you wish to put it in a tracking sprite or call the command from machine code - once you have got the address you don't need the command again. This Mini Basic will leave you more room to write your programs in, and when the compiler becomes available (soon) it will be very easy to write commercial quality software. One other thing that has been done to allow you the maximum memory available for your programs is for the data and programs to load without using a buffer. Programs don't need a buffer for them to load into before they are put in the right place in memory. This gives you an extra 4k to write in. The most limiting thing is that you design your sprites one character square at a time i.e. eight by eight pixels and then place them onto a workspace below the design area, to build up your sprite. It is a little like making a mosaic, and it is not easy to see whether one of your blocks will line up with what is already on the workspace until you put it there, so you would be well advised to at least design a rough sketch on some graph paper before starting work. When you have finished designing your sprite, you stretch a window around it and then lift the window containing your sprite off into memory, so it is easy to change the size of your sprites, as you just put them back on the workspace, add or erase bits from them, and then stretch a new sized window around them and store it away. The Animation part of the program - where you get to see if the frames you designed for your 'space creature' means he walks with a limp - was also a little unfriendly in that your creation would only animate at one speed, and that was too fast to really see if the frames of animation matched up. Again this could be easily changed by altering the Basic program, but it shouldn't really be necessary. The last program is a sound generator, and because of the infinite variety of parameters that you can pass to the Amstrad's sound chip, is not at first easy to use. With all the juggling of Tone and Amplitude Envelope parameters, and deciding whether channels should rendezvous, hold, or flush, you should first look at the examples of two of the tunes that are listed in the manual, with all the data for the three channels, so you can play with them in order to see what can be achieved. I must admit sound is not my strong point, but the four multi-voice tunes that play during the demo show just what can be done with a bit of perseverance. If you want to write a game, and don't have the expertise to write the machine code sprite handling, with the collision detection etc. or you just don't see the point in re-inventing the wheel and writing your own, then I would say go out and buy Laser Basic. Ask your local shop to run the demo. You won't walk out of the shop without a copy after seeing it. ACU #8602 |
|