vrijdag 23 juni 2017

Hinge Joints, Music and so much more that I never ever mentioned.

Over the past few weeks I've been so darn busy, it's not even normal.

I've been creating some amazing windmills with hinge joints for my obstacle games.

I've written my own soundtrack for my "Project Vrij" bus game.


I've made SFX for both games.

I've made a trailer for my Playful Worlds Game.


I also finished up my other team project in C++.
Quite a hectic time indeed. But it's almost Summer Holidays, so lots of ice cream and more projects. :)

zondag 11 juni 2017

HKU - Building Playful Worlds - Tower of the Arch Mage - Part 2.

Procedural Generation is quite a challenge. But I managed to get at least the room generator working over the past few weeks, it has a dynamic size adjustment and the room numbers are variable.

I am now trying to get corridor generation to work, it is... quite tricky to say the least.

I am trying to generate the corridors by getting a random position from within each room. I take the x value of one room and the y value of another to define a point. Using that point I want to draw a floor between the three points. Quite tricky indeed.

After a long hassle I finally managed to combine two pieces as seen above.

Here I have multiple rooms connected to a single room.

Now I have every room connected to a random other one. The worst that could happen is that room end up in two islands, so, I had to revise my method, a more organised, maybe less random one at that. I simply connect each number of the room toward their next one. Since rooms are already random that shouldn't make it far less random.

After some overlapping preventions in place it now looks quite tidy.

donderdag 18 mei 2017

HKU - Building Playful Worlds - Tower of the Arch Mage - Part 1.

This is another update for my Tower of the Arch Mage project. A game I make for the "Playful Worlds Unity lessons" at the HKU.
The first thing I wanted to make sure is that I have a pixel perfect camera. I used an imported camera script from the store. But I had to sprite textures and make them work in a pixel-perfect enviroment.


I really like making sprites. Unity wasn't originally made to exactly replicate pixels in a 2d enviroment, but by finding the right tricks you can get quite far.

I also wrote a small script to have a procedurally generated terain from two different textures. (with some help from Arjan Cordia)
The map generator I use for this project is an edited version of the map creation engine from "Object Oriƫnted Abyss 2". Here's an example of the instantiation code.

Bus Game Part 1

Last weekend I made a prototype of a very simple, but very exciting game. It was made as a prototype of a game concept to use in my school project : "Project Frei".

The idea is fairly simple. You control two busses, and these busses travel a road that progressively gets crazier.
At the moment the game doesn't have any objectives, but it is a heck of a lot of fun to play.

So, one of the things I did at first was to have a simple cube move forward. I did that with a constant translate of the z position.
Eventually I added controls (even for DS4/X360 or other Xinput compatible controllers).
The controls had to be simple and accessible.
The fun thing about the game is that it can be used both singleplayer and multiplayer. As a singleplayer game it's harder because you control two busses at the same time.

^ Open to see the current controls.

Anyway. More about the code.
Eventually I managed to add a camera to move along as well. As well as a "Collider Cage" to prevent busses from getting out of bounds. This "Playzone" sums up the z position of both the busses and divides it by 2 to have the average of both busses. it then translates itself towards that position.

I also made Jump Pads and Boost Pads. These work with a Box Collider, Once the bus hits something tagged "Jump" the bus will increase its rigidbody's y velocity by a certain amount. The same is try for "Boost" tags and the z velocity.
The bounds also translate the player back to it's original position.

As you can see in the above code I also added some camera shake. That increases the action value of the game.

I think this is an incredible fun project to work on, and I'll post more updates about it when I have more to show.

OC: Shaders and Volumetric Light.

I took a look at the tutorial by : "Brackeys".

This tutorial explains a lot about Volumetric Lights and how to apply them.

Volumetric lights are a technique used in games (and 3d animation) to create light beams cast from the light source to add more detail and highlighting to your enviroment. I think the default lighting and shaders from Unity are pretty decent. But I wanted to try to use some advanced graphic techniques.

The elements in the obstacle course now look way stronger.

All of the above examples are with using volumetric lighting on directional lights. They are even more useful on spotlight to really highlight something in a scene.

Spotlight example

So yeah. Just toying around with shaders and volumetric lighting. It's a really useful tool to highlight things and to bring a great atmosphere.
More about Volumetric light.

woensdag 3 mei 2017

HKU - Building Playful Worlds - Tower of the Arch Mage - Part 0.

Here is a link to the Design Document of the Final Assessment of the Building Playful Worlds Class at the HKU.

donderdag 27 april 2017

Weather System, Instantiation and Skyboxes

So, an elemental obstacle course has to really stand out.

To do this I had to modify the teleportation system I used to a big extend. I had to add to following functionality :

  • De-instance the levels that are not being played.
    • And to compensate the telporter has to instantiate the level loaded. This is also very important for performance.
    • And thus create a small script that de-instances all the levels beside the lobby on game start.
  • Change skybox depending on the level loaded.

But the code  of the teleporter is still very clean and compact. The fact that a lot of code is pre-written in Unity helps a lot.

I also made a weather system using particles that:
  • Trails the player as the player progresses in the level. Floating above the player, making a rain system that covers the entire level is too taxing for performance.
  • Displays the correct particles and properties depending on the loaded level.