Third night: selectable units
I realized that selecting units is going to be more of a pain than I originally thought, so I decided to implement that right away. As expected, it was tough, but I got something that at least works:
I refactored my sprite classes, and I think they'll be much more expandable now. But now my selector classes need refactoring. Ah well, that can wait.
I'm not sure if the interface I chose is all that good, so I'm looking for feedback. Download my code here, if you're interested. It's all controlled through clicking, dragging, and right-clicking, and you use Shift-click or Shift-drag to select additional units. All you can do so far is tell them where to go.
So tonight was kind of boring, but I'm glad I got it out of the way. Hopefully tomorrow I can add some more interesting sprites and maybe even some gameplay!
(log in to comment) Will rotation have an effect on gameplay? It would be great if it did! Maybe the sun could shine from one side and that is important for plant growth.
Comments
saluk on 2009/04/28 04:21:
Seems to work well to me. The acorns are so cute, when you send a horde somewhere and they all run into each other and bunch up to get there. Interesting ai behavior.