[Cuis-dev] The Cuis Book for Cuis 6
Hilaire Fernandes
hilaire at drgeo.eu
Mon Feb 14 03:47:10 PST 2022
Hi Tommy,
You are perfectly right about the inconsistencies you are raising. There
are related to the genesis of the book and the game example. To prepare
the book project, I wrote first the game example, then I started writing.
Several weeks later, several chapters were written, Juan took a look to
the game and told me the Morphic part can be heavily simplified. Indeed
in the original design I did not use the matrix transformation part of
every morph (the location attribute you are mentioning is an affine
transformation matrix) but I was doing the calculus by "hand" with the
heading attribute. So the game code was simplified, and it was the right
decision to make. Nevertheless, we did not pay enough attention to the
already written chapters. I edit the text but I missed some part.
Now that you are raising the issue, I will introduce back #heading and
#heading: methods. I will keep the heading attribute in the class
definition chapters (for pedagogical reason), but later will explain it
is not necessary, so kind of refactor and remove it (it is pedagogical
too, I think). It will improve the understanding of the code. I will
edit again the text too.
More comments below.
Le 13/02/2022 à 23:47, Tommy Pettersson via Cuis-dev a écrit :
> I'm not a frequent Cuis user, so I repeated the Spacewar!
> exercise for Cuis 6, and got confused in chapter 4 where
> SpaceShip>>#direction is defined using "location radians"
> before Morphs are even introduced and the SpaceShip is still
> using the "heading" instance variable, so I was expecting
> "^ heading cos @ heading sin".
>
>
> I also have a more dubious suggestion.
>
> One reason I'm redoing the exercise is that the first time
> around I was a bit anoyed that conservation of momentum was
> overlooked, and I want to implement it for the fun of it.
I don't understand fully what you want to do, I should ask to physics
teachers in my school, but it will be interesting to play with an
improved version of the game.
> The game already deviates from newtonian physics to be more
> enjoyable -- torpedoes point in the direction of velocity --
> but this is duely mentioned. My suggestion is to briefly
> also mention that a spaceship brought to rotate would
> continue rotating until stopped.
I will be more than happy to add paragraphs you think will improve the
quality of the book.
Stay tuned for updates.
Thanks
Hilaire
--
GNU Dr. Geo
http://drgeo.eu
http://blog.drgeo.eu
More information about the Cuis-dev
mailing list