Building a Javascript game Day 4

4 days in a row working on this little game. Everything starts to pay off, and at the same time, I am already feeling that recurrent thinking of giving up. After all, I doubt I will be able to finish the game in time (my own imposed schedule), and even worse, I doubt I could make any profit from it as well. Lets be honest. My hard-disk is populated by dozens of zombie corpses of unfinished projects. Even some finished ones are left to rot there on their own so this one would not be an exception either.

During day 4 I worked on the game’s logic. Hooking model with the renderer turned to be a pain, not because the game is complicated, but because I tend to be goofy when doing things. For example this code:

for (let j = c; j < this.columns - 1; j++) {
	this.elements[row][c] = this.elements[row][c + 1];
	this.elements[row][c].column = j;

if supposed to fold the bubble matrix when removing a whole column. I banged my head for like an hour trying the find a fix for a bug everywhere else but here. Where every c in the for body, must actually be j instead. And I did two like this one so could have finished way before than I did.

Other than that, the model is in place. Bubble visual nodes react to input and game model’s events. I also polished a few details on the rendering pipeline.

The result so far, is this one:

Day 5 will be to finish the model, and add some power ups. Or maybe will be an spare day for playing The Division 2. 50-50 chance either side.

Published by ibon

Chocolate engineer, software eater. Cool stuff at Past: Workday, Platochat, SdkBox, Chukong, Ludei.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: