Re: OOP Question

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

On 25 Nov 2000, at 13:46, ck lester and Henry wrote things....
which i won't copy over again here, cause it would just be too complicated.

Cause i am exhausted, none of this may make sense tomorrow, but for
now, it does...

What if the solar system managed the interaction of the objects (planets),
and each planet had it's own data (gravity, dimensions, lifeform listing,
etc)? Since the path is based on interaction, the solar system can tell the
planets where they are whenever they ask. If the solar system wants to
know the planet's reflectivity, the planet should be happy to tell it, since
that is a planetary quality. The solar system could then find how much light
is reaching it, to see how brightly it shines, not all the time, but only when
someone has asked for that particular piece of data, otherwise you are
wasting time calculating useless data.

My manner of executing the universe would be a separate procedural
program for planets, and a program handleing the solar systems, and
another to handle the galaxies. Naturally, if the program can run with larger
granularity, run it all on one puter, time sliced. Alternative universes are up
for grabs.

Imho, the only reason to make it OOPish is if the real objects needed to
respond in real time asynchonously to external stimuli, which they don't.
Neither do they in chess. In fact, since, on one hand, the home pc is
timeslicing *everything* anyhow, you can't get realtime. On the other hand,
with increasing cpu speed, you can increase the rate of timeslicing
(decrease the allocated time granularity) and approach realtime. But since
it doesn't need regimented multitasking, i'd run it in dos. Every program i
have converted to win from dos has run slower, even if it was the only user
application running.

In chess, you have the player moving in human speed, shey announces
they shey wants the piece in the corner to move diagonally 2 spaces. The
god(dess) part of the application looks to see what's there to move, finds
it's a knight, looks up knight attributes, discovers knights can't move
diagonally, and tells the player to go read a book on chess. And the
modern puter can do all that, regardless of programming style, faster than
the human can reach across the board to touch the piece,, so that's a
semi-vote for procedural programming, that application sure doesn't need
an interrupt or on_win-msg to interact with the human. All the bits of code
for the pieces is recyclable too, if you simply change the name, legal
moves, and values for each square on the board,, and use the same code
for each place on the board. If you consider that the puter is the opposing
player and must dream up a good move to make, then the overhead of
OOP and time slicing is a significant time drain, and again, i'd go dos, with
procedural programming, and the heck with the multitasking overhead too.

As an aside,, as a teen, i could play against 6 *teams* at once, pretty
much real-time, and win them all. After the 2nd game, i beat the adult guy
who was teaching me the game, he never won another game from me. I
have a dos chess game now, and it beats me nearly every game, even on
the middle setting. Sometimes i wish i was a teen again.

Kat,
exhausted, mentally and physically, tonite.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu