Skip to content

PF: dev_0.0.3, Playground Updates

Big changes for today folks!

So, to start off I would like to apologize for the late post. I usually try to post these on Saturday but my day was a little hectic and I am only one man that can only do so much. However, I hope that today’s dev blog will make up for it!

First up, I have added a small addition to the egg selection menu: Bloop stats! Before you select a Bloop, it will show you a graphical indication of their stats and how you will raise them. More stars means they are easier to raise in that regard, lower meaning they are harder to raise.

The smiley face is a Bloop’s happiness stat, known as contentedness in the game. This stat determines how often a Bloop’s happiness goes down as time goes on; higher contentedness, longer happiness.

The apple is the same concept as happiness, but for hunger. In the game it’s known as metabolism and it works in the same way as happiness does.

Next, I have gotten a solid playground area done! The playground is the main area where you can see your Bloop move around and where you can interact with it! As of right now it isn’t too flashy, but I have successfully gotten a popup menu working with proper transparency! (It might not seem like much, but it’s the little wins.)

So far there are only five buttons in the popup menu: food, exercise, stats, games, and sleep. I want to eventually add scrolling in the future, but I figured that these 5 buttons are good for now. As I implement more things to do in the game, this list will expand for there to be more to do!

Also, as you can see from the gif, Red has been temporarily removed from the game and replaced with my signature Bloop, Dev! As the name suggests, Dev is a development Bloop where I can make quick changes to the Bloops and not have to worry about graphics until I have the base of the game down. Don’t worry—Red will make their return! (along with all the other Bloops from dev blog 1.) For now, I want to focus on making the game as polished as I can. Not only that, but Dev will not be here forever! After I am done developing the game, they will be removed (or, at the very least, hidden away as a secret for you to find 😉.) If you play any development versions, make sure to say hi to them while you can!

Now, for the boring programming stuff.

I recently changed the way that all sprite images were loaded into the game. My method before was having multiple separate images for a sprite and loading them one by one into the game. After some thinking and consideration, I had a realization—that’s a sh*tty way of doing it. Having lots of files not only slows down loading time, but that would mean having to have a separate name for every file e.g. 00.png, 01.png, 02.png. etc. for all the frames of the animation.

I decided to move to what basically every 2D game developer before me has, sprite sheets. Just in case anyone reading is unaware, a sprite sheet is a single image which contains all the frames of the animation that is cut up by the game.

As an example, this is Rainbow’s egg sprite sheet. Animating their egg was fairly easy, as it was just creating a looping texture and moving it across the screen to create a moving rainbow effect.

Because each sprite sheet has slightly different dimensions and images, each sprite sheet also has a .json file that tells the game the properties of the sprite sheet and how to split it up.

  "width": 17,
  "height": 17,
  "frames": 48

Here is Rainbow’s .json file for their egg. It defines the size of one frame and how many frames there are. In Rainbow’s case, their egg is 17×17 pixels big and consists of 48 frames of animation. The game slices the sprite sheet like an English speakers would read a paragraph: left to right, top to bottom. In other words, the first frame would be the top left image, the next one would be the one to the right, the next one would be to the right of that, and so on until it got to the end of the image. Then, it would start at the left on the next row.

I created a separate class for loading in these sprite sheets to make it easier, and after a few tweaks here and there it was done! Every image that isn’t purely static is loaded in using a sprite sheet; even the icons for the popup menu! Anything else that doesn’t change is blitted onto the screen.

Other than a few changes here and there, as a closer I would like to talk about something special. I’m putting Pocket Friends on actual hardware!

Pocket Friends started after my girlfriend gave me a Tamagotchi for my birthday, and ever since then I have loved it (I even got Pochitchi on my first try!) I instantly knew that I wanted to create my own little friends, and since then I have been working on Pocket Friends. It was actually the hardware that started me on this journey, not the game first (kind of a weird cause and effect but it worked out.)

These are the current parts I have going for it:

As the game is being programmed in Python using Pygame, I figured the best way to mobilize it would be to use a Raspberry Pi Zero. I ordered one from Adafruit along with their PowerBoost 500 Charger, a Lithium Ion 3.7V, 2000mAh battery, and their 1.3″ Color TFT Bonnet. Adafruit had basically all of the components I wanted, and after a quick shopping trip there and another one on Amazon for some M2.5 standoffs and screws, I am now ready to start assembling the hardware completely!

Below you can find a video where I explain stuff in a little more depth, and show off the game on the screen.

I have also started designing a case to 3D print so that it’s not just a jumble of wires.

This is only a very basic shell so far, but I have gotten farther that I thought I would have in this week, so I’m going to call that a win for me :).

…and that’s it for this week! This week has been a pretty productive one and I’m proud to have gotten as far as I have after not having anything to show for last week.

As always I appreciate all the support I get, and I will see you all next week!


Leave a Reply

Your email address will not be published. Required fields are marked *