Castle crasher results not consistent

Students are attempting the Castle Crasher where they knock down buildings on the CC playground. They find the code does not always knock down the buildings or push them over the edge in the same manner with each run even though the code has not changed and the location of the buildings are always the same. Why is this? We all found this to be occasionally true when using physical robots last year but was wondering how this could be in a virtual interface where variables associated with a physical build have been eliminated.

2 Likes

It is because they didn’t eliminate the variables entirely as far as I am aware. I think that they put some inconsistency in on purpose to more realistically simulate physics in reality. In many programs, yes there is no variability, but I think that this one is different. Also, I think that the obscure objects in the Castle Crasher help make it have more variability.

2 Likes

Could you post an example program? Attached the actual VR file.
There are some physics that may have an effect.

The Playgrounds have physics applied to every object, along with the fact that communication between the Playground environment and the the interpreter (where your project is actually running) runs at about a 20ms interval. You’ll have some variability in your project as data is being sent between the Playground - Interpreter, but also especially as @FRC973 mentioned that the “castles” are comprised of many small pieces that will change their positions based on interactions with each other.

In other words, this bit of “inconsistency” is apart of the challenge and also mimics the variability found in the real world.

7 Likes

Thanks all. As we suspected – mirroring real life!