Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop Lemonade-Stand for Sugarizer #22

Open
zsd7200 opened this issue Apr 26, 2020 · 6 comments
Open

Develop Lemonade-Stand for Sugarizer #22

zsd7200 opened this issue Apr 26, 2020 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@zsd7200
Copy link
Collaborator

zsd7200 commented Apr 26, 2020

This is the issue to discuss the development of Lemonade-Stand for Sugarizer.
I'm not sure how we want to tackle this. We could just try to blindly copy over the code from the repo and hope it works on Sugarizer after converting it to JavaScript. I don't think we would need to port over the Fortune Engine as well, but someone who knows Python better than me could probably definitively say whether we need any functionality from that or not. We could probably get away with taking specific elements from the Fortune Engine that lemonade-stand requires (like GameEngineElement in LemonadeGui.py) and recreating them in a separate JS file, but I'm not sure if that's completely necessary.

@zsd7200
Copy link
Collaborator Author

zsd7200 commented Apr 26, 2020

I would love to get started on making a baseline HTML/CSS setup, but as I only can see a handful of screenshots from the Sugarlabs release page and the FOSSRIT page about this project, I'm not sure where to start.

@zsd7200 zsd7200 added the enhancement New feature or request label Apr 26, 2020
@iclare
Copy link
Collaborator

iclare commented May 2, 2020

I was able to get Lemonade-Stand working in sugar by directly running the activity.
This only seems to work for the downloaded activity. I tried doing the same with
https://github.com/FOSSRIT/lemonade-stand but I get an error about sugar.datastore
not being found.

So to run it in sugar you need to download from the browser activity http://activities.sugarlabs.org/en-US/sugar/addons/versions/4321#version-5
and try running it once. Then you go to the terminal activity, and run cd ~/Activities/Lemonade.activity && python2 LemonadeStand.py.

Keybinds are found here http://wiki.sugarlabs.org/go/Lemonade_Stand under Game Play

@iclare
Copy link
Collaborator

iclare commented May 3, 2020

I got a skeleton going of the game using createjs. There's a splash screen, the field, and the store. No gameplay but I set up the ui for the field and transitioning between the field and store.

ian/lemonadestand

Screen Shot 2020-05-03 at 6 36 36 PM

This is all based on https://github.com/sugarlabs/Lemonade. It has just the core game unlike https://github.com/FOSSRIT/Lemonade-Stand which has some extras and new graphics, but I couldn't run in sugar.

@zsd7200
Copy link
Collaborator Author

zsd7200 commented May 5, 2020

Looks great! I can start taking a look at game code later today and get to work on that.

@zsd7200
Copy link
Collaborator Author

zsd7200 commented May 6, 2020

Just made a new branch where I converted most of the game's logic into JavaScript. Haven't hooked it into anything yet, but it's mostly all there--there's just one line I couldn't figure out how to convert. Maybe someone a bit better versed in Python can figure it out.

Here's the link to my branch.

@zsd7200
Copy link
Collaborator Author

zsd7200 commented May 6, 2020

The specific line I'm talking about is here, line 233. I have the original Python function listed above that line in the comments.

I should also note that I haven't really tried testing any of the methods I implemented, as I haven't hooked it into anything that you've done--just copied over. But there aren't any syntax errors, so that's cool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants