Tweak mode unsafe

In the last hour of a gamejam, I decided to use tweak mode to touch up some things.

I had a switch() and tweak mode doesn’t like switch. This has happened a few times before, but this was the first time I didn’t have a backup of my code ready to revert to.

Tweak mode failed to start, and every tweakable variable in my code was exchanged/renamed to tweak_mode[x]. Undo didn’t make it go away. We’re talking hundreds of variables being replaced with compile-breaking names.

So I had to dig up the singular massive .java file out of %appdata%/temp/ and use that to submit my game. In a rushed panic. Be wary of tweakmode. Also make backup copies all the time.

Thank you for sharing this. Do you mind reporting this in github please? The Processing Foundation should be made aware of this and hopefully they can address it or evaluate the best curse of action for that feature.

Kf

1 Like

That sounds frustrating.

At the very least a workaround might be to have the tweak tool require that the sketch have been saved before launching Tweak mode – a kind of safety backstop. Tweaking starting from unsaved code sounds a bit unsafe even if the mode is working right…

I hope the game turned out well, even without the final polished!

Tweak mode does require you to save before hand, yet when this error happens it seems to overwrite the save after it fails.

Wow. It force-saves the currently active .pde file when it fails? That is a brutal bug.

I agree with @kfrajer – you should definitely file a bug report.

And here is (I believe) the source for the mode…

1 Like