🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: rec.games.programmer
1 messages
1 total messages Started by Albert L. Perrien II Mon, 27 Jul 1992 20:33
Monster library part 1
#232
Author: Albert L. Perrien II
Date: Mon, 27 Jul 1992 20:33
78 lines
3139 bytes
		Copyright (C) 1992,  Albert L. Perrien II

	This woork may be used freely to create computer games for private use, and for the education of individuals wishing to create computer games.  For use in creating commercial games, please contact the Author.  The Author is not responsible for any addictions that are created by thease games.

	Okay,  here's the sources for part of the game library.  Sorry I took so long, but I am attempting to get my sister through her first term paper.  The graphics section is not finished yet, but I'm still busy typing!
	There are four main sections in this library: The Player manager, the monster manager, the weapon manager, and the object manager. I will also be covering various editors for each section of the game later.
	I do apologize for the lack of sound, but none of the IBM's at my college lab have any sound cards, and that's where I'm writing this.  Perhaps someone ouyt there could explain how to use the sound blaster card in C or Paascal? I'm still a lot rough in IBM assembly.


	Okay, on to the buisness at hand...

=============================================================

Create_Monster 

	Create_Monster is passed a monster spec from another source,  i.e. 
levelmap, Major monster,  etc.  It finds an empty slot in the monster array,
loads in the monster spec, and sets the Status of the monster to Alive.


Procedure Create_Monster (var Monster: Monstertype);

var
i:integer;

Begin
	Repeat i:=i+1 until Mlist(i).Status:= dead;
	Mlist(i):=Monster;
	Mlist(i).Status:=Alive;
end;

Do_Monster

	This routine is a driver program that routes information to the 
various monsters in the game. It is used in conjunction with the Create_Monster
and Kill_Monster routines (explained later) to manage the subroutines for each
individual monster.
	
Procedure Do_Monsters


Begin 
	repeat
		i:=i+1;
		Monster:=Mlist(i);
		With Mlist(i) do 
			Begin

				Case Monstertype of 
	1:BounceMonster(Monster);
	end;
	2:CrawlMonster(Monster);
	end;
	3:DartMonster(Monster);
	end;
	4:BirdMonster(Monster);
	end;
				end;
			end;
		end;
	end;
end;

Kill_Monster


	The Kill_Monster routine removes a monster with the identity k from 
the list. This routine omits a call to an explosion manager which would manage
the explosions of all the monsters, However, I do not think that this would be
too hard to write. A monster is killed whenever it moves too far away from the 
player in either an x or y direction, or if it's energy is expired.

procedure Kill_Monster(k:integer);

Begin
	Mlist[k].Status:=dead;
end;
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads