This blog is about creating simple games, and has been set up to show progress of my first games.
Monday, 16 February 2015
Main character
I have finally changed the main character model in my game and to do that I have used a bit of a trick so that I won't have to worry about game mechanics changing a lot and adding all the same components to the next object. So now main character is a butterfly as this was the best 3d model I could find for free with all animations.
Coroutines experiments
I have tried to find the idea for what I could use a coroutine in my game. I have decided to use it in a simple script that rotates collectable items. So at first when I have written a coroutine it didn't work. I added yield wait for fixed update method as it is a rigidbody and I have read it may need to be used in coroutines for rigidbodies. It still didn't work properly, but I have added FixedUpdate method to be called after start method and inside it starting the coroutine as well. Now the script finally works and rotates the rigidbody after waiting for 13 seconds.
Sunday, 15 February 2015
Editor Scripts or Context Menu?
I have tried the second way to implement resetting variables for the script. Using property drawers it is definitely easier and faster way of implementing this particular functionality but the only drawback is that it is using context menu so you have to click on a specific value to reset the appropriate values. having a button that is enabled through writing an Editor script is much easier to find to know that this script actually has default values assigned for the developer to use. This way, though is faster and therefore may be efficient when working in small teams or individually when time is crucial.
Character and script edition
I have added a test model of a butterfly to the test scene and I may use it as a main character as I haven't found anything better in asset store that would be free. I have also cleaned up my code a little and changed the names of all private variables to contain m_ before private variable name so that it would be very easy to distinguish public variables from private ones.
Unity Editor Scripts
Based on the one of the recent lectures I have decided to implement a Unity Editor Script to reset the variables for the scripts in the Inspector. I wanted to start with making all my variables private and using Serialized Fields to make them show up in Inspector but at the first try I have noticed there was a major problem with it.. Whenever those were changed it reset the variables to its initial state. So before I changed all of the fields I decided to write an Editor Script to enable resetting values to the defaults I want. When doing that I also used finding object in hierarchy function that I think was mention in one of the very first lectures. I had problems with setting variables to privates again as it needed getters and setters that would not be static(otherwise serialization doesn't work in Unity-issue which I have encountered). I resolved all these problems and now I have reset button for main character movement script that rests all values to what I want to be default. Then I moved on to making those fields finally Serialized Fields so that they can be displayed in Inspector despite being private.
Before I attempted creating Editor Script for this functionality I have done some research and I have discovered there is an easier way of resetting values in Unity 4.5 or higher by using property drawers, which I will try to do for another script.
At this point I have also use GameObjec.Find() method and therefore implemented some of the material covered in the second lecture in this series.
At this point I have also use GameObjec.Find() method and therefore implemented some of the material covered in the second lecture in this series.
Saturday, 14 February 2015
Unity Engine
The last lecture in this series was about Unity engine and other game engines in general. Because there are many changes coming up in next Unity versions it would be very useful to start adapting those changes to current projects before the Unity will change diametrically. UI system is already different in Unity 4.6, even though it still supports older UI versions. It may worth starting to think about using the new UI system and learning it as soon as possible as in Unity 5 there will be no way of using the old system. There are more changes coming up such as Scene layers which may be very useful for managing all scenes in the project.
Thursday, 12 February 2015
More on Shaders
After attending couple workshops on creating shaders at university I have decided to implement one in my current project. I decided to build on the last shader from the workshop we were given and then trying to experiment a little with it as well. I have also use the material created during one of the other Game Development Society workshops with ISS artist and combining it with a shader has given really nice effect to update the visual feels of the collectable ufo's as now they look more like an actual UFO! :)
In order to achieve the effect I wanted I played around with mathematical expressions to get the appropriate level of emission in a shader.
In order to achieve the effect I wanted I played around with mathematical expressions to get the appropriate level of emission in a shader.
Saturday, 7 February 2015
Pooling Lists
Object Pooling is a very useful feature to implement in games. It enables reusing objects instead of throwing them away. I did start writing a simple pooling script some time ago when it was first mentioned during one of the lectures, but I can't see where I could actually use it in my current project as i'm not creating objects during runtime yet. As well as this I have a specific amount of objects player can interact with and therefore those do not need to be thrown away during the game, this way collectable ufo's create the effect of flying away and since they are kept in the scene they become a part of scenery.
Saturday, 31 January 2015
Unity Custom Editor lecture
Custom Unity Editor Scripts look very useful to learn. And therefore are a very powerful tool for developers who want to adjust the default Inspector. Those help in various situations depending on what is needed, I have decided to implement SerializeField attribute so that I can keep most of my variables private but in order to do that I may need Unity Editor script that will allow resetting variables to make it easy afterwards to recover default values I want for specific variables.
Friday, 30 January 2015
Project feedback and implementation
Generally I got really good feedback for this project, and over the next couple weeks I will hopefully find the time to implement it. I still have no idea how to balance my game properly but I may just play around with values and see what is working best. I already had a bit of search through Unity asset store to replace the cube as a main character for my game- the problem with that is I haven't found anything particularly good that would fir my game theme and therefore I may just use some kind of animal model etc. I will also make sure to change variable names so that private and public variables will be easily recognizable.
Friday, 23 January 2015
Rendering and Shaders
Writing shaders is very broad and interesting topic. At this point I start to understand how shaders actually work and hopefully in short future I will be able to write one on my own without looking at others work or experimenting with already made shaders. There are a lot of different types of shaders each of which is unique for the purpose they are used for. I will definitely at least try to implement a shader into my current project.
Friday, 16 January 2015
First lecture second term
First lecture in the second term was about Structs and Classes. Nowadays structs are used for block of data that hold only public variables. It may be useful for creating items that have to be accessible through the whole program. As well as this we learned more about the differences between lists and arrays.
Thursday, 25 December 2014
Shaders
At the end of the term there was a very short introduction to writing shaders. Since Christmas break started I have decided to start following couple shader tutorials so that I can understand how these work and hopefully be able to implement at least one shader into my current project.
I used the tutorial from here. When the next term starts there will be more shader workshops at university and I hope to attend all of them so that hopefully I will soon be able to write a shader of my own.
I have also started writing a simple pooling system, but because I do not need to use it for anything in my current project I may not finish it at this point yet.
I used the tutorial from here. When the next term starts there will be more shader workshops at university and I hope to attend all of them so that hopefully I will soon be able to write a shader of my own.
I have also started writing a simple pooling system, but because I do not need to use it for anything in my current project I may not finish it at this point yet.
Tuesday, 23 December 2014
Static classes and XML
During the last lecture of the second term we learned about static classes and XML. Static classes seem to be useful for storing all global data used in one place. Those can also be used as Singletons as there is only one instance of them created. I may think if I need to use those in my current project to wrap up some repeating functionality if I will be able to find some. I may also use XML files to reduce the loading time of the level.
Monday, 22 December 2014
Delegates and Coroutines
The next lecture was about delegates and coroutines. In C# delegates are used in the same way function pointers are used in C++. Having used pointers itself in C++ a little beforehand should make it easier for me to get the same concept in C#. The only thing I need to figure out now is how to use those in my current project.
On the other hand I haven't used coroutines at all yet. Therefore I will look into how I could try them out and use those in my current game. They seem to be useful and even if I won't manage to incorporate them in this project i will definitely look into this topic further afterwards.
On the other hand I haven't used coroutines at all yet. Therefore I will look into how I could try them out and use those in my current game. They seem to be useful and even if I won't manage to incorporate them in this project i will definitely look into this topic further afterwards.
Game Entities and Singleton Pattern..
Singleton pattern is not commonly used when utilizing OOP principles in regular applications, as its not thread safe. Making something work is more important than good design principles sometimes and then Singletons are used. Those are used to make sure only one instance of the class is created. After the lecture I am not sure where I could implement this in my current project, and therefore i will research more on this subject.
C# and other programming languages..
Second lecture we had was an introduction to C# programming but not only. We have learnt the theory behind how programming languages are working behind the scenes including how it works with the compiler and CPU itself.
Main differences between C# and C++ were also highlighted, and therefore I have expanded my understanding of memory management and basic ideas behind it. It was also about memory allocations and how both C# and C++ handles it. This lecture included the introduction to object pooling lists, which I have started writing in separate project, as I can't see any way I could use it for my existing project(I am not using any spawning scripts and everything have a fixed size), I may try to implement it later. This was also the first time I saw XML code, which is not difficult to understand but may be very useful for fast loading big levels in a game.
Main differences between C# and C++ were also highlighted, and therefore I have expanded my understanding of memory management and basic ideas behind it. It was also about memory allocations and how both C# and C++ handles it. This lecture included the introduction to object pooling lists, which I have started writing in separate project, as I can't see any way I could use it for my existing project(I am not using any spawning scripts and everything have a fixed size), I may try to implement it later. This was also the first time I saw XML code, which is not difficult to understand but may be very useful for fast loading big levels in a game.
Sunday, 21 December 2014
Leap Motion lecture
During the second part of the first term we have started a series of lectures and workshops led by Richard Weeks.
First lecture was about Leap Motion technology. We were told what it is and how it works. We were also given a sample project to experiment with and see how it works in general. This was a major opportunity to find out more information about this type of software. I may think of implementing Leap Motion into my current project for this module but this would depend whether I will have a good idea what I could use it for.
First lecture was about Leap Motion technology. We were told what it is and how it works. We were also given a sample project to experiment with and see how it works in general. This was a major opportunity to find out more information about this type of software. I may think of implementing Leap Motion into my current project for this module but this would depend whether I will have a good idea what I could use it for.
Thursday, 6 November 2014
Playtest demo and final project submission..
Recently I have added Main Menu, Instructions, Credits, Story scenes to the project so now my game has fully functional interface.
I have also done quite a lot of level design and putting everything together.
There are still some features I want to add soon as well as feedback from demo session I need to implement.
Here are some screenshots of the interfaces and the level design of the game itself.
I have also done quite a lot of level design and putting everything together.
There are still some features I want to add soon as well as feedback from demo session I need to implement.
Here are some screenshots of the interfaces and the level design of the game itself.
Sunday, 2 November 2014
Mini map border, bug fixes, collectable items, GUI Text
In this iteration I played around with colours in my game trying to
make contrast better, as well as this I added new skybox I found on Unity Asset
Store.
Then I started working on a border for a mini
map. I ended up creating a new camera that shows only white background and
displaying it right behind the mini map, making the camera little bit wider
than the mini map.
I have also fixed base mechanics so that main
character’s velocity and angular velocity is set to 0 on collision with shadow
so that main character can’t slide through the shadow. This corrected the bug I
had earlier, as when a player had a lot of speed he could basically go through
a shadow without being caught.
I also got round creating collectable items
that will increase main character’s score when picked up. Next things I want to
implement are traps that will stop players from moving when entered by each
player. Some traps will be only accessible by a shadow other only by main
character.
To make my game design look better I added fog
as well as changed render settings to make mountains in the background visible
from any point on the map.
As well as this I added some GUIText when
shadow catches a player with some comic fonts found here
.
Some screenshots of the current
progress of my game:
Soon I will implement level design
which will include appropriate assets found.
Subscribe to:
Posts (Atom)








