Presenting: Lemonville

This one was a ton of fun. I’ve been wanting to make this one for a little while. Chase’s work on the CS Intro 4 course got me even more excited about it. I remember playing this game hundreds of times in the Apple ][ labs that we had in our school district. This week, I present: Lemonville!

Use the following URL to import the game into MakeCode Arcade:

Lemonville is very much inspired by Lemonade Stand, created by Bob Jamison for the Minnesota Educational Computing Consortium (MECC), and by Charlie Kellner’s port of the game to the Apple ][.[1] I use the same algorithm that Kellner used to determine the number of glasses of lemonade sold on a particular day as well as his algorithms to determine the day’s weather and events, so this version should be quite faithful to his interpretation. I’d love to see Jamison’s original code to see what liberties Kellner took when adapting the game to the Apple ][.

While I used Kellner’s code as a base, I made some tweaks:

  • You can set the length of the game, instead of always playing the game for 30 days.
  • The default prices have been adjusted a bit.[2] You can choose to use the original prices, too.

This game is written in JavaScript. It allows for a ton of customization, from the graphics and music used to the values used when calculating events. Take a look at the constants in custom.ts if you’d like a starting place for your customization. It also works quite well on hardware! (Be sure to set the HARDWARE flag in main.ts before compiling for hardware. There is only one place where I had to make an adjustment to accommodate the memory limitations of hardware devices.) As of version 1.1, the HARDWARE flag is set automatically. Thanks, @mmoskal and @jwunderl, for that tip!

I’ll come back to this one down the road, I’m sure. (See additional posts below.) For now, have fun! Hope you enjoy!

[1] You can play the Apple ][ port and view its source code at the Internet Archive.

[2] If you put the 1973 prices into an inflation calculator, then lemonade should cost 30 cents per glass in 2019. After doing a little research at my local store, lemonade made from a popular, unsweetened packet of mix only costs about 12 cents, including a plastic cup and sugar. I used this as the basis for my 2019 price adjustments. I was happy to see that the cost of lemonade hadn’t kept up with inflation. :smile:

See all of my MakeCode Arcade games and extensions here!


One of the things that I want to do with this game is directly inspired by Chase’s work in the CS Intro 4 course. In one of the lessons there, he uses a set of extensions that he has created to analyze some data collected during a session of Lemonade Stand. This is a natural extension to this game.

  • Add data collection routines when changing days.
  • Plot the data at the end of the game on a variety of scatter plots.

Once Chase’s extensions are made public, I’ll head back into this game to add these features. Tip of the hat to you, Chase! Great activity!

cc: @ChaseMor


As I mentioned, writing this game brought me back to my childhood. In researching this game, I happened to revisit another childhood pastime, which brought back many wonderful memories: Sitting at a computer, squinting at a book or magazine as I entered code.

I was looking for something completely unrelated when I came across an Apple ][ game mentioned in a discussion forum somewhere. The author of the post indicated that he had written a game when he was a kid, and that it was published in a magazine called Electronic Fun with Computers and Games. One quick hop over to the Internet Archive’s Magazine Rack, and I found it.[1]

So, I thought, why not? I fired up my Apple ][ emulator and banged away for an hour or so. I was smiling nearly the entire time, recalling the same enjoyment that I had as a kid doing the exact same thing on my Tandy Color Computer 2 with my copies of Rainbow, BYTE, and Compute. I even played the game for a little while!

I’m hoping that, with MakeCode Arcade and all of these other wonderful tools that we have at our fingertips, a new generation of kids will look fondly on their childhood memories working with code.

[1] 3-D Tunnels of Terror


bro you are a legend
I have a concept of how that algorithm might work, but I haven’t looked at the code yet.
I used a random number generator, then used if statements to do stuff when certain numbers are shown. I don’t really know code that well so yeah

1 Like

Alex, you can use control.ramSize() instead of a custom hardware flag.


For an example of that ramSize is used to set a limit on how many particle effects can exist at once depending on the hardware here (mainly just the different comparisons there might be useful, the IIFE is a bit overkill)


Ooh! Thanks for that, @mmoskal and @jwunderl! I know I did something similar for Salvo. I may have done that for other games, too. I’ll go back and update these two games this week.


I love the menus. I’ve wanted to make an rpg for a while, and these menus can act as inventory slots (you know what, I’ll do one better. A platformer with items that you can use to help progress) either idea could work