Today on Devember day 9 we have, more or less, exactly what we had yesterday, but now including way more encapsulation (that’s kinda funny in the context of a Dr. Mario clone). I spent a little time with a piece of graph paper crudely sketching out a few different virus shapes to use as simple polygons, and then plunked the values down into a series of arrays so that they can be rendered.
Once I had that working I set about taking the code that I had previously set up in the Scene class to do all of this stuff while testing. As a result, the visuals look more or less the same as yesterday, except that the colors are a bit more muted and there are now viruses as well.
Unlike the original Dr. Mario, which (as far as I can remember; too physically conservative to check at the moment) has a different virus model for all three possible virus colors, I implemented three virus “models” and they get randomly selected whenever a virus is created. A little visual variety!
I also “fixed” the issue I discovered yesterday regarding the Event structure being KeyboardEvent or MouseEvent depending on the type of event it actually is, which I did in the engine branch and then merged over to the other branches (and got a conflict because I’m contravening good sense here). Unfortunately as I type thing I’m fairly sure that I actually only fixed it in one place and not both (i.e. Stage but not Scene as well), so I probably have to revisit that.