How does Donkey Kong work?
|
|
Staci
|
Sat Oct 04 2008, 03:04PM
|
|
|
Registered Member #1741
Joined: Sat Oct 04 2008, 02:45AM
Location: Schenectady, NY
Posts: 35
|
I'm writing a game to hide in a control application for my next product as an easter egg - and I want it to be Donkey Kong like.
A quick look at the original game reveals that it's tile based, highly symmetric, and very state machine like. the playfield logic isn't obvious to me - for example, do I determine which level the floor is based on Y sprite height, or just control that variable as a function of ladder ascent/descent?
I have everything working that's important - the game part is easy - The demo is at: The file is called staci.zip.
|
Back to top
|
|
Bjørn
|
|
Registered Member #27
Joined: Fri Feb 03 2006, 02:20AM
Location: Hyperborea
Posts: 2058
|
Those old games were very simple and the logic often consisted of surprisingly few logic gates. Clever game design usually hides the repetetive and simple logic behind it.
Using state machines for games like this can be a very good idea. When the game is developed step by step it is easy to end up with a messy structure of nested logic statements that is very hard to debug.
To determine the level of the floor you should select the cleanest and simplest condition that can't fail. For example the ladder method will fail if there is any way for the character to get to another level without using the ladder. In the beginning of the game design you may not even know, so it is important to make sure it can't fail.
Today when computing power and memory in this context is free there is another method where you have a value for every pixel that determines what state the character should be in at a given position. You can load this playfield as a hidden bitmap. That way you can create a lot of the logic simply by painting in photoshop. It also makes it very easy to add and test out new features.
|
Back to top
|
|
Moderator(s): Chris Russell, Noelle, Alex, Tesladownunder, Dave Marshall, Dave Billington, Bjørn, Steve Conner, Wolfram, Kizmo, Mads Barnkob
|
|
Powered by e107 Forum System
|