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

Develop Lemonade-Stand for Sugarizer #22

Open zsd7200 opened 4 years ago

zsd7200 commented 4 years ago

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 commented 4 years ago

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.

iclare commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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

zsd7200 commented 4 years ago

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 commented 4 years ago

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.