Re: Interface complexity problem in game



H. S. Lahman wrote in XvAZe.3982$WT3.1724@trnddc03:">news:XvAZe.3982$WT3.1724@trnddc03:

> Responding to Guild...
>
> Two questions from beginners about constructing an RPG game in one
> day. Coincidence? Tell your instructor that a computer game is too
> big a project for a homework problem.

Don't worry, I'm sure he knows. The coincidence was actually caused by
the first question giving me an extra boost of confidence that my own
question might not be out-of-place here.

>> [Active entities behaviour determined in a method with wildly
>> varying behaviour]
> This is probably a Bad Idea except in very specific situations. See
> my response in the "RPG game in UML" thread.

Thank you, that has certainly given me a lot to think about!

>> [World object with hundreds of methods]
>
> This is an Even Worse Idea for exactly the reasons you identify.
> (One exception below.)

Luckily for me, it seems that my design fits that exception! I was
aware of the principle, but not the exception. Thanks.

> [Object relationships are important. See my blog]

Thank you very much! This blog looks very interesting and I will read
it eagerly. I have never read anything describing OOD in this way.
http://pathfinderpeople.blogs.com/hslahman/relationships/

>> [Description of world object]
>
> This paragraph suggests that 'world' represents another, largely
> undefined subsystem. In that case it is a subsystem interface.
> Using the GoF Facade pattern is a common way to implement subsystem
> interfaces. While that Facade is a single class with a large number
> of interface methods, it does not implement the functionality. It is
> simply a buffer class that re-dispatches the messages to the objects
> that implement the subsystem. So in that case a large number of
> methods is acceptable. In fact, it is highly desirable because it
> hides the implementation of the subsystem.

This is exactly what I am doing. I would be crazy to try to define
something that I know will be vastly complicated without breaking it up
into a large number of objects. Therefore, I will continue with
confidence and much appreciation!
.



Relevant Pages

  • Re: what is smss.exe and csrss.exe used for
    ... Probably also applies to other NT flavours of Windows. ... This is the user-mode portion of the Win32 subsystem (with Win32.sys ... Csrss is responsible for console windows, ... responding. ...
    (comp.security.firewalls)
  • Re: UML notation question
    ... Responding to Burry... ... it means that whatever specializations B has are important ... They just can't be in the same semantic scope (i.e., ... subsystem subject matter is effectively a different problem to solve ...
    (comp.object)
  • Re: Separation of Graphics and Logic: Game Sprites
    ... Responding to Daniel T.... ... would include anything that has to do with screen rendering, sound output, and data sent into the world. ... Objects that track game state, objects that interpret system input then change the game state, and objects that read the game state then produce system output. ... one might have a Physics subsystem whose sole responsibility was to resolve collisions and whatnot in terms of flying debris. ...
    (comp.object)