Here is the game:
https://snap.berkeley.edu/snap/snap.html#present:Username=pavelbel&ProjectName=Shoot%20those%20bandits
Shoot the enemies before they shoot you. They are growing in numbers as you shoot but they often miss. Sometimes you receive extra life. I recommend playing in fullscreen mode, because otherwise the enemies are too small and hard to hit. How much can you score?
Mostly it's a pleasure to work on such a project with Snap! Kids are happy
But there are two things I had hard time with:
- Sprite layers organization. There are totally insufficient instruments to organize sprites render order. I have many sprite layers here in the game (life meter -> hand with gun -> my gun flash -> bullet impact cloudlets -> bullet holes -> front scene sprite -> bandits -> back scene sprite), and it's very hard to arrange them in the right order with only "go to back/front layes" and "go back N layers". It would be great to have the ability to manually assign layers indexes to sprites
- Message handling. Specifically one thing: a message handler block immediately interrupts when a new message of the same type arrives. It can cause different side effects especially when the handler is long. My workaround: to have a very quick "outer handler" and a "inner handler", that perform the logic. Outer handler starts when the message comes and checks whether the inner one is running. If the inner handler is running now, then the outer simply quits. Otherwise it sends an "inner" message, that invokes the inner handler.