Tag Archives: unity3d

Dev Update – Parallax!

I’m sure you’ve played a few 2D side-scrollers. I’m sure some of those implemented parallax scrolling as well. If you don’t already know, parallax can be described as follows:

Parallax is a displacement or difference in the apparent position of an object viewed along two different lines of sight, and is measured by the angle or semi-angle of inclination between those two lines. As the viewpoint moves side to side, the objects in the distance appear to move slower than the objects close to the camera.

One great example of this is standing in a forest, looking out and seeing many tree trunks. If you focus on one tree as you side-step in one direction while looking forward, you’ll see trees farther away are moving slower and trees closer are moving faster in respect to the one you chose to focus on. Making sense? Good! Anyway, I wanted to show a quick clip of what our parallax looked like.

Parallax in the flesh!

Parallax in the flesh!

Neat, huh? The process behind this is actually remarkably easy. Each “layer” of art gets its own parallax factor. This is just a multiplier that will be applied to the speed of the camera moving. If the parallax factor is less than 1 but greater than 0, the layer will move slower than the camera (such as the ocean at 0.8). If the factor is negative, they will move faster than the camera (such as the light posts at -.1). The pavement, pillars, and the car are all on the same layer as the player, so they move at normal speed (essentially 1.0).

Also, giving a shout-out to GifCam which was used to make this gif. Super easy and free (donations accepted!). Pretty much as good as the Snipping Tool for Windows. Will definitely be using in the future for posts here.

Tagged , , ,

More on Git

So with the new project, I’ve chosen to stick with good ol’ git to manage our version control. This is quite a challenge when it comes to Unity3D, as there’s a large number of irrelevant files that will get changed, added, and deleted which really should be ignored. In comes .gitignore. Without it, version control in Unity would be a nightmare. It took me a bit of searching to find a nice list of the type of files I should be excluding, so I want to make sure to post it here for anyone else that might need it:

# =============== #
# Unity generated #
# =============== #
Temp/
Obj/
UnityGenerated/
Library/

# ===================================== #
# Visual Studio / MonoDevelop generated #
# ===================================== #
ExportedObj/
*.svd
*.userprefs
*.csproj
*.pidb
*.suo
*.sln
*.user
*.unityproj
*.booproj

# ============ #
# OS generated #
# ============ #
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
Thumbs.db
/*.csproj
/*.sln
/*.userprefs
/*.sln
/*.csproj

Also, just starting using Sourcetree instead of TortoiseGit to have a bit more of a visual process for those new to VCS’s. They’re also the makers of bitbucket.org which we’re using to host the project so obviously the support is there! Currently exploring the possibilities of GUI elements for Unity! Quite handy (and a hell of a lot easier than using pygame to make simple windows!).

Tagged , ,

Hello Again World!

It’s been while (over a year!) since I last posted here. Work got busy, the Java game fell through, and just didn’t have time to mess around with my Python project or blog. Well, I might get back into this as an artist friend of mine has been interested with learning Unity3D and experimenting with creating a game. I, also been wanting to check out Unity3D, eagerly jumped on board to help out with the scripting. So, from Python to Javascript and now to C#, I seem to be getting a healthy exposure to some common scripting languages! 

Unfortunately, this project is a private one to protect our art assets. We may open it up in the future or may pursue actually trying to put something on the app market. Who knows! Either way, I’d still like to post what I can here and maybe show off some releases if we can ever make something presentable! 

Tagged , , , ,
%d bloggers like this: