BlockyRoad

Introduction:

For those who are here for the first time, i’ve decided to take on a side project in my spare time, both because it improves my craft and that i’ve always wanted to make an app and i am yet to do so.
So here’s the pitch, BlockyRoad (please be kind Hipsterwhale) is a puzzle solving game based on a grid system, in which the player must navigate their way through traffic to achieve victory.
So why am i making this, well as i mentioned before ive always wanted to make an app based game and also i noticed my niece was playing problem solving games. she liked both the challenge and liked the aspect of customising aesthetics of that particular game and i figured i could make something that appeals to market.

Improved function:

As mentioned above this is my first time making an app which meant there has been a lot to learn, both with making the touch functionality possible and with scaling to multiple devices.

A great part of challenging yourself is identifying your weaknesses, my main one currently is planning, While its great to run with your ideas, how you approach you makes all the difference. Recently i’ve have been more focused on making it happen, then making it happen well.

This reflected early on in BlockyRoad, in the form of multiple copies of similar scripts and poor functions.

Instead of each script being a slight variance, now every unit was controlled by the same with variables. A Enum was made for easy of use, so that the orientation could be picked and be taken care of, only having to edit the start position variables.

if ((Input.touchCount > 0) && (Input.GetTouch(0).phase == TouchPhase.Moved))
{
if (direction == Orientation.X)
{
Vector3 touchDeltaPosition = Input.GetTouch(0).deltaPosition;
if (touchDeltaPosition.x > 0.5)
{
rb1.MovePosition(transform.position + move);
}
else if (touchDeltaPosition.x < 0.5) { rb1.MovePosition(transform.position - move); } }

else { Vector3 touchDeltaPosition = Input.GetTouch(0).deltaPosition; if (touchDeltaPosition.y > 0.5)
{
rb1.MovePosition(transform.position + movealt);
}
else if (touchDeltaPosition.y < 0.5)
{
rb1.MovePosition(transform.position - movealt);
}
}
}

Previously the movement was smooth, which had a feeling of realism but ultimately wasn’t the intended direction of the game. Also as the game involves precise path positioning it makes sense to move the objects in in a snap time grid system. For this reason the  positions that were previous being moved based on Time.deltatime, have been changed in favour of Mathf.Round.

Vector3 movealt = new Vector3(Mathf.Round(-1), Mathf.Round(0), Mathf.Round(1));
Vector3 move = new Vector3(Mathf.Round(0), Mathf.Round(0), Mathf.Round(1));

This process culled six scripts and also improved general feel for the game.

Updating:

The past week I’ve continued updating and improving BlockyRoad.

Here is a few things I’ve improved:

UI:

MainMenu

Now Actually has a main menu screen, which you can navigate by scrolling through and double clicking on windows that you want to expand.

I wanted the main menu system to reflect the upbeat nature of the game, so it was always my intent to create all the menus out of voxel art and to have soft round text. which makes the UI look more playful in the end.

This being said the touch still isn’t 100% and sometimes has trouble reading, which will have to be addressed at some stage, currently i’m aiming to get the proof of concept out as fast as i can.

Winning:end

You can actually win now, that’s probably needed right? So upon reaching the traffic light and the far right hand corner now activates a completed menu, once again i used the same design language as the main menu UI, both for consistency and to reflect that same playful nature.

Shop/Currency:

Shop1

A Shop has been added to the main menu UI, here you can purchase other models to use in game through a currency based system that you receive upon completion of levels.

This data is stored in the PlayerPrefs on the device, which isn’t exactly the safest form, as this can easily be modified or manipulated by others, however in this instance, one the unlockables are not purchased with real money and two this probably doesn’t call for cloud based storage

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public static class Superscript
{
public static int TilEmpty = 0;
public static void SaveInt(int value)
{
PlayerPrefs.SetInt("coins", value);
}
}

view raw
gistfile1.txt
hosted with ❤ by GitHub

I went with PlayerPrefs as it is a simple way to retain data and unlockables during each play.

Models:

New models were added, this time i created them in Magicavoxel instead of Blender, i did this both because i wanted to learn more about Magicavoxel and because it is a really simple way to make block assets.

i was worried that they would stick out like sore thumbs next to the other models but they surprisingly don’t and actually fit in quite well.

Firetruck

Sound:

Pivot:

I’m going to be honest, BlockyRoad isn’t all rainbows and farts. Its come to a point in the build were program design is playing a factor both in compatibility and user-ability issues. Its due to my drive to make things instead of thinking things through first, a common issue i’m having.

If i’m serious about finishing this project in any sort of decent shape, Its time for a pivot and overhaul in design, it wont be a quick process. It will involve a whole new set of paper work and redesigning. Something that i wont be able to address now as i have other projects to think about. However should be addressed in the next month.

Moral of this story, always….plan….ahead.

 

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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