Changes

Jump to navigation Jump to search
1,569 bytes added ,  13:48, 12 August 2011
Line 1: Line 1:  
{{TOCright}}
 
{{TOCright}}
 +
 +
[[File:ScreenshotCloudy.jpg|500px]]
 +
 
==Description==
 
==Description==
 
This is your basic "Lemonade Stand" style game, where the player manages a lemonade stand (or similar such store) and tries to make as much money as possible. The game is designed to incorporate money and fractional math skills to teach basic operations.  
 
This is your basic "Lemonade Stand" style game, where the player manages a lemonade stand (or similar such store) and tries to make as much money as possible. The game is designed to incorporate money and fractional math skills to teach basic operations.  
  −
We plan to begin with a basic framework, e.g. text based command line, and work up based on free time. Ideally, the game will consist of graphics and a refined GUI front end, similar in look to the currently available flash implementations of Lemonade Stand (although more simplistic, being based in Python).
      
Localization will be implemented in the final phase, with the stand being written to use more regional ingredients and products.
 
Localization will be implemented in the final phase, with the stand being written to use more regional ingredients and products.
   −
==Goals==
+
==Project Status==
We're looking to create a workable prototype with the ability to buy materials and sell a product.However, the most important goal is to have a working game. While possibly not feature complete, the game should have basic functions working.
+
{{:Lemonade_Stand/status}}
   −
===Extra Features===
+
Any interest in helping can be directed towards project leader [[User:Qalthos|Nathaniel Case]] as well as any of the other listed active members. Lemonade Stand is to be considered an open project, which is currently undoergoing active development for the RIT fall quarter 2010.  Nathaniel will continue to have interest in the project and will continue to provide assistance and input as time allows beyond this time.
Based on available time:
     −
- Creating a GUI based game<br />
+
==Releases==
- Incorporating counting of money (bills and coins) to make change<br />
+
* [http://wiki.sugarlabs.org/f/fe/Lemonade_Stand_Stable.xo 1.0.0]: initial release.
- Creating seasons to vary prices and product demand<br />
+
* [http://gitorious.org/lemonade-stand-olpc/lemonade-stand-olpc/commit/aaf4186bf1403a6ee2892f9c606d676d78311f17 1.1.0](git tag): Updated game code.
- Possibly making materials perishable to increase difficulty<br />
+
* [http://activities.sugarlabs.org/en-US/sugar/addons/versions/4321#version-4 2.0, XO Release 4]: Game Rewrite
- Making an intuitive program that can be easily learned, and which has replay value
+
* [http://activities.sugarlabs.org/en-US/sugar/addons/versions/4321#version-5 2.1, XO Release 5]: Beautification Project
- Weather patterns impacting sales<br>
  −
- Advanced mode: changing the recipe for your "lemonade"<br>
  −
- Bargaining/haggling<br>
  −
- Random events that may influence supplies and/or cost and/or customers<br>
  −
- Potential use of network, competitive or cooperative modes<br>
     −
- Cool Random Events:
+
==Structure==
 +
For more detailed information on how to implement new things, please see the [[Lemonade_Stand/Developer_Documentation|Developer Documentation]]
   −
Ants steal your supplies
+
The game's 'day' is split into 3 parts (Start of day, Day occurs, and End of day)
    -10% sugar
  −
A lemon truck crashes in front of your stand
  −
    +10 lemons
      +
[[File:GameFlow2.jpg|550px]]
    +
===Morning===
 +
Supplies are purchased and plans are made for the day.<br/>
 +
A recipe may be chosen if more than one is available.
   −
==Potential Problems==
+
===Day===
Localization is likely to be a big problem in this game.  Not simply translating the words, but also translating the idea, ie. finding out what kind of shop would be reasonable to open in a country, what it might stock, etc.
+
Customers queue at the stand and buy lemonade.<br/>
   −
==Updates and Milestones==
+
===Evening===
 +
Profit is calculated by the player and 'put away'.<br/>
   −
===Updates:===
+
===Midnight===
 +
The day's activities are put together into a digest, including:
 +
* Weather forecast for the next few days
 +
* Special events that happened during the day
 +
* Current discounts on supplies
 +
* Any supplies which have perished will be listed
   −
4/28: Wiki reorganized, content added
+
Once the digest has been displayed, the game returns to morning again.
   −
===Milestones:===
+
==Difficulty Settings==
 +
===Easy===
 +
*Supplies will not perish
 +
*Prices are fixed at multiples of 25 and products yield more money per sale.
 +
*Subtotals are listed for all math problems
 +
*Math-based screens will not close while there are problems (trying to buy too many supplies, not collecting correct change)
   −
4/24: Have everyone look at the current implementations.
+
===Normal===
 +
*Supplies will not perish
 +
*Prices are more complex multiples of 5 with slightly smaller profit margins
 +
*Subtotals are listed for all math problems
 +
*Math-based screens will not close while there are problems (trying to buy too many supplies, not collecting correct change)
   −
5/1: produce a basic 'sugarized' build to work from.  Implement price fluctuations.
+
===Hard===
 +
*Supplies will perish
 +
*Prices are the same as Normal
 +
*Subtotals are listed for all math problems
 +
*Math-based screens will allow you to give bad answers (buy too many supplies, not collecting correct change)
   −
5/8: Move to a 'graphical interface' based off of pyGTK or pygame.  Add any art we have managed to collect where it seems appropriate.
+
===Impossible===
 +
*Supplies will perish
 +
*Prices are not multiples of 5
 +
*Subtotals are not listed for math problems
 +
*Math-based screens will allow you to give bad answers (buy too many supplies, not collecting correct change)
   −
==Design Decisions==
+
==Goals==
Is lemonade made at the beginning of the day (make all available lemonade at once) or on the fly (a customer asks for lemonade and it is made for them)?  This is important as it impacts the resources from day to day. In the former, normally non-perishable objects like cups will be used if they can make another drink (even beyond demand), however in the latter, it makes the game easy if you stock up on resources and slowly sell them each day.  This is usually mitigated by having perishable resources (lemons, etc) and variable prices.
+
We're looking to create a workable prototype with the ability to buy materials and sell a product.However, the most important goal is to have a working game. While possibly not feature complete, the game should have basic functions working.
   −
==Educational Standards==
+
===Additional Ideas & Features===  
[http://wiki.sugarlabs.org/go/Math4Team/Resources/Curriculum_Chart Standards found here]
+
(Based on available time)
   −
4.N.4 Select, use, and explain models to relate common fractions and mixed numbers (1/2, 1/3, 1/4, 1/5, 1/6, 1/8, 1/10, 1/12, and 11/2), find equivalent fractions, mixed numbers, and decimals, and order fractions
+
=====Completed=====
 +
* Creating a GUI based game
 +
* Incorporating counting of money (bills and coins) to make change
 +
* Cool [[Lemonade Stand/Events|Random Events]]:
 +
* Weather patterns impacting sales
 +
* Making materials perishable to increase difficulty
 +
* Making the program more intuitive so that it can be easily learned<br />
   −
4.N.6 Exhibit an understanding of the base ten number system by reading, naming, and writing decimals between 0 and 1 up to the hundredths.
+
=====In progress=====
 +
* Implementing multiple difficulties
 +
* Redesign UI
 +
* Advanced mode: changing the recipe for your "lemonade"<br />
 +
** Strawberry Lemonade
 +
** (Implemented but not purchaseable or usable)
   −
4.N.10 Select and use appropriate operations (addition, subtraction, multiplication, and division) to solve problems, including those involving money.  
+
=====Wishlist=====
 +
* Creating seasons to vary prices and product demand<br />
 +
* Random events that may influence supplies and/or cost and/or customers<br />
 +
* "Tools" to buy to increase efficiency
 +
** Juicer reduces lemon requirement of recipies by 1/2
 +
* Hidden values 'advertising' and 'loyalty'
 +
** Upgrading the stand / buying more recipies increases advertising (does not decrease)
 +
** Prices close to customer's expectations / satisfying demand increases loyalty (decreases over time)
 +
** Both could act as a multiplier to customer demand. (base demand x advertising x loyalty = actual demand)
 +
* Implementing Bargaining / Haggling<br />
 +
* Potential use of network, competitive, or cooperative modes<br />
 +
* Choosing location of Lemonade Stand within the town, would influence sales, cost of supplies, etc.<br />
 +
* Perhaps showing currency the player has letting them find total profit
   −
4.D.3 Construct, draw conclusions, and make predictions from various representations of data sets, including tables, bar graphs, pictographs, line graphs, line plots, and tallies
+
==Helping Out==
 +
One of the things we always need are new [[Lemonade Stand/Events|random events]] to make the game more interesting.<br/>
 +
Another thing which is always useful is submitting new [[Lemonade Stand/Art|artwork]].<br/>
   −
==Contacts==
+
==Fall 2010 Milestones==
*[[User:Qalthos|Nathaniel Case]]
+
* Week 3:
*[[User:Mdd8919 | Mitchell DeMarco]]
+
** Get JT's sketches into image files
*[[User:Epsilon748 | Anthony King]]
+
** come up with more events and weather ideas
*[[User:Echo35 | Anthony Lubrani]]
+
** add recipes
*[[User:Jsang1|Jonathan Sanger]]
  −
*[[User:Sss1406 | Steven Schoenfeld]]
     −
==Links and Resources==
+
* Week 4:
Coming soon!
+
** new background image
 +
** get into constants.py
 +
** define what difficulties entail, implement lowest difficulty
 +
** nail down ideas about overlays, startup screen
   −
==Code so far==
+
* Week 5:
<pre>
+
** implement two difficulties, simple and insane
#!/usr/env python
+
** Get counting game images
# -*- coding: cp1252 -*-
+
** implement basic splash screen
import random
     −
name = 'Lemonade Stand'
+
* Week 6:
 +
** Get store images
 +
** implement counting game
   −
print 'Welcome to ' + name
+
* Week 7:
 +
** Get activity log images
 +
** Implement store
    +
* Week 8:
 +
** Implement activity log
 +
** Get images for other parts of the game (events, weather, etc.)
   −
def take_input(text, default = 0):
+
==Potential Problems==
    try:
+
Localization is likely to be a big problem in this game.  Not simply translating the words, but also translating the idea, ie. finding out what kind of shop would be reasonable to open in a country, what it might stock, etc.
        in_text = input(text+" ["+`default`+"]: ")
  −
    except:
  −
        return default
  −
    if in_text < 0:
  −
        in_text = 0
  −
   
  −
    return in_text
     −
def random_Event():
+
This becomes even more difficult when moving to a graphical environment.  For every localized region we will need a different set of graphics depending on what the stand is selling.
    global stored_sugar, stored_lemons, stored_cups
  −
    event = random.randint(0, 10) 
  −
   
  −
    if event == 0:
  −
       
  −
        if stored_sugar > 10:
  −
            stored_sugar -= 10
  −
            print 'Ants steal your supplies!'
  −
        else:
  −
            stored_sugar = 0
  −
           
  −
    elif event == 1:
     −
        print 'A lemon truck crashes in front of your stand!'
+
==Educational Standards==
        stored_lemons += 10
+
[http://wiki.sugarlabs.org/go/Math4Team/Resources/Curriculum_Chart Standards found here]
       
  −
    elif event == 2:
     −
        print 'It starts raining cups!'
+
4.N.4 Select, use, and explain models to relate common fractions and mixed numbers (1/2, 1/3, 1/4, 1/5, 1/6, 1/8, 1/10, 1/12, and 11/2), find equivalent fractions, mixed numbers, and decimals, and order fractions
        stored_cups += 10
     −
    print ""
+
4.N.6 Exhibit an understanding of the base ten number system by reading, naming, and writing decimals between 0 and 1 up to the hundredths.
   −
def supply_Decay():
+
4.N.10 Select and use appropriate operations (addition, subtraction, multiplication, and division) to solve problems, including those involving money.
    global stored_sugar, stored_lemons, stored_cups
  −
    if stored_sugar > 0:
  −
        stored_sugar -= 10 % stored_sugar
  −
    if stored_lemons > 0:
  −
        stored_lemons -= 10 % stored_lemons
  −
    if stored_cups > 0:
  −
        stored_cups -= 10% stored_cups
     −
    return -1
+
4.D.3 Construct, draw conclusions, and make predictions from various representations of data sets, including tables, bar graphs, pictographs, line graphs, line plots, and tallies
   
  −
# default values
  −
cup_price = .25
  −
lemon_price = 1.00
  −
sugar_price = .05
     −
product_price = 1.50
+
==Contacts==
 +
=== Current ===
 +
*[[User:Qalthos|Nathaniel Case]]
 +
*[[User:Jlew| Justin Lewis]]
 +
*[[User:Sarah Wagner|Sarah Wagner]]
 +
*[[User:JT Mengel|JT Mengel]]
   −
#starting resources
+
=== Historical ===
bank = 100
+
*[[User:Mdd8919 | Mitchell DeMarco]]
 +
*[[User:Epsilon748 | Anthony King]]
 +
*[[User:Echo35 | Anthony Lubrani]]
 +
*[[User:Jsang1|Jonathan Sanger]]
 +
*[[User:Sss1406 | Steven Schoenfeld]]
   −
stored_cups = 0
+
==Getting the Latest Snapshot from Git==
stored_lemons = 0
+
Lemonade Stand is available either under the [http://dbad-license.org/ DBAD License] or the GPLv3+
stored_sugar = 0
     −
# take in input
+
To get the latest working version from Git, open a terminal and enter these commands:
num_days = take_input("How many days would you like to play for?", 30)
     −
for day in range(1, num_days + 1):
+
git clone git://gitorious.org/lemonade-stand-olpc/lemonade-stand.git<br/>
 +
cd lemonade-stand<br/>
 +
git clone git://git.fedorahosted.org/FortuneEngine.git fortuneengine<br/>
   −
   
+
mv fortuneengine/fortuneengine/* ./fortuneengine/<br/>
    +
If you don't have pygame, then download and install it from [http://pygame.org pygame].
   −
    print ""
+
The game can then be run by executing 'python LemonadeStand.py'
    print "____________________"
  −
    print "    Day number " + `day`
  −
    print "¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯"
  −
    print ""
     −
    random_Event()
+
==Game Play==
 +
After entering the command to run the game the following specials keys are used to actually play:
 +
*'''<ENTER>''':
 +
**From the Welcome Screen - Enters the game.
 +
**From the Main Screen - Enter the store.
 +
**From the Store Screen - Complete transaction, Leave store.
 +
**From Daily Log - Submits values entered.
 +
*'''Arrow Keys''':
 +
**From the Store Screen - Left and right arrows select a product.
 +
**From Daily Log - Up and down arrows select a monetary value (dollars, quarters, etc).
 +
*'''Number Keys''': From the Store Screen - Used to enter the desired quantity of the selected product.
 +
**From Daily Log - Used to enter the number of dollars, quarters, etc. which make up your profit.
 +
*'''<h>''': From any screen - Causes a help message to appear or disappear.
 +
*'''<ESC>''': From any screen - Exits the game.
      −
    print "You have "+`stored_cups`+" cups, "+`stored_lemons`+" lemons, and "+`stored_sugar`+" sugar left."
+
To access the different difficulty levels use the following commands to run LemonadeStand.py:
 +
*'''Easy''': python LemonadeStand.py -d 0
 +
*'''Normal''': python LemonadeStand.py -d 1
 +
*'''Hard''': python LemonadeStand.py -d 2
 +
*'''Impossible''': python LemonadeStand.py -d 3
   −
    print "Cup price: $" + `cup_price` + "    Lemon price: $"+ "%.2f" % lemon_price + "    Sugar price: $"+ "%.2f" % sugar_price
+
==Links and Resources==
 
+
* [http://activities.sugarlabs.org/en-US/sugar/addon/4321/ Activity Page]
    expenses = 0
+
* [http://gitorious.org/lemonade-stand-olpc Git Repository]
 
+
* [https://fedorahosted.org/fossrit/wiki/LemonadeStand Project Trac]
    cost_over = 1
  −
 
  −
    while cost_over == 1:
  −
 
  −
        potential_expense = 0
  −
        in_num = take_input("How many cups")
  −
        potential_expense = expenses + (in_num * cup_price)
  −
 
  −
        if potential_expense < bank:
  −
            cost_over = -1
  −
            expenses += in_num * cup_price
  −
            stored_cups += in_num
  −
        else:
  −
            print 'You cant afford that many cups'
  −
 
  −
    cost_over = 1
  −
 
  −
    while cost_over == 1:
  −
 
  −
        potential_expense = 0
  −
        in_num = take_input("How many lemons")
  −
        potential_expense = expenses + (in_num * cup_price)
  −
 
  −
        if potential_expense < bank:
  −
            cost_over = -1
  −
            expenses += in_num * lemon_price
  −
            stored_lemons += in_num
  −
        else:
  −
            print 'You cant afford that many lemons'
  −
 
  −
    cost_over = 1
  −
 
  −
    while cost_over == 1:
  −
 
  −
      potential_expense = 0
  −
      in_num = take_input("How much sugar")
  −
      potential_expense = expenses + (in_num * cup_price)
  −
 
  −
      if potential_expense < bank:
  −
          cost_over = -1
  −
          expenses += in_num * sugar_price
  −
          stored_sugar += in_num
  −
 
  −
      else:
  −
          print 'You cant afford that many lemons'
  −
 
  −
    today = min(stored_cups, stored_lemons, stored_sugar)
  −
 
  −
    # Option 1: make maximum available
  −
    #stored_cups -= today
  −
    #stored_lemons -= today
  −
    #stored_sugar -= today
  −
    #print `today`+" cups made for $"+`expenses`
  −
 
  −
    #default value
  −
    requested_sales = 5
  −
    sales = max(min(today, requested_sales),0)
  −
 
  −
    # Option 2: make as many as requested
  −
    stored_cups -= sales
  −
    stored_lemons -= sales
  −
    stored_sugar -= sales
  −
    print `sales`+" cups made for $"+ "%.2f" % expenses
  −
 
  −
    profit = sales * product_price
  −
    print `sales`+" cups were sold today for $"+ "%.2f" % profit
  −
    print "You made $"+ "%.2f" % (profit - expenses)+" today."
  −
    bank += profit - expenses
  −
    print "Current funds: $"+ "%.2f" % bank
  −
 
  −
    supply_Decay()
  −
   
  −
    print
  −
   
  −
print "Done!"
  −
 
  −
 
  −
 
  −
 
  −
</pre>
 
5

edits

Navigation menu