Snack Shop

Snack Shop

6 devlogs
6h 12m
•  Ship certified
Created by Kcoder

You are a little apple that has just bought its new snack shop. Buy snacks for cheap from the pears and sell them for a 1.5x price to the other fruits and get rich. Snack Shop is a mini game built in pure Python and PyGame with no game engine, just pure .py files.

Timeline

Ship 1

1 payout of shell 119.0 shells

Kcoder

6 days ago

Kcoder Covers 6 devlogs and 6h 12m

Shipping it took so looooong. The whole reason this happened is that PyInstaller, the thing I was using to convert my file into .exe, was acting up and kept resulting in me having to make some changes and run it again and again. I also wrote my README.md file and made some finishing touches to main.py

Update attachment

With that the game is done. It took a lot less time than I though it would. I still have to ship it write a reame.md and all of that but the actual game is done. You can buy from the pear view what you have and then sell for even more money. dont forget the bonus coins that spawn every minute!

I added the coin farm, where a coin spawns every minute or so, and I added three fruits that will buy the three snacks in random positions inside the farm.

I gave the pear that you buy things from a truck and next I wanted to add a storage where you can see what you have. I obtained a shack top-view PNG and added it to the game. Next, I added another NPC there that shows a modified version of the shop that shows stock. I couldn't just hardcode the stock number into the image, so I created a dictionary that contains stock items and added a textbox where I needed the numbers to go.

Kcoder
Kcoder
1h 47m 7 days ago

Ahhhhh! I just dealt with the most annoying bug ever. Whenever I clicked 1, 2, or 3 to buy from shop it would buy multiple because of how fast the loop was. I tried so many different things and finally 1 worked. I also took me a lot of iterations to get the shop and the interaction text working. I know its in the wrong spot but that is just chaning cordinates so it should be an easy fix

I first read the PyGame docs for a bit and looked at some tutorials to figure out how it works, as I haven't done anything like this before. Next, I made a simple background in Canva and exported it as a JPG. After that, I got PNG images for the fence and the player. Last, I coded the player to move around and the fence to prevent the player from leaving the screen area