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)


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.
Selecting works quite well! To supplement the rotation handles you could try also supporting right-click-drag rotation IMO.

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.

This looks really cute! Have you seen how Multiwinia handles multiselection of units? Instead of click+dragging you click and hold and the selection circle grows larger. I don't really know if this is easier, just throwing that idea out for your consideration.
This really looks quite similar to my entry. I guess making the game field circular and shortening the z axis by half to get an isometric perspective are both obvious choices if you are good :) It seems the game ideas are quite different though - mine won't have selectable units even if I manage to finish it.