Spectrum Progress #02
19 января 1997 |
|
Toolkit - An article about how to work the system to develop games Adventyurnyh "THE GRAPHIC ADVENTURE CREATOR".
Here goes, begun in the previous article, talking about the instrumental system THE GRAPHIC ADVENTURE CREATOR (GAC). (C) Andrey Morozov, 1997. Where you'll learn: - With the basic concepts, knowledge that is useful but to create programs in the GAC - With a main menu system - With the possibilities of the graphic editor system Topics BASIC CONCEPTS AND PRINCIPLE OF CREATION PROGRAM Any program, created in the GAC-e must be represented as a kind of space, divided into individual cells, zones, rooms, call it what you want, but after that I will use the term location. These locations may different purpose, and the anticipated size, but they have one thing in common above Property: All locations are the repository of a variety of things. It can be characters or inanimate items in the game, any information or conditional character in the help system. All of the above, when used in CREATOR-e, we called objects. We also have a common object Qualities: objects can be moved from location to location. In addition to the objects you can manipulate within a single location. This we will be devoted to a single occupation, but now extend acquaintance with the necessary concepts. Man, generating some action to objects, and simply - using GACe written in a program called Player (based on from the principle: "Our whole life - the game, and virtual life - even more so). But the programs are not mushrooms, they do not grow. The man who wrote that program, called AUTHOR. And now imagine himself a gambler, exploring, for example, a new adventyuru. If the way of you get up a rock, and you can not zashvyrnut it over the horizon (in the sense in the next location) do not be surprised that - she had a heavy! But by making certain changes in the program, you can would be a "juggling" dozens of similar rocks, like apples. Allow it to you, the player can author, changing the laws of the world in which You found themselves sitting down to play adventyuru. And to intervene in these laws can author, only changing the causal relationships in the program, what we shall call the program logic. Thus, the logic of the program allows the player act in certain ways in the created for him the world. Logic defined by the condition check the permissions of a player's actions. Conditions have their own hierarchy. There are three sets of conditions: - HIGHER TERMS - they are checked before others, before committing any Player action in the current location, just as he would be in it - LOWER CONDITIONS - these are checked after the Player of any action - Local conditions - they will be checked only in certain locations for them and from them depends on whether the player at all to change anything in this location Within each group, the conditions are checked by order of their entry into the program. More details conditions will be discussed in due time, when we learn the language of a logic program. Now you already know in general terms about what it represents was created in GAC-E program. Namely: - Inner space of the program is of locations - Program works with objects that are in locations with which you can interact - Interacting with objects is determined by the logic program Now listed items would be call the principle of establishing programs in the development system GAC. Need to add the limitations of such programs: - The program can be used only incorporated into it when creating the data entry of new data during its operation is not possible - The number of used objects, locations and other elements of the internal space program - limited But let you all this is not scary. The first limitation can be circumvented by running the program without leaving the system (we'll talk more about the advantages and disadvantages of this method) and the second restriction, you might not touch, because there are far more seriously limit: - Free memory for your system works leaves only 21K. It's actually too can survive, if you to create multiple independent program of a single plot. For example, it can be levels of the game (and not necessarily only adventyury) or thematic sections of the help system (If you know BASIC, you can even write menu for this system). Experience tells you new opportunities for GAC-a. Main menu GAC If you've seen the main menu in the original version CREATOR-a (at least in the same SPECTROFON-e), notice some differences in the Russified embodiment, an improved appearance. The choice of functions in the menu (as well as throughout system) by pressing the keys, respectively, the Latin letter to the left of function name. Some modes of the system have an additional menu in time, we consistently learn them, but so far only briefly acquainted with the main points. M E N U VERBS - to enter the dictionary commands prog Rummy ADVERBS - to enter the dictionary of additional commands Nouns - Enter the object dictionary OBJECTS - Enter the description of objects COMMUNICATIONS - text input, output program LOCATION - Enter the description of location V. CONDITIONS - Enter the conditions of higher AN CONDITIONS - Enter the lowest terms A. CONDITIONS - Enter the local conditions GRAPHICS - entrance to the operating mode with illustrations HOME - setting rates ranging launch prog FRAMEWORK RECORD - Save your work disk DOWNLOAD - reading stored data from disk DESTROY - release of all data GOVERNMENTAL ENTER - Launch the program without leaving the system Another is to say that in the upper right corner shows the number of free memory remaining in your possession. WARNING! Due located in the upper memory cells of the Russian font and programs to support the drive, shown at the top of free memory should be reduced on 2200 Bt. And now it's time to move on to work with the instrumentation system GAC. We'll start with the graphic editor system. GRAPHIC EDITOR OF GAC Input mode - pressing <G> the main menu. In fact, starting with the graphics, we have violated "Classical" scheme of establishing programs CREATOR-e, since images are always performed at least, using the remnants of memory. But we're not going to just do something great, and besides learning to draw in the GAC-E You already can get pleasure from his labor. Glyante to figure out RANSOM. Weak? A few words about the features of graphic Editor of the system. If you drew a sometime editor Art Studio or the like, then you will meet there are a lot of familiar things: the cursor graphic primitives, shading, texture and so on. But if the image created in the Art Studio, a holistic picture and also the whole stored in computer memory, the image created in the editor GAC-a, a a sequence of graphics commands specifying the coordinates of their application. This sequence of commands stored in the buffer DRAWING. Imagine that you have to draw a square, then top to draw a straight line and all a circle a circle. On the screen it's all so and will look like, but in the memory of your image will remain approximately in the form: end 3. command to draw a circle 2. command to draw a straight line buffer 1. command to draw a square Home Whenever the need arises to withdraw the picture on screen, will be consistently level commands from the buffer design. This method may seem inconvenient, but it has its advantages. So, we press the key <G> and we get into the editor. The road blocks we formidable question: NUMBER PICTURE? If you're scared, and press the BREAK, then once again find yourself in the main menu. But "we are not accustomed to retreat," so to request to respond by pressing <1>. Now consider the lower third of the screen. Left the right displays information about the current editor mode. Picture a pencil dropped on an imaginary surface of the paper (in the beginning he is shown raised), will tell you that the procedure for entering next graphics command is incomplete, then cursor position is not fixed by pressing the keys. This is a very useful indicator in the construction of graphical primitives (Lines, rectangles, etc.). To the right is an indicator of the color cursor so-called "ink". Next - indicator of the background under the cursor, the so-called "paper". Further, there are signs the cursor position on with respect to the lower left corner of the working part screen pixels (dots): X - horizontal Y - Vertical To the right, under the label BUFFER, write letters, corresponding to the latest graphical team performed from the buffer. On the edge, right, displays the figure number with which you are currently working. In total, you can create 9999 images, but in each location is placed just one illustration. You know it when we create a location. In the meantime, back to the editor. Cursor control by pressing the keys: relocation moving Pixel by familiarity 7 pressing the cursor keyboard May 8 6 Graphics commands. You can use the editor gave the command (by pressing the appropriate keys) that will be written into the buffer and immediately executed. I (ink) - the cursor to select the color ("black") P (paper) - choice of the background under the cursor ("paper") T - choice of color border B (bright) - choice of brightness levels: 0 - reduced brightness 1 - increased brightness 8 - does not affect the current V - Mode Selection flicker: 0 - off flicker 1 - the inclusion of flicker 8 - does not affect the current mode C (cursor) - show the cursor position G (grid) - show the location of familiarity D (dot) - put a full stop L (line) - draw a line: the first press - beginning of line second - end of line Incidentally, in the editor mode was implemented tips, called "rubber line" and you can see their lines, rectangles golniki etc. already in the process of constructing of. R (rectangles) - draw a rectangle: the first press - fixing one corner second - the fixation angle across the diagonal E (ellipse) - draw an ellipse the first press - the center of the ellipse second - fixing the form of an ellipse F (fill) - fill a closed surface of the CEE that S - to fill a closed surface texture A - paint the background of a closed surface M (merge) - Overlay other ri sunok whose number is entered upon request It should be clear that this team can be useful not only for image fusion (Eg, the use of repeating elements), but in that case, if the buffer of this figure is already full (has 255 teams). Then use MERGE command allows you to continue commenced in another illustration, if the lodge there is a command: <M> ... n, where n-number of the figure with buffer is full. Editor-in GAC-e would not be complete if would not be allowed to edit existing Image: Z - go to the top of the command buffer (back) W - move to end of command buffer (forward) s / s +5 - switch to a team back s / s +6 - 5 teams go to the back s / s +7 - go to 5 teams advance s / s +8 - to move one team ahead DELETE-delete the last command executed from the buffer (see indicator buffer) GRAPH-removal of all the teams before the end of the buffer from the subsequent command For example, the sequence of commands: <Z>, <GRAPH> completely clear the input image Using these commands you can in any order to view the process of creating the picture, remove the elements of the image (removing commands from the buffer), or make new ones. All your actions will be displayed on the screen. Note that the order of commands in buffer can affect the speed of construction images, as well as the memory footprint pattern (this is due to feature an image filling the color, texture, etc.) That comes to an end our first lesson. I suggest you do yourself home task. 1. Determine empirically how many bytes of memory consumed by each graphics command? 2. What features are filled with images of color, texture and background? 3. Draw in the GAC-e twelve signs of the Zodiac (Aquarius, Pisces, Aries, etc.), each character draw separate figures, numbered from 1 to 12. These pictures are useful to us in further, but that you learn in the next lesson. Good luck, see you soon! *
Other articles:
Similar articles:
В этот день... 21 November