Hello there,
I'm an author and philosopher and programmer.
I made a Kings Quest engine a couple of years ago, more precisely it was in
1999. I chose
the language BASIC because this was my first programming language a long
time ago and
because speed is no problem. The resolution is very bad because I think
graphics shouldn't
matter. Actually the dots are very big. (Take a look at some screenshots and
judge
yourself.)
Back to the engine itself. It's really rather simple. The main problem was
finding a
feasible solution to these these sub-problems in a 2D context:
1. How to make Sir Graham disappear when he moves behind tree?
2. How to make Sir Graham stop when he collides with the tree?
Solving it in a dual coordinate system was a lot of fun. The solutions I
decided on were
as follows:
1. Define an second array, called the fb (foreground/background) array with
the same
dimensions as the pixel-array i.e. the array containing the color of all the
pixels. Each
pixel in the fb-array is associated with each corresponding pixel in the
color-array.
Instead of color-values, the fb array has integer values. The engine uses
this array when
it has to choose whether to display the Sir Graham pixel or the pixel of the
background.
The rule is simple: If the value of the fb-array is higher than the
y-coordinate of Sir
Grahams feet, then display the Sir Graham pixel (because then he will be in
front of the
tree), otherwise display the background pixel (because then he will be
behind the tree).
2. Define a third array, called the collission-array. This array has the
same dimensions
as the others and its values corresponds to the actual graphical pixels in
the
color-array. This array is used to define areas where Sir Graham can't walk
as well as
hot-spot areas. The engine uses this value when it has to decide whether to
move Sir
Graham to a specific position or not. The rule again is very simple: If one
of the three
targeted points (his feet is set to occupy three vertical points around the
area of his
feet) to which Sir Graham is to be moved has a the value of "1" in the
collision-array,
then don't move him, move him. If the point has a value higher than one this
means that he
has stumbled upon a hot-spot. The engine will them move to the function
handling hotspots
and perform an operation corresponding to the number. Yes, everything in the
game is
hard-coded. If the value in the collision-array has a value of zero it means
that nothing
will happen.
Write me a mail and tell me a bit about your particular interest in joining
this project
and I'll send you the username/password to our ftp-accessible directory
pronto.
The goal of the project is to create a game that's really worth playing. It
has to be
poetic more than logical and logical more than complicated, humorous and
cracy and very
imaginative. Do you think we can do that?
Let's get the ball rolling!
Project homepage:
http://www.mycgiserver.com/~game/main.jsp
Kind regards
Morten Hjerl-Hansen