Newsgroups: comp.ai.games
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornellcs!newsstand.cit.cornell.edu!newstand.syr.edu!news.maxwell.syr.edu!EU.net!sun4nl!oce.nl!not-for-mail!news
From: "A. Jans-Beken" <jabe@oce.nl>
Subject: Tank - 2 objects
X-Nntp-Posting-Host: pc1-jabe
Content-Type: text/plain; charset=us-ascii
Message-ID: <32E3DF85.4BB8@oce.nl>
Sender: news@oce.nl (The Daily News @ nntp01.oce.nl)
Content-Transfer-Encoding: 7bit
Organization: Oce-Nederland B.V.
Mime-Version: 1.0
Date: Mon, 20 Jan 1997 21:11:33 GMT
X-Mailer: Mozilla 3.0 (Win16; I)
Lines: 25

This is just an idea.

In a tile-based game I have tanks moving around. While planning the
AI-part of the game I was wondering if it would be smart to make two
objects out of every tank. The first object is the driving part (the
caterpillar) and the second object is the gun-turret.

The caterpillar has no offensive or defensive skills. It just moves to
coordinates and its task is to carry the turret.
The gun-turret can not move by itself and is dependant on its carrier
the caterpillar.

The reason to create such a schizo-tank is (I think) that it is easier
to write TWO simple routines for each object separately than ONE routine
that has to deal with all tank aspects.
Also the reusability of the separate routines would be better. As an
example, the turret routine is also usable for ships (with 2 or more
turrets) or even for turrets fixed to a building. The caterpillar
routine is doing all path-finding and is therefore also usable for other
vehicles.

I would like to hear your comments on this.

A. Jans-Beken
jabe@oce.nl
