Browse Search Popular Register Upload Rules User list Login:
Search:
2048 Game

Image:
screenshot of the scene

Author: s_noonan

Group: Default

Filesize: 28.74 kB

Date added: 2023-01-28

Rating: 5.6

Downloads: 5206

Views: 570

Comments: 18

Ratings: 2

Times favored: 0

Made with: Algodoo v2.1.0

Tags:

Scene tag

Just like 2048.
Last edited at 2023/01/29 04:25:30 by s_noonan
Please log in to rate this scene
edit
Similar scenes
Title: 2048 tile maker
Rating: 5
Filesize: 1.23 MB
Downloads: 3977
Comments: 4
Ratings: 1
Date added: 2025/01/02 12:55:16
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: 2048 race update
Rating: 5
Filesize: 8.83 MB
Downloads: 2642
Comments: 0
Ratings: 1
Date added: 2021/04/30 23:16:57
Made with: Algodoo before v1.8.5
Rating: rated 5
download
Title: 2048 ccccccruuuuuuuuuuuuuuuuuuusssshhh
Rating: 5
Filesize: 27.51 kB
Downloads: 3785
Comments: 0
Ratings: 1
Date added: 2021/06/16 14:53:34
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: 2048 Normal colors 0,00244140625-1No
Rating: 5
Filesize: 22.73 kB
Downloads: 8099
Comments: 3
Ratings: 1
Date added: 2022/03/01 09:22:29
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: 2048 tiles part 3
Rating: 5
Filesize: 210.58 kB
Downloads: 1298
Comments: 0
Ratings: 1
Date added: 2025/01/04 01:12:22
Made with: Algodoo v2.2.3
Rating: rated 5
download
Title: working 2048 tile
Rating: 5
Filesize: 11.17 kB
Downloads: 20479
Comments: 3
Ratings: 1
Date added: 2022/03/13 03:46:36
Made with: Algodoo v2.1.0
Rating: rated 5
download
Nicely done. The game looks good and it runs flawlessly. :tup:
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.
Emil did a fantastic job developing Thyme, but sadly he left the company before it had been completely debugged. I wish he would have stuck around for a couple more years to fix the bugs and to add a few enhancements. I've been told that Algoryx may devote some time to updating Algodoo (including Thyme) in the not-to-distant future when they can spare some time, but nothing is firm yet so don't tell anyone. ;)

I see in that link you provided that the 2048 game was written in many different programming languages including Python. That's great because I recently started learning Python, and now I have something to play around with it. :)
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.
Wow, your Algodoo scene analyzer sounds very useful! Any chance you might care to share it with others? If not the executable (for Windows) then just the source code would be awesome. :)
Awesome! THANK YOU! :tup: _o_ :tup:
If I have anything you want just let me know! (My truck, my wife, my dog...... ummm on second thought, not my dog. Sorry).
s_noonan -- After I load your Python code, it runs and it displays the analyzer page with the two buttons "Analyze Directory" and "Extract Code". I don't know what to do at that point. Instructions please.
Last edited at 2023/01/31 01:16:58 by Xray
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.
Quote: select an Algodoo (.phz) file.

Question: HOW do I select the file? Do I copy/paste the filename to that Analyzer page, or do I simply highlight the desired filename and then click the button? Sorry for my troubles but I just can't seem to make it work. :(
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.
Last edited at 2023/01/31 10:25:12 by s_noonan
I tried deleting that initialdir line, which did not make it work. So then I changed the path from your directory tree to the one on my own computer, and then I got the following Python exceptions:

Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Program Files\Python311\Lib\tkinter\__init__.py", line 1948, in __call__
return self.func(*args)
^^^^^^^^^^^^^^^^
File "<stdin>", line 10, in openphzfile
File "<stdin>", line 4, in showResults
File "<stdin>", line 2, in data2text
TypeError: 'NoneType' object is not subscriptable


I don't want to take up any more of your time trying to debug this. I'll just teach myself a crash course in Python and try to debug it myself. Thanks again for your help with this.
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.
Okay, thanks again. I have a lot of learning to do! :blush:
I do not know how to play this!
👎
Ope there I go