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.


zondag 23 april 2017

Spawnpoints and Colliders.

For the past day I have been working on a spawnpoint system. I was inspired by games like Roblox, where you would respawn on a checkpoint you touched, I wanted to recreate this within Unity.

Here is a very early example of what would be called an obstacle course. Every blue Platform counts as a checkpoint and makes the player respawn there if they lose. (Touching Killzones)


As you can see here, the code isn't quite complicated. It simply puts the player towards the spawnpoint position if the player touches a killzone and it moves the spawnzone if the player toches a safezone.

In practice this is a very early example of toying around with losing and respawning.


Update 1: I managed to add teleporters as well, I further adjusted the frequency and appearance of the spawners whilest keeping the style simple.



As you can see I've added a lobby to spawn in, whilest also having the white squares counting as a spawn point. The blue square in the lobby teleports you to the first course, which you can see in the background.
The code I used on the teleporters, is again, very simple, and uses the tag system that Unity uses. while having a gameobject from within the scene attached to it.



Update 2:
I added another level where I made blocks that fade away when you walk on them and reappear after a given time.


This was quite a challenge to set up at itself, but I used a switch-state machine to have it work flawlessly and sequential.




This way none of the states mess with each other and it automatically loops itself back to the default position (0) if you're not standing on it.

woensdag 15 maart 2017

HKU - Playful Worlds - Part 2

The past few weeks I've been busy with projectiles, mini-maps and particles.
I also did a lot of debugging and polishing.


I also worked on projectile rotation and movement, I used the Sinus and Cosinus functions to make an object rotate in a circle or an infinity sign.

dinsdag 14 februari 2017

HKU - Playful Worlds - Part 1

This week I made a lot of progress with my procedural dungeon generator. It utilises a script that places UTF-8 Characters in a certain algorithm. The next thing it does it that it uses a script that places prefab models into the scene. The player is able to move inside these objects.


XXXXXXXXXXXXXXXXXXXXXXXX
X┌─┐┌┐┌┐┌──┐┌┐┌─┐┌──┐┌┐X
X└─┴┘│├┼┼┐┌┤└┴┼─┴┤┌┬┴┴┘X
X┌───┴┴┘││├┤╔╤˄╤╗├┘└┐┌┐X
X│▼╔╤╤╤╗├┘││╟@@@╢├─┐├┘│X
X└┤╟@@@╢├┬┼┴˂@@@˃┤┌┴┤┌┤X
X┌┴˂@@@˃┴┘├┐╟@@@╢││┌┴┤│X
X│O╟@@@╢┌┐├┤╚╧˅╧╝└┼┤┌┤│X
X└┐╚╧˅╧╝├┘└┼┐┌┤┌┐┌┤│└┼┤X
X┌┤┌─┴┐┌┤┌┐├┼┼┼┤└┼┤│┌┼┘X
X│├┼┬┐├┤└┘└┤│├┘│┌┼┤├┘└┐X
X├┘├┘├┘├┬┐┌┼┴┴┬┴┴┴┤│┌┬┤X
X└─┴─┘O└┼┴┤│╔╤˄╤╗┌┴┘│││X
X┌┐╔╤╤╤╗│┌┤│╟@@@╢└┐┌┘├┤X
X└┤╟@@@╢│├┴┘╟@@@˃┬┼┘┌┼┤X
X┌┼˂@@@˃┼┼─┐╟@@@╢│└┬┤└┤X
X└┘╟@@@╢└┤┌┤╚╧˅╧╝└─┘│┌┘X
X┌┐╚╧˅╧╝┌┘├┴┬┐└─┬─┬┬┼┘▼X
X└┤┌┬┤┌┬┤┌┼┬┼┤O╔˄╗│└┘┌┘X
X┌┘│├┴┴┼┤│└┼┤└┐╟@˃┼┬─┴┐X
X│┌┴┴┐┌┤└┼─┼┤┌┤╚˅╝││┌┬┘X
X└┤┌┬┼┘└┬┤┌┼┘├┴┬┼┐│└┤│▼X
XO└┘└┘►─┘└┴┘►┘►┴┴┴┘O└┴┘X
XXXXXXXXXXXXXXXXXXXXXXXX

Above here is a pattern for the maze that is being generated.

















Above here is an early stage picture of how the room layout was being generated, note the big hole on the left to make space for an at that point invisible room.












Here I was trying to import some models I got from the tutorial I followed.

















I also ran into bugs... very often.



















But eventually I managed to get a pretty decent algorithm going.

















A big shoutout to Richard Hawkes (https://www.youtube.com/channel/UCiYIoN_wIwA0etN2DHbI6Zw) for the tutorials I follow and the models I used to make this happen.

woensdag 16 november 2011

First post

Hey I'm known as Cheezemaniac, this blog is about me gaming, making games, spriting and more.
I'll add more when I feel like it.