What do you want to see?

What kind of things do you want to see from this DevBlog? We currently have posts talking about code, and showing off screenshots, and general progress as well. But if there is a certain kind of content you’d like to see more, or something we haven’t even covered, please leave a comment!

Once all the paperwork goes through, I’ll likely make a social media presence more felt and have these blog posts auto-shared to them. Thus making the blog a bit easier to follow.

Progress

Been mostly working on documentation. Mark and I are brainstorming equipment effects and abilities right now, and we’re keeping things over at Google Drive.

As such, not a lot of Unity specific progress to show off. I plan to take some time this weekend though and finish the basic skeleton layout for a few of the menus. Will likely share some screenshots/gifs when I do.

Refactoring

So, I posted that gif of the title screen on reddit the other day. A lot of good discussion going on. Something came up thanks to u/Archimagus that caused me to refactor the code that moves my camera.

Previously, it looked something like this.

if (currentDirection.x == 1){

if (transform.position.x < targetPositions[x].x){

Move camera code

}

}

This went on for direction being -1, and for y and z as well. All in all, to move the camera was 122 lines of code.

After Archimagus reminded me of some basic functionality, it’s now looks more like this:

if (Vector3.Distance(transform.position, targetPositions[x]) > threshold){

Move camera code

}

And that’s it.

18 lines.

104 lines of garbage code eradicated. Felt pretty good. I also use Mathf.SmoothDamp now for determining the movement, and it makes it a lot smoother.

Needless to say it makes it obvious both how new to Unity I am, and how rusty I am at programming that I forgot about calculating the distance between two Vector3’s.