Re: OOP Question

new topic     » goto parent     » topic index » view thread      » older message » newer message

This is a very interresting discussion and therefor I would like to give my
two cents.

You are discussing the fact that actor1's position are attributes of the
actor or of the playfield or of the game in general. The problem is, Actor1
doesn't exist. Actor1 is a set of positions, textures and controlling
routines.

Who am I ? Do I exist ? I'm merely a bunch of biologic cells existing at
some place in this world. So, if you are really discussing which model is
more accurate, than I wish to add to that list, that OO is not the way to
model things.

It is the simplicity itself that distuinishes between actors and playfield
classes. In fact, you couldn't easy write code that disguishes classes. Its
the whole label-way thinking, you're putting things in boxes. This is the
good, but also the bad part of OOP. Therefor I would say, that the problem
'the most realisitic model using OO' .. is inmpossible problem. The most
realisitic model is a context sensitive model, where each relation between
facts is a fact on itself, which also relations. Far more complex than
objects and their attributes.

The reason we choose to use OO so often, is because it is very close to our
languages. They too speak of attributes, and subjects, leading subjects,
etc. "The box fell." or "I gave the man a hat.". However, we can change the
basic classes and improve our structure on demand, when logic needs it to
make it work. Programs can't. So you need to make the right choices from the
start. If you wish to change the 'rules' of the playing field at some futher
state of development you be wise to have at least the change in positions be
determined by the playfield-object. (assuming the rules are also attributes
of the playfield object). On the other hand, if you wish to create actors
that behave differently, on the same playfield all the time, you would be
better off having the positions as attributes of the actors themselves.

To conclude, you can't really speak of a most realistic model, but you can
speak a more useable model for a particular purpose.

Ralf N.
nieuwen at xs4all.nl

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu