Re: Just spent 5 hours bug fixing HLA Adventure (my head's about to roll off!)
- From: "Charles A. Crayne" <ccrayne@xxxxxxxxxx>
- Date: Wed, 8 Jun 2005 14:16:52 -0700
On Wed, 08 Jun 2005 05:39:36 GMT
"Beth" <BethStone21@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
:They _WOULD_ have been entirely "trivial", if you'd used an "engine"
:design from the beginning...
Your advice, while correct, is a bit too general, and comes far too late.
Let me describe the problem, and its solution, in greater detail.
Paul chose to implement his parser with a string index function, which led
to such unexpected results as "welcome sailor" being interpreted as "go
west". He now understands that a string compare function is a better
choice, although it has pitfalls of its own.
Of course, this should have been a five minute change, but for Paul's
choice to code each and every word in the game's vocabulary in a separate
code block like this:
str.index(w,"bottle");
if((type int32 eax) >= 0) then
mov(11,s);
endif;
Instead, he should have placed the vocabulary words in an array of strings,
and written a procedure which used a single instance of
"str.index(w,p)", where 'p' is an index into the the string array.
He has a similar issue with the room descriptions. A number of people,
including myself, have a problem with Paul's choice of screen colors.
Unfortunately, the room descriptions, along with the associated color
settings, are implemented as a separate code block for each room. Again, he
should have placed the descriptions in an array of strings, and written a
single procedure to write the appropriate description to the screen.
On the other hand, the movement table has the correct design approach,
although the specific implementation is a bit too rigid. I have seen
adventure games where the movement rules also are written into separate
code blocks for each room.
-- Chuck
.
- Follow-Ups:
- References:
- Prev by Date: Re: Randy vs. Betov: from an outsider
- Next by Date: Re: Just spent 5 hours bug fixing HLA Adventure (my head's about to roll off!)
- Previous by thread: Re: Just spent 5 hours bug fixing HLA Adventure (my head's about to roll off!)
- Next by thread: Re: Just spent 5 hours bug fixing HLA Adventure (my head's about to roll off!)
- Index(es):
Relevant Pages
|