Re: "Design by committee: A Sprite class" - an open invitation



<<Do you have an explicit model of a "world" where the sprites live ?
If so (or
even if not) do you want/need to be able to suspend a running
simulation, save
it to disk, etc ? Do you need to record one run of a simulation for
later
playback ? >>

I suppose I have a sort of "environment" where the sprites live, if I'm
understanding you correctly. I currently have no need to save anything
for later playback (some other user in the Smalltalk world might,
however). I am certainly not opposed to providing such capability,
although performance is a fairly high priority, so it should not affect
performance, or if it does, it should only affect performance if one
decides to use that functionality.

<<Do the sprites have shapes and extents ? Do you have more than one
shape ? If
so does the shape affect how they collide (e.g two squares hitting
cater-cornered might start each other spinning) ? >>

I'm not sure what an extent is (I tried to find information on
"geometry extent blah blah" on Google but found nothing useful). But
there are different sprite shapes, yes. Currently, the shape does not
affect how they collide. But that is actually something I am working
on even as we speak, because from the beginning it was a design goal.
In other words, yes, sprite shapes should affect how they collide (2
squares hitting cater-cornered, etc). If you have physics ideas, I'm
all ears. The physics textbook I pulled out of my attic is a little
inadequate for this task.

<<Since you already have a simple, sufficient, and working system,
release two is
clearly going to suffer from "second system effect". Is your intent
here to be
able to blame us for the bloat and intractability ? ;-) >>

Yes.

<<Do you want to decouple the display from the update logic. E.g. the
simulation
could run at full speed, but the display only updates every 1/10th of a
second. >>

Yes.

<<Is the idea of running the simulation on a server, with the display
on a
different machine serious ? >>

Yes, in fact at some point it will be an absolute necessity. Either
that, or have the client machines be doing their own computation, yet
somehow be "slaved" or "linked" to a master or each other where
everything is in lockstep synchronization. I'm not sure how these type
issues are typically handled. But the idea of multiple client machines
basically being able to "see" the same thing that is going on at the
server is a necessity. I suppose we could dispense with terms such as
"client" and "server at this point. Basically, all machines need to be
able to "see" the same "world" that is being simulated, if that makes
any sense. Whether that means client/servers, or something else, is up
to you. By the way, performance across this networked situation is a
design goal.

<< If so what kind of bandwidth restrictions do you
anticipate ? >>

The "server" (if this is what is deemed necessary) will be connected to
the internet initially through something with the bandwidth capacity of
a cable modem. The "clients" probably the same, although it would be
nice if a dial-up type situation could produce acceptable results for
"clients.".

<<More generally, /why/ do you want to redesign this ? Are there
specifics that
you are unhappy with, or is this more an exercise to see what kinds of
design
alternatives might be available. >>

There is no particularly urgent practical reason why I am redesigning.
But here are a few reasons nonetheless.

For one thing, the design is actually incomplete right now, and was
more of a "proof of concept" type thing. Another reason is that this
will be a permanent type system (if it is successful) that will need to
be maintained, added to, etc. Therefore, the more "design" that goes
into it, and the more "good" that design is, the better in terms of
maintainability, etc. Another thing, I will probably have use for
sprite stuff in other pending applications. Therefore it would be good
if this sprite class was able to be easily transportable to different
applications. If it's too tightly coupled to this application, it
won't be. Lastly, I just figured it would be good to promote more code
reuse and what not. I figure this is probably something that is needed
in the general Smalltalk "community," and is my way of "giving back to
the community" so to speak (ha ha, I love that last line... what a load
of altruistic crap... ha ha). No, seriously, it would be nice if
something could be designed that many others could use.

In short, I am a software engineer, and the better this thing is
engineered, the better. I'm not usually into "quick and dirty" unless
it's just a throwaway application. I could do all of this design on my
own, but I figured there were lots of people out there with good ieas,
so I decided to throw out it to the forum and see what happens.

Having said all of these things, I've done a good "first
approximation." There is no violently urgent need for redesign, and no
issues that are popping up with what I have going. But things can
always be improved.

Regards,
S.

.



Relevant Pages


Loading