Creators – Week 19

This week we took the completed game and started to look to making it more fun to play and to iron out some of the things that don’t work well at present.

Distance Measured to Buried Gem

The original gem sensor measured the distance between itself and the nearest gem and used this for signal strength. This didn’t always work well, especially on down slopes. This diagram shows why:

The straight-line distance to the gem (blue lines) on a downslope is far greater that it would be on the flat.

The solution to this was to compare just the horizontal distance between sensor and the gem, removing any height differences.

We had to make this change in both ProximitySensor.cs and PlayerDig.cs.

Sensor Signal Strength

The signal strength was calculated as follows:

Signal Strength = Distance related factor * Direction related factor

The first attempt we made at signal strength was purely based on distance, in practice this proved to be super hard to use. Including direction made it a lot easier to find the gems, but the fact that the distance related factor dropped to zero, hence making the signal strength zero, the instance our gem was behind us, even the tiniest amount, didn’t feel correct.

Our adaption was to make it so that the Signal Strength has a strong component that ‘s directional, but a small independent component that’s distance based. Here’s what that looks like:

Signal Strength = Distance related factor (0.2f + (0.8f * Direction related factor)

If we look at this equation, even when the direction related factor is zero, the signal strength doesn’t drop completely to zero, although it does get a lot lower. This feels a lot better.

Tweaking and Polishing

Our final few weeks will consist of tweaking and polishing the game. We have a document here:

Gem Search – Fixes and Improvements

to track our ideas. We probably won’t get to do them all.

Code Download

The code for this week’s project is on our GitHub, as always. 

Scratch Intermediate & Advanced Challenge 18: Start work on your own project!

CDA-S2-Challenge18-YourProject

This week, we started work on multi-week projects!

The goal will be to design and implement your own project, with the support of the mentors, to demonstrate the skills you have acquired over the past few months.

In a few weeks, everyone will get to demo their projects and work towards earning:

  • Yellow certificates: for ninjas who already have a yellow Scratch belt and demo a project using those skills
  • Blue certificates: for ninjas who already have a blue Scratch belt and demo a project using those skills
  • Yellow belts and white belts: only for ninjas who do not already have a belt.

As we discussed, there are also a couple of international CoderDojo contests coming up – discuss with your parents whether you would like to enter.

Here are my notes from the day (PDF): CDA-S2-Challenge18-YourProject.pdf

As usual, get in touch on Twitter or in the comments if you would like the PowerPoint version of the notes.