Скачать Fringdus - Incomplete Sprite Game (320x200x256)

17.12.1992
Скачать файл (42,93 Кб)

DISTRIBUTION

  

This distribution comes with:

   fringdus.pas   
   pic_make.pas   
   map_mak2.pas   
   pack.pas       

   fringdus.exe   
   pic_make.exe
   mak_mak2.exe
   pack.exe
   pack.ini       

   flr1.pic thru to-
   flr32.pic      

   b_scr.bmp      

   bs.bat         


              Very Techical Notes & Discussion Notes
              --------------------------------------

FRINGDUS.PAS:
-------------

Have you ever heard of Paradroid?. It was a game I used
to play on a friends C-64 a long time ago (1987). I reckon
it was the best game ever written. Fringdus has the same
scrolling effect of the graphics as Paradroid. It looks really
good!, I'm really impressed with what I have done. As you operate
the key-pad keys, it looks like the "ground floor" is moving
under you. It looks very smooth, but still needs some
modifications so that it is faster. The computing solutions are
the first solvable solutions, not the best ones.

Basically, the code that resides in the Pascal source:
"FringDus.pas" is like a Database Manager. It manages a
2 entity 1-N relational database. The ERD (Entity
Relationship Diagram) is below:



                         ^
----------------        / \        ---------------
|              |   1   /   \   N   |             |
| FRINGPC1.PIC |------/ HAS \----->| FRING1.MAP  |
|              |      \     /      |             |
----------------       \   /       ---------------
                        \ /
                         .


It copies blocks of graphics contained of the "FRINGPC1.PAS"
(FRINGdus PiCture 1) file (which is stored in memory), according
to what the "FRING1.MAP" tells it (also stored in memory). The
"FRING1.MAP" file is really the "map of the floor", which only
contains position references to the blocks of graphics in the
"FRINGPC1.PAS" file.

(Note/ From now on, we'll call the blocks of graphics: "Sprites"-
from my good old C-64 days :) ).

When "Fringdus.exe" is executed, the computer reads a
section of the "FRING1.MAP", It reads the relative locations
of the sprites in the "fringpc1.pic file. It then reads the
sprite and then copies it the video memory located at decimal
address 40960 (A000h). The screen dimensions for Fringdus are:
320*200 pixels (or 64K of memory).

(Note that this for VGA only. You will have to make the relevent
changes to the code to turn it in to a EGA or CGA game.)

Fringdus provides a quick assembly base to copy chucks of data
to the video (invisible) memory. As you will see, many of these
assembly routines are tailor made for certain situtions.
The problem is with graphic libraries is that they are standardised.
The problem with standardised anythings, is that they compensate
for any kind of situation (philosophically speaking). Hence they are
slow. If you want speed, you need to custom make routines for only
certain situtions in assembly. Disassembled 3GL's like Pascal are
very Stack intensive. There is alot of overhead in preparing values
for the registers. Analagously, they "have a few drinks, watch a
few porn's, have a couple of games of pool, then go to sleep" before
they do they they useful. With assembly, you can "contain" the
processing, within the action registers AX, DX, CX, BX, so that
processing is very fast.

These routines are in no way efficient. I don't consider myself an
assembly expert. An assembly expert will look at these routines and
speed them up by 5 times, because they know what intructions are fast
and what instructions are slow. A lot can be said about Assembly
experts, but we won't go in to that now.


NB/  A detailed look at how they work, is in the source documentation.
If your still having problems with how they work, write me. I haven't
documented them properly, but will. Remember!, I might be documenting
for a living, so please remember that cooks don't like cooking when
they get home :).