Re: A85: Sqrxz 0.7b


[Prev][Next][Index][Thread]

Re: A85: Sqrxz 0.7b



Jimmy Mårdell wrote:
> 
> Terry Peng wrote:
> > I would like to say congratulations on an excellent job.
> > I have to ask, how the HELL did you do multiple enemies!??
> > I can't wait to see this source code!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> 
> Short answer (while waiting for the long one): I've created a table (8
> entries) like
> this: (Pascal code)
> 
>  enemyTable : ARRAY[0..7] OF RECORD
>                                type : Byte;  { 1=blob, 2=hedghog, 3=bat,
> 4=green man }
>                                dir  : Byte;  { 0=right, 1=left }
>                                x    : Word;
>                                y    : Byte;
>                                fall : Byte;
>                                spec : Byte;
>                              END;
> 
> When finding an enemy while scrolling, the enemy is inserted in the
> table above,
> and each frame the table is scanned and the enemies get updated. 
That is exactly what I have... (I have one enemy working). The problem is 
when you have lots of enemies, or when the screen scrolls, the game slows 
down and the enemies start flickering.

Earlier I was having trouble because the game was REALLY slow but that was 
due to an unrelated bug.

-- 
Terry Peng
email-	tpeng@geocities.com
web-	http://www.geocities.com/SiliconValley/Bay/5104/index.html


Follow-Ups: References: