deejoe / sugarizer-lite

A lightweight, shallow-clone fork of Sugarizer stripped of the two largest activities
Apache License 2.0
3 stars 5 forks source link

Describe Lemonade-Stand #7

Open jrtechs opened 4 years ago

jrtechs commented 4 years ago

I'm going to use this issue to coordinate and document my work with BlueJay89 in describing the Lemonade-Stand Project for the HFOSS final.

jrtechs commented 4 years ago

Overview

The best overview that I can give is available at https://fossrit.github.io/projects/lemonade-stand. This document goes over the background of the game, gives useful links to developer stuff.

Running

According to the project readme on the gitforge https://github.com/FOSSRIT/lemonade-stand, to run the project you simply need pygame and forgune engine installed.

pygame

Installing pygame was a bit pedantic with me. Simply running:

python3 -m pip install -U pygame --user

gave me issues. I managed to solve this my installing pygame for python 2 that was available in my package manager (version three was not available). This fixed all the dependency issues and allowed me to install the python 3 version via pip.

pacman -S python2-pygame

Fortune

The Fortune engine link broke. It now just goes to a deprecated page. After doing a few google searches, I couldn't find it elsewhere. It is possible that this project is buried in the search engine because of fortnight and epic games are dominating that result.

ghost commented 4 years ago

On Sat, Apr 18, 2020 at 01:57:14PM -0700, Jeffery Russell wrote:

Fortune

The Fortune engine link broke. It now just goes to a deprecated page. After doing a few google searches, I couldn't find it elsewhere.

The Wayback Machine takes us a step or two further before the trail grows cold again:

https://web.archive.org/web/20140706151047/https://git.fedorahosted.org/git/fortune_hunter.git

https://web.archive.org/web/20140830035718/https://fedorahosted.org/fortune_hunter/wiki/FortuneEngine

A lot of Fedora repositories ended up on

https://pagure.io/

but a search for "fortune" there was surprisingly fruitless (I'd have at least expected something off target).

-- Joe

jrtechs commented 4 years ago

Alright, the Fortune engine was hiding in our own back yard this whole time: https://github.com/FOSSRIT/FortuneEngine

I'm going to try to install it to work with lemonade-stand and update the documentation in the lemonade-stand repo.

jrtechs commented 4 years ago

Notes on installing Fortune

First clone the fortune engine and change into its directory.

https://github.com/FOSSRIT/FortuneEngine.git

Second, run the install script. Note: must run as root for permissions and it will not work under python3.

sudo python2 setup.py install

Running Lemonade-stand

clone the lemonade-stand repository

https://github.com/FOSSRIT/lemonade-stand.git

Run the activity using pygame-- according to readme

python2 LemonadeStand.py

However, I got an error because I don't have the sugar environment installed on my machine. I'm going to now look into how to do this. I'm guessing the tricky part is going to be getting the versions correct since this is an older project and I'm not going to be using a VM-- my laptop can't run one.

pygame 1.9.5
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
  File "LemonadeStand.py", line 4, in <module>
    from LemonadeMain import LemonadeMain
  File "/home/jeff/Documents/hfoss/lemonade-stand/LemonadeMain.py", line 31, in <module>
    from badges import badges
  File "/home/jeff/Documents/hfoss/lemonade-stand/badges.py", line 1, in <module>
    from sugar.datastore import datastore
ImportError: No module named sugar.datastore
jrtechs commented 4 years ago

After digging through the sugar docs, I still haven't found any easy way to simply install the python dependencies -- I'm naive to believe everything is in pip :) However, I found a bunch of documentation on sugar to port activities to python3. https://github.com/sugarlabs/sugar-docs/blob/master/src/python-porting-guide.md

Rather than/in addition to porting to sugarize, it may be interesting to port this to python 3. With that we would also have to port Fortune Engine to python 3.

BlueJay89 commented 4 years ago

This flow chart, found inside the Lemonade Stand documentation is an excellent jumping off point for how the game is played. I will continue to dig deeper into the code as I look through the repositories and trying to figure out how it works.

Lemonade Stand Flow Chart

zsd7200 commented 4 years ago

I'm on the team that's supposed to port Lemonade Stand over to Sugarizer, so I thought I would try to run it to see what it looked like and if I could start doing front-end work. I was able to install the Fortune Engine on Sugar (had to use su instead of sudo), but I was greeted with the same error (ImportError: No module named sugar.datastore) when trying to run Lemonade Stand. I had the thought to go onto the Sugar site and just download the activity, as there is a compiled version available for XOs, but alas, that didn't work either.

jrtechs commented 4 years ago

@zsd7200 I would recommend running it in the sugar VM if you can. That should be the sure-fire way to fix the issue. I didn't do that because of my under-powered laptop.

iclare commented 4 years ago

I'm using ~quozl/sugar-live-build-20200317 and I tried to start the latest version of the activity but I end up getting this

Screen Shot 2020-04-25 at 11 48 34 PM
zsd7200 commented 4 years ago

@zsd7200 I would recommend running it in the sugar VM if you can. That should be the sure-fire way to fix the issue. I didn't do that because of my under-powered laptop.

I was using the Sugar VM when I tried all that, still got that error. I got the same thing @iclare got when I tried running the prebuilt version off of the Sugarlabs site, as well.

ghost commented 4 years ago

On Sat, Apr 25, 2020 at 10:11:04PM -0700, Zack Dunham wrote:

I was using the Sugar VM when I tried all that, still got that error. I got the same thing @iclare got when I tried running the prebuilt version off of the Sugarlabs site, as well.

Not sure how hard anyone wants to hit this, but it might run on an older SoaS.

As best I can tell, the Spins subdirectory was introduced in Fedora 24, but there was no SoaS then.

https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/24/

That came in at Fedora 25, the earliest live Sugar Desktop for which I can find an iso, so far.

This was several years after the date of the Lemonade-Stand activity but things may not have changed nearly so much that it wouldn't work:

https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/25/Spins/i386/iso/

ghost commented 4 years ago

Further discussion about Lemonade-Stand is still appropriate for this issue, but @iclare, @eza5640, and @zsd7200 should also start at least one more issue, specific to development for Lemonade-Stand, as per https://github.com/ritjoe/sugarizer-lite/wiki/develop-and-refine

zsd7200 commented 4 years ago

@ritjoe I tried downloading both of the available precompiled .xo file from the Sugarlabs releases page on that older version of SoaS that you linked, and it still did not work. From there, I tried installing it using git, and that had no luck, as git does not exist on this version of SoaS. Then, I had the thought to download the repositories as ZIPs, extract them, run the install commands, and hope and pray that that would work, but then, nothing. Not sure if it's just this version of SoaS, but when I go to the journal after completing a download, it only shows me the first readable file. As far as I know, I cannot extract, I cannot view other files, and because of this, I can't seem to install FortuneEngine nor lemonade-stand.

BlueJay89 commented 4 years ago

For the purposes of those attempting to port this there is a developer documentation page found at

https://wiki.sugarlabs.org/go/Lemonade_Stand/Developer_Documentation

jrtechs commented 4 years ago

The last thing left to do is transfer the information in this issue to a markdown file in the HFOSS folder. I can get around to doing this tonight.

jrtechs commented 4 years ago

@ritjoe do we close the issue now that the PR is pushed?

deejoe commented 4 years ago

Thanks for asking, it's a reasonable thing to consider at this point.

For consistency's sake across the issues until the semester wraps let's leave them open, please.

I have a notion to go through and close them at some point after, though we'll see how that goes.

-- Joe