games · MIT License
Overview
A duck-care game in three files: hatch and look after your duck in DUCKPET, win coins in the DPGAMES minigames, and shop and check stats in DPSHOP, all sharing one save on the calculator.
- Owner-tested on a TI calculator
- Version 1.0.0
- 3 files · 7133 bytes
- Uses random, ti_system
This game is 3 files. Download all of them and send each one to your calculator.
Tried it? Did this program work on your calculator?
Before you run it
- TI-84 Plus CE Python · No calculator OS or Python App version has been verified.
- TI Connect CE .py transfer to the Python App, all three files; the owner's transfer details were not recorded
- All three files, DUCKPET, DPGAMES, and DPSHOP, are on the same calculator.
- DUCKPET is run first: it hatches your duck and creates the save, a list named DPET, that DPGAMES and DPSHOP read.
- The game saves after every action to the calculator list DPET. Deleting that list starts over with a new duck.
Play it here first
This is the real game, all three files. Pick a file to run, the way you would in the Python App: hatch and name your duck in DUCKPET, then feed, wash, pet, and walk it, win coins in DPGAMES, and spend them in DPSHOP. Your duck is shared between the three files, like the DPET list on the calculator, and lasts until you leave or reload this page.
TI-84 Plus CE Python · screen preview
How to play
How to play DUCKPET
About the game
DUCKPET is a virtual pet, duck style. Hatch a duck, name it, and keep it full, happy, rested, and clean. Its face shows how it feels, and it levels up from Duckling to Super Duck as you play.
The game is three programs that share one save. DUCKPET is your duck's home, DPGAMES has three minigames that win coins, and DPSHOP is the shop, the full stats, and help. Put all three on your calculator, and run DUCKPET first: it hatches your duck.
Controls
1 Feed- uses 1 food: Full +32 and Joy +4
2 Wash- uses 1 soap: Clean +45
3 Pet- Joy +18, plus 4 for each toy level
4 Nap- Energy +40, plus 10 for each bed level, but Full -4
5 Walk- find 8 coins and Joy +13, but Energy -10 and Clean -5
0- save and exit, or go back in the shop
enter- move on from a message screen marked [enter]
How to play
- Send DUCKPET.py, DPGAMES.py, and DPSHOP.py to your calculator with TI Connect CE. Keep their names.
- Run DUCKPET, choose 1 to hatch a duck, type a name of 1 to 8 letters, and pick 1 Gold, 2 White, or 3 Brown. You start with 3 food, 2 soap, and 45 coins.
- The home screen shows your duck's face and its four stats: F Full, J Joy, E Energy, and C Clean, from 0 to 100, plus your coins. When a stat drops below 35 the duck says what it needs: Hungry!, Bored!, Sleepy!, or Dirty!
- Choose an action each turn. Every action is one turn, and every turn Full drops 4, Joy 2, Energy 4, and Clean 3, so keep an eye on all four.
- Run DPGAMES to earn coins. Pond Hunt: guess which of 3 lily pads hides the coin bag. Math Dash: add two numbers. Quack Memory: remember a 3-digit code. A win pays 18 coins or more; a loss still pays 4.
- Run DPSHOP to buy food and soap, upgrade the toy and bed, and see the full stats: level, XP, day, games played, and wins.
- Every program saves after each action, so switch between them whenever you like. Choose 0 to save and exit.
Tips
- Food and soap run out. Buy more in DPSHOP before you need them: 3 food for 15 coins, 2 soap for 12.
- A duck needs at least 12 Energy and 10 Full to play minigames. Nap or feed it first.
- Upgrade the toy early: each level adds 3 coins to every minigame win and 4 Joy to every pet. Toys cost 45, 80, then 115; beds cost 60, 100, then 140, up to level 3.
- Math Dash and Quack Memory reward paying attention; Pond Hunt is pure luck, 1 in 3.
- Leave a minigame answer blank to back out without using a turn.
Good to know
- The face is the average of the four stats: ^ SUPER HAPPY at 80 or more, o Happy at 55, - Needs care at 30, and x HELP ME! below that.
- Your duck earns 1 XP a turn and 3 more for each minigame win, and goes up a level every 25 XP, up to level 9. Duckling is levels 1 and 2, Young Duck 3 to 5, and Super Duck 6 and up.
- Six turns make one day. Time only passes when you play: there is no real-time decay and your duck can never die.
- Your duck is saved in a calculator list named DPET. To start over with a new duck, delete DPET in [2nd] [+] Mem Mgmt, under List.
- To stop the game at any time, press the [on] key. The Python App returns to the shell.
Exact reviewed bytes
Source code
from random import randint as Rfrom ti_system import disp_clr as cl,recall_list,store_lists=[]def cp(n):return max(0,min(100,n))def nm():return "".join(chr(x) for x in s[16:16+s[15]])def lv():return min(9,1+s[11]//25)def pz():input("[enter]")def sv():try:store_list("DPET",s)except Exception:print("SAVE FAILED!")def ld():global stry:a=[int(x) for x in recall_list("DPET")]if len(a)==24 and a[0]==1 and 1<=a[15]<=8 and min(a[1:16])>=0 and max(a[1:5])<=100:s=a;return 1except Exception:passdef tick():for i,d in((1,4),(2,2),(3,4),(4,3)):s[i]=cp(s[i]-d)s[10]+=1;s[11]+=1def done(m):sv();cl();print(nm()+": "+m);pz()def new():global scl();print("A DUCK EGG HATCHES!")while 1:n=input("Name (1-8 letters): ").strip().upper()if 1<=len(n)<=8 and all("A"<=c<="Z" for c in n):breakprint("Letters A-Z only!")while 1:c=input("Color: 1 Gold 2 White\n3 Brown? ").strip()if c in("1","2","3"):breaks=[1,85,80,85,85,45,3,2,0,0,0,0,0,0,int(c),len(n)]+[ord(x) for x in n]+[0]*(8-len(n));sv()cl();print(n+" HATCHED!\n"+" __\n ___(o )> quack!\n \\ <_. )\n `---'"+"\nFood x3 Soap x2 45 coins\n\nMinigames: DPGAMES\nShop + stats: DPSHOP");pz()def act(c):if c=="1":if not s[6]:return "Out of food! (DPSHOP)"s[6]-=1;tick();s[1]=cp(s[1]+32);s[2]=cp(s[2]+4);return "YUM YUM!"if c=="2":if not s[7]:return "Out of soap! (DPSHOP)"s[7]-=1;tick();s[4]=cp(s[4]+45);return "SQUEAKY CLEAN!"tick()if c=="3":s[2]=cp(s[2]+18+4*s[8]);return "QUACK QUACK!"if c=="4":s[3]=cp(s[3]+40+10*s[9]);s[1]=cp(s[1]-4);return "GOOD NAP! Zzz"s[2]=cp(s[2]+13);s[3]=cp(s[3]-10);s[4]=cp(s[4]-5);s[5]+=8;return "FOUND 8 COINS!"cl();print("DUCKPET\n"+" __\n ___(o )> quack!\n \\ <_. )\n `---'"+"\nDuckieDai (TM)\nhiddenwordscanner.com");pz()if not ld():cl()if input("No duck yet!\nHatch a new duck?\n(replaces old DPET)\n1 Yes 0 Exit\n> ")=="1":new()while s:a=(s[1]+s[2]+s[3]+s[4])//4;k=(a<80)+(a<55)+(a<30);L=lv()m=min(range(1,5),key=lambda i:s[i]);w=("Hungry!","Bored!","Sleepy!","Dirty!")[m-1] if s[m]<35 else ""cl();print(nm()+" Lv"+str(L)+" "+("Duckling","Young Duck","Super Duck")[(L>2)+(L>5)])print(" __\n ___("+"^o-x"[k]+" )> "+("SUPER HAPPY!","Happy duck","Needs care","HELP ME!")[k]+"\n \\ <_. ) "+w+"\n `---'")print("F"+str(s[1])+" J"+str(s[2])+" E"+str(s[3])+" C"+str(s[4])+" $"+str(s[5]))c=input("1 Feed("+str(s[6])+") 2 Wash("+str(s[7])+")\n3 Pet 4 Nap 5 Walk\n0 Save + exit\n> ").strip()if c=="0":sv();cl();print("Saved! QUACK! SEE YOU!\nGames: DPGAMES\nShop: DPSHOP\nDuckieDai (TM)");breakif c in("1","2","3","4","5"):done(act(c))
- Filename
DUCKPET.py- Size
- 2632 bytes
- SHA-256
ef89db1add24a4f713dcf71053207f3d900428b15c60ce430fe20019e367b70d
DPGAMES.py
from random import randint as Rfrom ti_system import disp_clr as cl,recall_list,store_lists=[]def cp(n):return max(0,min(100,n))def nm():return "".join(chr(x) for x in s[16:16+s[15]])def lv():return min(9,1+s[11]//25)def pz():input("[enter]")def sv():try:store_list("DPET",s)except Exception:print("SAVE FAILED!")def ld():global stry:a=[int(x) for x in recall_list("DPET")]if len(a)==24 and a[0]==1 and 1<=a[15]<=8 and min(a[1:16])>=0 and max(a[1:5])<=100:s=a;return 1except Exception:passdef tick():for i,d in((1,4),(2,2),(3,4),(4,3)):s[i]=cp(s[i]-d)s[10]+=1;s[11]+=1def done(m):sv();cl();print(nm()+": "+m);pz()def pond():c=input("POND HUNT\nOne lily pad hides\na coin bag!\nPad 1, 2 or 3? ").strip()if c not in("1","2","3"):return Nonex=R(1,3);cl();print("Treasure was at pad",x);return c==str(x)def math():a=R(1,12);b=R(1,12);c=input("DUCK MATH DASH\n"+str(a)+" + "+str(b)+" = ? ").strip()if not c:return Nonecl();print(str(a)+" + "+str(b)+" = "+str(a+b));return c==str(a+b)def echo():n=str(R(100,999));input("QUACK MEMORY\nRemember: "+n+"\n[enter] when ready");cl()c=input("What was the code?\n> ").strip()if not c:return Nonecl();print("Code was "+n);return c==ncl();print("DUCKPET GAMES\n"+" __\n ___(^ )> play time!\n \\ <_. )\n `---'"+"\nDuckieDai (TM)\nhiddenwordscanner.com");pz()if not ld():cl();print("No duck found!\nRun DUCKPET first.")else:while 1:cl();c=input("PLAY WITH "+nm()+"\nEnergy "+str(s[3])+" Coins "+str(s[5])+"\n1 Pond Hunt\n2 Math Dash\n3 Quack Memory\n0 Save + exit\n> ").strip()if c=="0":sv();cl();print("Saved! QUACK!\nDuckieDai (TM)");breakif c not in("1","2","3"):continueif s[3]<12 or s[1]<10:cl();print(nm()+" is tired!\nFeed or nap first\nin DUCKPET.");pz();continuecl();w=(pond,math,echo)[int(c)-1]()if w is None:continuetick();s[3]=cp(s[3]-7);s[4]=cp(s[4]-3);s[13]+=1if w:k=18+s[8]*3;s[5]+=k;s[12]+=1;s[11]+=3;s[2]=cp(s[2]+16);done("WIN! +"+str(k)+" COINS")else:s[5]+=4;s[2]=cp(s[2]+6);done("GOOD TRY! +4 coins")
- Filename
DPGAMES.py- Size
- 2048 bytes
- SHA-256
27ecb8bf4e45744bfb65330e1ee16005c4022904c6f336de6576dda1b40634c7
DPSHOP.py
from random import randint as Rfrom ti_system import disp_clr as cl,recall_list,store_lists=[]def cp(n):return max(0,min(100,n))def nm():return "".join(chr(x) for x in s[16:16+s[15]])def lv():return min(9,1+s[11]//25)def pz():input("[enter]")def sv():try:store_list("DPET",s)except Exception:print("SAVE FAILED!")def ld():global stry:a=[int(x) for x in recall_list("DPET")]if len(a)==24 and a[0]==1 and 1<=a[15]<=8 and min(a[1:16])>=0 and max(a[1:5])<=100:s=a;return 1except Exception:passdef tick():for i,d in((1,4),(2,2),(3,4),(4,3)):s[i]=cp(s[i]-d)s[10]+=1;s[11]+=1def done(m):sv();cl();print(nm()+": "+m);pz()def shop():while 1:cl();c=input("DUCKPET SHOP $"+str(s[5])+"\n1 Food x3 15\n2 Soap x2 12\n3 Toy Lv"+str(s[8])+(" MAX" if s[8]>2 else " "+str(45+35*s[8]))+"\n4 Bed Lv"+str(s[9])+(" MAX" if s[9]>2 else " "+str(60+40*s[9]))+"\n0 Back\n> ").strip()if c=="0":returnif c not in("1","2","3","4"):continuei=int(c)+5if c in("3","4") and s[i]>2:continuep=(15,12,45+35*s[8],60+40*s[9])[i-6]if input("Buy for "+str(p)+"? 1 Yes 0 No: ").strip()!="1":continueif s[5]<p:cl();print("Not enough coins!\nWalk or play games\nto earn more.");pz();continues[5]-=p;s[i]+=(3,2,1,1)[i-6];done("PURCHASED!")def stats():L=lv();cl();print(nm()+" ("+("Gold","White","Brown")[s[14]-1]+")\n"+("Duckling","Young Duck","Super Duck")[(L>2)+(L>5)]+" Lv"+str(L)+" XP "+str(s[11])+"\nDay "+str(1+s[10]//6)+"\nGames "+str(s[13])+" Wins "+str(s[12])+"\nToy Lv"+str(s[8])+" Bed Lv"+str(s[9])+"\nFood "+str(s[6])+" Soap "+str(s[7]))print("Full "+str(s[1])+" Joy "+str(s[2])+"\nEnergy "+str(s[3])+" Clean "+str(s[4])+"\nCoins "+str(s[5]));pz()def hlp():cl();print("HOW TO PLAY\nDUCKPET: care for duck\nDPGAMES: earn coins\nDPSHOP: shop + stats\nStats drop each turn.\nToy: more joy + coins\nBed: better naps\n6 turns = 1 day");pz()cl();print("No real-time decay\nand no permanent death.\nSaves to list DPET -\ndon't delete it!\nDelete DPET to start\na brand new duck.");pz()cl();print("DUCKPET SHOP\n"+" __\n ___(o )> shopping!\n \\ <_. )\n `---'"+"\nDuckieDai (TM)\nhiddenwordscanner.com");pz()if not ld():cl();print("No duck found!\nRun DUCKPET first.")else:while 1:cl();c=input(nm()+" $"+str(s[5])+"\n1 Shop 2 Stats\n3 Help 0 Save + exit\n> ").strip()if c=="0":sv();cl();print("Saved! QUACK!\nDuckieDai (TM)");breakif c in("1","2","3"):(shop,stats,hlp)[int(c)-1]()
- Filename
DPSHOP.py- Size
- 2453 bytes
- SHA-256
82d124461c7452e32647421845acd4446e205d106b7fb1ec5526eb83203157a2
Usage
Inputs
- Menu choices typed as numbers, then Enter
- A duck name of 1 to 8 letters A to Z, and a color
- Minigame answers: a lily pad, a sum, or a 3-digit code
Outputs
- Your duck's mood face, level, and its fullness, joy, energy, cleanliness, and coins
- Three minigames that win coins and XP
- A shop for food, soap, toy, and bed upgrades, and a full stats screen
Units: Coins and stat points; no units.
Assumptions and limitations
Assumptions
- All three files, DUCKPET, DPGAMES, and DPSHOP, are on the same calculator.
- DUCKPET is run first: it hatches your duck and creates the save, a list named DPET, that DPGAMES and DPSHOP read.
Constraints
- The game saves after every action to the calculator list DPET. Deleting that list starts over with a new duck.
- Time passes only when you take a turn; there is no real-time decay and no permanent death.
Known failures
- The game needs the calculator's ti_system module to clear the screen and save; on a computer it stops with an import error.
- If the DPET list is changed by hand so it no longer looks like a DUCKPET save, the game ignores it and offers to hatch a new duck.
Compatibility and review
- Review status
- Owner-tested on a TI calculator
- Tested on
- Owner reports personally running all three files on a TI-84 Plus CE Python calculator; the test date, OS version, and Python App version were not recorded
- What happened
- Owner reported pass on the calculator: the three files run and share the DPET save. The published files are the owner's files unchanged.
- Dependencies
- random, ti_system
- Calculator names
DUCKPET,DPGAMES,DPSHOP— keep these names: the files open each other's saved data by name- Desktop test cases
- Not available for this interactive-only source
This exact source auto-launches an interactive calculator session, so compatibility evidence comes from the recorded physical-device review rather than an importable desktop fixture.
Transfer and launch
Download the .py file, send it to your calculator with TI Connect CE as DUCKPET or another name, then open the Python App and start a game. Press [on] to stop at any time. This release has no verified calculator OS or Python App version; treat transfer and execution as unverified until independently tested.
Full installation and troubleshooting guide. Check your teacher's or exam's rules before using any program.
Version history
- 1.0.0 — current version, published . Download this reviewed version
Related learning
Enjoying a DuckieDai game? Every game and program here is free. If you would like to say thanks, you can leave a tip on Cash App ($duckiedai214) or read what tips pay for.
Independent compatibility resource: Hidden Word Scanner is independent and is not affiliated with or endorsed by Texas Instruments. TI product names describe compatibility only.
Action-count privacy: Successful downloads, preview starts, and preview completions increment same-origin aggregate counters, and so does a Yes or No answer about whether the program worked. Your browser notes that you answered; that note is never sent to the site. No entered values, source text, IP address, account, cookie, device identifier, or fingerprint is stored with these counts.