Power Add-Ons for GFA BASIC
3-D graphics plus a treasury of turbo routines
GFA BASIC BOOKGFA BASIC is one of the most widely used languages for the ST, particularly by hobbyist programmers. This inexpensive ($79.95) language is Antic's first-choice BASIC for ST program listings. It provides a full-featured, structured programming environment with excellent GEM support and execution speed. Several add-on programs have been released in the series including a compiler and support for vector graphics. The only real shortcoming has been a lack of information besides the terse users manual.
Now the GFA BASIC Book ($39.95) goes a long way to fill this void, with a 306-page collection of tips and sample programs. It comes with a single-sided disk containing the samples described in the book. Author Frank Ostrowski certainly has the necessary credentials, since he wrote GFA BASIC in the first place.
The book is intended for mid-level programmers those who know standard BASIC and want to learn how to use the advanced features of GFA BASIC. Although beginning programmers will find the book useful, particularly for graphics and sorting, the main thrust of the book is how to make use of system calls to GEM and GEMDOS functions. These discussions assume some preliminary knowledge on the reader's part and will need to he supplemented by more elementary ST reference books such as those in the Abacus series.
Topics include code optimization for speed, graphics and sound, accessing disk files, recursive programming and dealing with .RSC files. All are written clearly with numerous code examples. Missing from the book is a discussion on effective use of blocks for structured programming which can be a problem for those used to "spaghetti-code" BASIC implementations.
Sample programs on the disk include routines for using the sound chip, creating dialogue boxes, accessing disk directories, screen flipping and scrolling, loading screen fonts, sorting and including assembly code within a GFA BASIC program. Another set of programs deals with GEM and GEMDOS applications such as creating multiple windows, building slider boxes, making icons and dealing with the resource construction set. JIM PIERSON-PERRY
GFA VECTORIf you've played games like ST-Wars, Star Glider or R.P.V., you know how exciting 3-D graphics can be. However, 3-D graphics require powerful computer processors and large amounts of memory to display them. To create a 3-D application requires extensive knowledge in programming (usually a high-level compiled language or Assembly) and strong math skills. Until now, the only feasible hardware solution was a mainframe system. But with the introduction of the 16-bit personal computer, 3-D graphics are now possible. However, the software required to display and manipulate the 3-D objects is still complex.
GFA Systemtechnik, makers of GFA BASIC, the most powerful BASIC for the Atari ST, have done it again. GFA Vector ($49.95) is a utility package that creates and manipulates 3-D graphics.
The GFA Vector package comes with a 43-page manual and a disk containing the utilities. The manual takes users step-by-step from object creation to using the finished objects in their own GFA BASIC programs. The manual explains how to create 3-D objects in two ways, with numerical input or the graphics editor. Numerical input consists of entering the x, y and z locations of every point of the object and the connecting lines between those points. The graphics editor lets the user draw the top, side and front views of the objects, making sure that selected points match in at least two of the three windows. I found it easier to break out the pencil and graph paper, design my objects and enter them numerically.
After objects are created, they can be manipulated in the user's GFA BASIC programs. Four files make up a GFA Vector application. The module file contains the actual 3-D routines called in the program. The disk contains a series of module files not clearly explained by the manual.
Second file is your GFA BASIC program or GFA Runtime program. If you plan on giving your application to others, make sure you use the runtime program. The users file must be merged with the install.lst file on the GFA Vector disk. The install.lst file contains the major call routines that the user will be activating. The final program is the object file containing the created 3-D objects. Double-clicking on the module program will start the application.
Watching a 3-D application written in BASIC can be a painful experience. But the GFA Vector program updates complex 3-D objects in a smooth, real-time fashion. Only when the zoom factor is high and the object very large does the display slow down. I created a program that flew through the 3-D environment. By increasing the Zoom increment rate I achieved speeds close to Star Glider. Not bad for a BASIC program.
Manipulating objects is straightforward. The user only needs to call a particular array with the proper variables and the object or objects are updated. For example, Scale %(1)=32 would set the size of object 1 to 32. A For/Next loop could be used to make the object move closer or farther away from the user's perspective. Some other possible calls are object selection, object color, object position and object rotation. In addition the user can draw the objects in or mode or xor mode, send picture data to alternate screen pages and then switch the data in those screen pages.
The GFA vector package is a great addition to any GFA BASIC programmer's library. It is also a must for anyone who is interested in 3-D graphics. My complaints are few, GFA Vector objects can be displayed in wire-frame mode only, I would have liked the ability to create solid objects, even if the refresh rate is slow.
An object can be rotated around an axis center. However, rotation around an arbitrary point is not available. The ability to create my own call functions would be nice. And finally, an additonal utility should be included to convert the four support files into one file and/or compile the .bas file and remove the need for the runtime program altogether. All in all, GFA Vector is great. If you enjoy playing Flight Simulator, then pick up GFA BASIC and GFA Vector and make your own 3-D simulation. SCOT TUMLIN
MichTron 576 South Telegraph Pontiac, MI 48053 (313) 334-5700