(C) DEMON / XPC / CPU
GAME MAKING
"Video Games - a way of expressing
the most fantastic ideas and images.
Many people simply need an outlet for
embodiment of their insane fantasies ... "
"We believe in our illusions, sometimes escaping into them
from the terrible reality. Video games are a way to allow
people to at least for a time become gods of their small
universes. "
André La Motte
"Secrets of game programming"
Thus, the epigraph, you, dear spekmen,
already read, and if he do not understand,
then from then on you can not read. Since
we here will focus on creating games rather than
strumming in either game.
I hasten to agree that
My mysleizlozheniya be understood only
as one of the points of view.
Not so long ago to our office came
letter was the following question: "Why is your magazine is not
on creating games?" . Really - why? In mainly because they
write about is creating the game as they go, how to break ...
and rare material about the decision
different problems when creating their games.
From my limited experience I can say that a lot of
problems ...
The first is the question of what
game, I (we) want to do, and what I would like
in her view, and what is not. Want something
many, but not much depends on the level of
preparedness and capacity development machine. Already unlikely
that anyone will surpass Mednonogova glory in creating
strategies or SYSTEM 3 for its colorful game
"MYTH".
First determine its
opportunities and desires, then working out a compromise
between them.
Time ... Eternal problem of the lack of free time. If you
study, You then finishes off all sorts of diplomas,
coursework, and so on and so forth, but still want to walk. If
you work, then after there is no desire to work fully with all
chegoto do, even though people are really
enthusiastic, it is not a hindrance.
So, plan time to work on
Project: In the evening, on weekends or even
As ...
We do not know where to start! Here I
speak only for coders. The first thing to establish basic
bibleotek program that is to say: vyvodilki sprites pechatalki
texts oprashivalki Claudia and mouse, loaders and zapisyvalki,
listalki memory, etc., ie, that without a doubt will be in our
game.
In the first stage we will have already
decide how to interface with the user
(Takes less than 30% of the total time
creation of the program) and now it will be
one of the vexed questions for you.
There should be special treatment, since
must adhere to already established definitions. Well, for
example, would be a good voice, if we do support Kempston Mouse
and redefining control keys (or at least support the Sinclair
and QAOP + Space). And, of course, good idea to add
anything that way, that we popypalis
done in the "FULL SHIT". True to the last moment, none of us
could not imagine how it will work and look ...
Once we do (or choose a ready-made in many electronic
editions) protsedurki, we begin to think about
Basically: the main program module, which for each game will be
his. Since I did a quest for me was the main
output locations, items and characters in it,
and the management of a hero. For example,
for some BATTLE COMMAND it will work with 3D objects and
various otsekalki ray projection vyvodilki ...
Consider still the example of "FULL
SHIT Demo-version ", what and how I was doing.
1) Until the ANT and VANIAC (GFX-makers)
graphing, I rivet protsedurki for
game (see above). After the first
Scrin, I decided to use both screens
Speck, since the screen without the 4 upper rows
occupied 5120 bytes. 4 upper rows were
made static is not random, but for
synchronization of the beam. After a canopy of
lotions on the interrupt to the game screen there are only
about 1000 cycles (at Scorpion). After I was sorry about what
has not use a buffer and two screens, but
It was too late ...
Quickly making a drawing of location:
1. screen at LDI, LDI, LDI ... LDI
2. sprite objects on top of the mask
3. sprite of the hero
4. sprites other objects by mask
2) I made a wretched management hero
by klava R, L, D, U. Drove procedure
walking (specified number of steps and
direction, and the table she brings the necessary sprites
walking and does shift the origin), decided to take the user
interface.
Zabatsal conclusion hands almost without twitching Border
during its motion (no dekranchennyh sprites) and did a survey
Claudia and mouse, not being able to check entu most mouse. The
problem appeared, when it was necessary to toggle the visibility
screen. I stepped out and switch it can not
interrupts, and after HALT'a. Because of what
there were bugs spoiling the game screen
arrow and the arrow appears in the ghost
movement thereof. Therefore, the council:
- If you work with two screens, and
you have something displayed in the interrupt, then the screen
will switch at the beginning of the interrupt, for example:
;----------- INTERRUPT MODE 2
INT_2
PUSH AF, HL, DE, BC, IX, IY
EXX
EX AF, AF '
PUSH AF, HL, BC, DE
CALL SCR_SWP; switch the screen (below)
CALL SAV_PAG; maintain the current number
; Memory pages
CALL DET_SCR; determine the visible screen
CALL CR_UNDO; restore if it
; Same, no - if you switch
CALL CR_SAVE; remember
CALL CR_PRINT; draw an arrow
............
CALL MUZAK
CALL ON_UNDO; include CR_UNDO
CALL UND_PAG; restore the page
; Memory
POP DE, BC, HL, AF
............
EI
RET
;------------- SCREEN SWAP
SCR_SWP
RET; switch (# C9 or 0)
LD A, # C9
LD (SCR_SWP +1), A
LD (CR_UNDO), A; cut down CR_UNDO
; Include exit
SCR_STA
LD A, 0, status 0 - # 4000, another
; For # S000
OR A
LD A, (NOW_PAG); current page
JR Z, SW_L1
SET 3, A
JR SW_L2
RES 3, A
SW_L1
LD (NOW_PAG), A
RET
;---------- ON_UNDO
XOR A
(CR_UNDO), A
RET
;---------- UNDO UNDER CURSOR
CR_UNDO
NOP
........
RET
With such a layout, while the image is formed on an
invisible screen arrow flies in the visible, and when the
time to make the invisible visible, the
Arrow automatic kerf to a new screen without restoring the old
shit screen.
A schA I want to talk about the misunderstanding
between the encoder and grafmeykerom. When I
said, that I have drawn sprites movement hero 10 on 4
(familiarity) I brought them as much as 14 kilobytes, and even
different sizes. Nepodumav, I took them and
began batsat prog movement ... How do I
get exhausted all butt and at least
somehow systematize. Therefore, immediately
Decide what size and how much
sprites you will need for the transfer of a visual action. And
even you, my dear fellow coder, have very
killing them and interfere with the mask, since such
actions can not trust anyone. And that then would have to guess
whether your procedure buggy, or malicious grafmeykery you
so cut, so even sketches erased. AND
it is better to find yourself a large notebook
where to record all the information and the sprites (size,
length) and their sequence in the block. And enjoy better all
SPRITE MASTER 5. 11 for processing and SPRITE LAND v1. 19 for
the cutting and the lineup. In addition, I can say this: I have
drawn sprites move Only twice in the eighth, and took them
only 9 kilos.
The next time I'll talk about the problem of lack of main
memory and the ways of overcome, and the work procedures
pages of memory, using other procedures in other pages or
implementation of the wave algorithm to find a way to article
Glory Mednonogova.
And now - for now.