Tamagotchi Progress – Week 3

Here’s the in progress version from this week

Original deadlines for the week:
By Monday, Nov 27: Character list for wanderer scene, update the starting screens and the minigame entrance/exit styles. Integrate v1 of the “posting game”. Make any visual changes that stem from updating the setup for the main screen.
Wed, Nov 29: In class playtesting

I started the week by diving into the “like game” where a user fake posts to social media. I began by working on a flow within the p5 web editor. This got realllly messy for a couple of reasons – the program flow was controlled by a bunch of boolean flags, and the alpha editor would occasionally regress my version. Here’s where the prototype ended before bringing it into my main code. It was annoying working with the dom elements to handle file upload.

When it came time to integrate the game into my code, I definitely longed for a better structure. I decided to try and use my scene manager to solve this problem, and I’m decently satisfied with the result. Here’s an excerpt from the code:

let likeGameScenes = [];
let likeGameCurrentScene = 0;
likeGameScenes.push(createScene("start", function(){
this.isActive = true;
return p5img != undefined;

function likeGamePlay(){
likeGameScenes[likeGameCurrentScene].isActive = false;
if(likeGameCurrentScene >= likeGameScenes.length){
likeGameCurrentScene = 0;
like game play is called by the following code
function likeGame(){
if(followGameActive)likeGameDisable(); //makes sure the photo uploading doesn't get in the way during the follow game
else likeGameEnable();

Through my integration, I got frustrated with managing mouse clicks to new scenes. I could have used dom buttons, but I decided to change my scene manager to allow for mouse click functions to be defined per scene. This would only be used for my like game at the moment but seemed like a nice expansion of the scene manager.

function mousePressed(){
if(scenes[currentScene].mousePressed != undefined)
scenes[currentScene].mousePressed() ;

if(likeGameScenes[likeGameCurrentScene].mousePressed != undefined)

It’s a little weird since I have two sets of scenes to be checking, but it’s not a problem at the moment. In addition to bringing the like game into the code, I also tweaked some the follow game score styling, turned my greenbox into something that was more phone like, and made bare minimum improvements to the start screen.

I also crushed a few bugs along the way, but there are many many more to get rid of. The most annoying one right now is that the photo uploads on the like game ignore rotation from the iphone. I’d need to parse exif data to correct it and it seems pretty annoying.

I’ve started with with Gabriel on sprites for my wandering scene, but I need to add a lot more to my list for him to draw. In general, that wanderer scene will be the largest undertaking I have left remaining.

So overall, I give myself and 80% on my stated goals for the week. I didn’t get many of the visual improvements done that I would have like to…. Now it’s just an all out assault to get everything done by next Wednesday.

Posted in ICM

One thought on “Tamagotchi Progress – Week 3

Leave a Reply