Re: OO and game design questions



On Tue, 19 Oct 2010 19:49:20 -0400, Dave Angel wrote:

Thanks, that is what I was trying to say. In the same sense that
emptying a list makes it quite small, if it's a general purpose object,
you just want to remove all the attributes.

I think a 'place' (to generalise it) is quite a small object in any case.
All it needs to contain is a few lists:
- a list of exits, which in some implementations might be simply
references to other places, but might usefully be objects with
two sides, each having an appearance and a link to the place
where that side appears.
- a list of fixed objects which only serve to describe the place.
- a list of mobile objects that actors can pick up and move
- a list of actors who happen to be there.

plus a describePlace() method and add(), remove() and getItem() methods
for each list. It may be possible to use a single list for all types of
object, in which case the object itself would be very small indeed.


--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
.



Relevant Pages

  • Re: ANN: pyroENGINE SDK v1.0 for Delphi/C++ Builder 2007
    ... In PESDK all objects are derived from a base class called TPEObject. ... Update and Render methods of the list object and all the actors will ... Another object called TPEScene allows you allocate as many lists as ... specify which list to do collision checks on. ...
    (borland.public.delphi.thirdpartytools.general)
  • KKs songs in Pehli Tarikh and Sheesham
    ... Is there any documentation which lists the actors for whom kishore ... has sung (for each song). ...
    (rec.music.indian.misc)
  • Re: Where the hell am I?
    ... I would prefer to avoid solutions with two lists with pointers to the same object, because in that case one list is "destructive" and the other one is "nondestructive" so it's additional problem... ... Adding and removing actors should be done using two methods, keep all the critical pointer handling code there. ...
    (rec.games.roguelike.development)
  • Re: Where the hell am I?
    ... But you should have two lists then: one with items / actors that are sensitive to time (like a bomb:)) and other that is bound with a particular tile. ... I would prefer to avoid solutions with two lists with pointers to the same object, because in that case one list is "destructive" and the other one is "nondestructive" so it's additional problem... ...
    (rec.games.roguelike.development)
  • Re: Checklist for maintenance kit
    ... I've seen some excellent lists on this forum for the pilot, glider, and ... Wire, wire cutter/crimper, heat shrink tubing Pneumatic tubing and ... Small socket set to suit your glider ... martin@ | Martin Gregorie ...
    (rec.aviation.soaring)