The Keen project tech demo. Version 1.4.
By Zach
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
1.1 - How do I get it started?
1.2 - Using the demo
1.3 - Warning
2.1 - What is it?
2.2 - Tile engine
2.3 - Drawing Actors
2.4 - Physics
2.5 - Object Interactions
2.6 - Sprite Files
3.1 - Extras *
4.1 - Additional info
4.2 - Updates
5.1 - Can I help?
(* - Contains updated info)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
First note:
Installing and running easy, you probably wont want to read that section. So I
want to get this out of the way now.
When I first ran the demo by itself (outside of the programming environment),
for some reason the images had light blue areas where they should have been
transparent. I do not know why. I simply closed and then ran the program again,
the problem has not happened again.
Bottom line:
If the images look funky the first time, try starting it again.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
1.1 - How do I get it started?
Download the zip file, extract it. (Get winzip or whatever.) Then run
Keen.exe. Simple as that.
1.2 - Using the demo
Use the Left and Right arrow keys to move and the left Control key to jump.
1.3 - Warning
Since this is a tech demo, it is very flexible and not very secure. It is
easily possible to crash the game. While anything the game does should not cause
any harm to your system, just be careful. If the game goes into a bad state, it
is theoretically possible that it could begin modifying things it shouldn't and
make your computer unstable. (Fortunately, if by some crazy sequence of events
this happens, a simple restart of your computer should fix it.)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
2.1 What is it?
This is a technology demo. It is intended to give an idea of the quality and
capabilities of the engine. Currently, there is little more than the core tile
rendering engine. However, this was what I saw as the primary stumbling block to
getting this project off the ground. Well, the graphic engine and time
constraints. As most people who have started these sort of projects know, it's
easy to get distracted and put the project away. Hopefully having put this much
effort into it, and now ensuring any technical difficulties that may have
plagued me have been overcome, I will continue to stay motivated and push this
game to completion. Sooner rather than later. Now let's talk about some of the
features in the demo.
2.2 - Tile Engine
The tile engine is responsible for almost everything you see when you run
the demo. Consequently, it is the biggest speed bump. As I think you will
observe, this bump has been smoothed.
Visible on the screen currently are three layers of tiles. The distant
background, a light blue bitmap, is a single bitmap sized 1024x768. Since it is
a solid color, you will not see it move. But the demo is hard-coded to use an
800x600 screen resolution so it does actually scroll a little bit.
Next up is the "actor" layer, the one that contains what you and the bad
guys will walk on. Technically speaking, Keen and the bad guys are rendered on
this layer.
And finally, there is a foreground layer that has a number of green boxes.
In the end, there will be 7 layers of tiles. But adding additional layers is a
fairly simple task at this point.
What are not demonstrated in this demo are animated tiles. Without any
performance loss, every single tile on the screen could be animated. I have not
yet decided how the tile definition files will be formatted; but as far as the
game engine is concerned, it is an extremely simple matter to turn any tile into
an animated tile.
2.3 - Drawing Actors
The Behind the scenes the game is working with the concept of current
actions. Keen now knows if he's Walking, Falling or Jumping. Although Keen is
the player and therefore very different from other Actors, he still operates
with many of the same concepts and requires many of the same engine utilities.
The player internally is another actor, but it doesn't perform any AI
calculations because the user controls it.
The Keen (player) actor uses the entire Actor graphics system much like
other bad guys. The graphics look at the current action and draw the sprites.
A nice feature of the graphics system is that it automates the animation,
allowing us to focus solely on logic or solely on animation at one time. More
importantly, it allows for one person to develop the animation and another to
develop the logic and control systems.
2.4 - Physics
Collision detection between an object and the ground has been greatly
improved. The most obvious result of this is that the player no longer gets
"stuck" when trying to walk uphill.
While a physics engine may sound complicated, and modern 3d games employ
advanced physics engines, the engine for Keen does nothing more than compute 2d
rectilinear motion. But this is great for a platform game! Because of this,
objects will fall accurately. To make something jump, just give it a high enough
upwards velocity, and allow the physics engine to use gravity to pull it back
down. Additionally, surfaces can have coefficients of friction - you can have
accurately modeled slippery things. Put in a fan object that causes a force
(acceleration) in a direction away from it or towards it within some distance.
There's no limit to the sorts of creative gameplay elements that can be added
to the game rather easily!
I am no longer performing all physics calculations using integers. But I may
go back to doing so. If I continue to use floating point values, the movement
will continue to be perfectly smooth. But I may want to change this back to
integers because the computer is much faster working with integers than floating
point numbers. As the engine gets more complex, I will be able to more
accurately assess how costly this switch has been, and if it can be kept without
destroying the gameplay. Keep in mind that while the physics calculations are
simple, they may have to happen more than a thousand times per frame, which
translates into hundreds of thousands of times per second. So the "small" cost
of using floating point numbers adds up.
2.5 - Object Interactions
The biggest improvement in this demo is the fact that an object can be on
top of another object. In fact, the system works such that objects can be
chained on top of each other. Meaning that one actor could be standing on a
moving platform, and another actor on top of that actor! When the bottom object
moves, it causes those above it to move accordingly.
To see this in action, go jump atop that floating yellow blob.
2.6 - Sprite Files
The second biggest improvement is not apparent as the demo is running, but a
quick look in the program folder reveals the Sprites folder. This contians a
very simple sprite file defining the graphics for the yellow blob. The sprite
file was created using the sprite editor available on the web site.
Because the sprite file is editable using the sprite editor, you can change
the graphics of the yellow blob if you like! Just realize that the frames used
in the game are selected by the game engine. So adding new frames to the sprite
file will not change anything in the demo. However, if you change the frames
used in the game, they will change the graphics seen in the demo.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
* 3.1 - Extras
Because this demo is "playable", but lacking many features required to make
it a game, it is possible to get stuck. If this happens, there is a special
debug code to get you out of a tight spot. If for some reason you would like to
return to your starting location, press left-control + left-shift + a (all at
the same time).
It may satisfy some technical curiosity to try another debug combination.
Press left-shift DBUG to display some simple debugging information. To turn this
off, press DBUG without the shift key. (Note that if you are holding DBUG and
release the shift key, this will turn it off. To keep the information visible,
release one of the letters before releasing the shift key.)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
4.1 - Additional info
If you have any questions that were not answered here, please check the
website. http://keen.keenx.com. Also, I check the public commander keen forum
often, as Vitamin Zach - http://pub128.ezboard.com/fpimentogamedevelopment.
Finally, you can try emailing me at zapdim8@juno.com, but realize that I do not
check my email as often as the keen forum.
Also, you can contact me on AIM - VitaminZach. This is usually the
most efficient way to get your questions answered, but it also means that I have
to be online at that particular time.
4.2 - Updates
August 25, 2004 - Added Section 3.1 - Extras (inserted)
August 18, 2004 - Added Section 2.5 - Object Interactions
August 18, 2004 - Added Section 2.6 - Sprite Files
August 18, 2004 - Changed website address.
January 10, 2004 - Added Section 1.3 - Warning
January 10, 2004 - Changed "Drawing Bad Guys" to "Drawing Actors".
January 10, 2004 - Removed extinct website link.
January 10, 2004 - Removed AI section, not applicable to this demo.
January 10, 2004 - Updated to version 1.2
July 25, 2003 - (1.1) Added Section 1.2 - Using the demo.
July 23, 2003 - (1.1) Updated to version 1.1
July 23, 2003 (1.0) - Added Updates (this) section.
July 23, 2003 (1.0) - Fixed some more spelling errors and missing words.
July 16, 2003 (1.0) - Fixed some spelling errors.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
5.1 - Can I help?
Certainly! The website should have the latest info on what sort of help will
be most appreciated currently. Then feel free to email me (zapdim8@juno.com) or
contact me on Instant Messenger (VitaminZach).
By the way, help of a graphic nature (if you can create sprites or tiles)
will almost always be desired!
Thank you, I hope this document didn't bore you too much.
Zach