Q: Do I need to select each layer individually.
A: In Algodoo, yes.
Q: Is there a way to have the tool select all items on all layers at the same time?
A1: Save the file as a .phn and paste the text into the tool.
A2: Make a Python utility that opens the .phz (zip) file, parses the text, and displays the output.
1. When Algodoo is Paused (Edit mode), it often requires two presses of the GO button. In Run mode, it works correctly (one press).
A: It requires a slower than normal press in both cases. That's because the event listener is written in Thyme.
2. I think your notes should say something about the entered X and Y pos values must be in the correct format including square brackets and comma.
A: OK.
3. While the widget is fixed at a location, the x/y readout at the bottom of the widget keeps changing while the cursor is moved around the scene.
A: That's because it's the mouse position. I didn't have enough room for "Mouse Pos [x, y]: [100.234, 200.567]"
4. Your Notes #2 has a typo: "simulation".
A: I see I am slurring my words. Thanks.
5. The widget goes to a different x/y pos depending on what part of the GO button gets clicked! It seems to be cursor-location dependent.
A: That's by design. I figured it was close enough. I may fix that.
Thanks. It seems I am not as critical with my own work as I am with some scenes made by others. This scene can be used in conjunction with the object lister scene to help find outliers.
1. Make the main form larger.
2. Copy and paste the original cells.
3. Rename the new cells.
4. Scale up the common _calcResult and _calcAll functions for each cell.
I won't hold my breath. One problem is that I couldn't find a way to automatically create variables in a loop that can be seen in another loop so the cell object variables and cell value variables had to be created by hand before filling automatically. Another problem I had is in calculating all the cells in the right order. Ideally the program would build a dependency tree and calculate cells in an order based on dependency level. That's not going to happen.
One interesting thing that I found out while trying to figure out how to recognize the caret (^) symbol is that You can call the onKey(e) function while the simulation is paused and it will detect key presses.
Q: When the text box has a lot of words in it, it does not use the selected word that I clicked on.
A: You must have poor aiming skills. Not really, the word selection is not perfect since Algodoo decides the number of words per line. I might fix that, but it will take some work.
Suggestion: Allow the user to decide if he/she wants the hints (text box) to show. Maybe toggle it with a button press?
Response: That function is available in the non-speed version and also in this version in a widget that's off screen to the right. I purposely made that widget not immediately visible to keep things faster and simpler for the user. There is also a "not used letter" box, but that noticeably slows things down without providing much benefit.
Regarding sound, if you have a Windows PC, my Text To Speech scene and accompanying YouTube video should have enough info to get spoken words.
I could also modify this scene to work with AlgoSound and post it as a response to this scene. The Python version of AlgoSound should work on all PCs that support Python and Algodoo.
I just tested the Text To Speech scene with Windows 10 and it works OK for me. The Text To Speech scene creates the necessary files for converting text to speech. If you can get that scene to speak, then the Spell Learn Game (with sound) response scene will also work. The VB script program must be running (the command window showing) for sound to work.
Yes, I thought the 2X2X2 would be trivial, but it's not. This one is easy, so I thought it might be good for younger viewers or people trying to understand the movements.
Thanks. I modeled the code after the Lua code here. I had searched all the languages looking for the shortest code that was still readable. Making the scene still took a while. One thing I ran into was that when Lua does boolean test1 AND test2, if test1 is false then test2 doesn't get evaluated. Thyme evaluates both test1 and test2 when doing an AND operation. In the Lua case, test2 sometimes had indexes out of bounds that never got evaluated. Thyme choked on those cases.
I do quite a bit of Python programming. I converted 2048 from Lua to Python to Thyme. AlgoSound has a Python version. I also made an Algodoo scene analyzer in Python. It will analyze a single file or all Algodoo files in a directory. When it analyzes a directory it gets the file number, file name, image file size, code file size, counts for each type of object, "Scene.my" lines of code count, custom body (not "Scene.my") lines of code count, standard lines of (all) code count, global ("Scene.my") variable count, and member (_someVar) variable count and puts the data in an analyzerData.csv file. When it analyzes a single file it returns the same items listed above plus all "Scene.my" code and custom code. I use the Algodoo scene analyzer to get an idea of the scene complexity and to extract code for use in other scenes. The Algodoo scene analyzer automatically extracts the custom code from the .phz file and displays it in a multi-line text box. It does this without messing the .phz file up or creating extra files.
Extract Code - select an Algodoo (.phz) file. The app will then calculate metrics and extract custom code from the file selected and display it in the textbox.
Analyze Directory - select folder containing .phz files. The app will calculate metrics for each .phz file in the folder and add it to analyzerData.csv which it creates in the same directory.
Click the "Extract Code" button. A standard operating system "Open File" selection dialog should be displayed. Select a .phz file and click the "Open" button in the dialog. The extracted info should be displayed in the textbox. If it isn't working as expected then run it from an IDE and see if any errors show up, check file permissions, or ask more questions.
P.S. I see it creates a scene.phn file in the codeExtractor.py application directory. I did have a problem once when trying to run the app from a "Recent Files" list.
OK. I see a problem. On line 196 I have initialdir hard coded to a path you don't have. You can comment out or delete that line.
Most likely you are missing some of the modules listed in the import statements in the first (7) lines of the file. Some modules come with python, others you need to install. Usually the IDE tells you which modules are missing.
The error you are getting is saying that there is no data being returned from analyzeScene (maybe missing zipfile module). You can use a print() statement to troubleshoot and determine what the data looks like at any point.