Sharing my project "Dave Awesome"

Here is a take on the 80s game - “Dangerous Dave”

  • Have finished upto 3rd level (90% - Need to add some Gems and spider’s ability to shoot)

Thanks to a lot of help from Makecode Team @richard, @shakao, @darzu, @jwunderl and @peli .

Do share your feedback

Fun game :slight_smile: is this the one that you were saying had an issue on the stream?

Yes, (latest published here: problem i have now is:

  • on level 3, the seaweed animations start overlapping when you lose a life and reload the level; even though, I am destroying the resources in “destroy level” function.

Some help on this is also appreciated.
Warm regards

Ahh, I see; here’s a version that should be fixed:

In the version you had, you were iterating over all the tiles that had started off with weeds / gems and calling destroy ‘gem’ or destroy ‘weed’; it’s important to note that the variables you were destroying in those loops were only ever referring to the last sprite of that kind that was created. Whenever you create a new variable with set mySprite to ..., mySprite will refer to the new thing that you set, not any of the other ones that it referred to previously.

There’s two easy ways to fix it; since you added the tilemaps extension I used the easiest way (the destroy all of kind block), but for reference you could also do this:

that gets an array of all the yellow gem sprites, and says to delete those.

1 Like

Wow!!! I totally missed this block. thanks for the tip. this feels much better now - code is cleaner too