Posts

Showing posts from 2017

Day 9 - Targets

Today is the last official day of the production stage. Which means I need to have all elements implemented and working from game start to finish.  I really need to focus on having a complete and working game and leave the tweaking and polishing for the next two days! Targets Start to finish scene switch Title screen (simplified!) Create end of game Monitor scene hub Dialogue system Implement audio Beside these tasks I also need to prepare for tomorrow's presentation for YCP. So I really hope I'll get it all done in time!

Day 8 - Reflection

Today's targets I finished all of my targets today. Some took me a little longer, that's why I'm still up at 3AM :) But I have a working challenge UI and a system/framework to implement challenges. Reflection It's been a day full of trial and error. For everything I changed or added in the challenge UI I do a quick test run. Because if I change many things at once, it sometimes gets harder to find the root to the problem.  There are so many new things I learn each day, by watching tutorials, reading documentation and API, but most of all by just trying. I've noticed that I created a nice workflow today and I was very concentrated. When I started this project I'd been out of the game for a little while, and I felt very rusty at the beginning. But now that I've been programming each day and gaining experience I function way better. It's like riding a bike! Tomorrow's targets Title screen / start menu Tweak challenge implementation (UI) Dia

Day 8 - Progress

Image
I have to work even harder, because the deadline is getting very close! Challenge System - Test Run There were some issues with the test run, I had some trouble setting the right conditions for the Test Run. Each time I thought I'd figured it out, it turned out to be that only part of the conditions were actually checked. I tried different approaches, but settled on a system where I check for the amount of answers given in the draggable item and I check for right/wrong answers in the dropzone script (which I finished yesterday). At first I tried to get everything into the dropzone script, but it didn't make any sense and was giving me one error after another. My approach for the amount of answers is to first check if the dragged item came from the same panel or not. If it's from a different panel I have to modify the integer, if not, the amount of given answers stays the same. My console (in the image above) shows: when I dragged the i

Day 8 - Targets

I'm picking up from where I left yesterday! Targets finish all elements for the challenge implementation tweak challenge system & implementation create transitions between challenges create scene switch edit interactive script

Day 7 - Reflection

Today's targets Today I finished the challenge system and the implementation system. Both still need some more tweaking and I have to add transitions.  Reflection I've been working very hard today and accomplished a lot. I've finished my challenge system, which means I can now load in a challenge and play it, it also keeps a score and acts to the score. I do have to add some more functions to the implementation. I started with the indispensible functions and from there on I kept adding more functions and options and now it's almost complete. But I'm very glad I got something to work and that it's actually playable.  I had a few moments where I was stuck on something, and I kept staring at my code and trying to search the web to fix. While all I needed was to take a step back, back to the roots of the problem and then find another approach. For example I've been stuck on the test run, because I had some values set up, I even knew how to compair them, bu

Day 7 - Progress

Image
Today I'll be finishing up the challenge system and implement 1 - 3 challenges.  Challenge System I started by working on the challenge system again. Yesterday I created the instantiation of the challenge, but when I instantiated them they all ran there code. I've kinda been breaking my brain over this, because there are so many ways to solve this, but I wanted to keep my code on this short. The best way (I could think of) was to disable the GameObjects directly after instantiation. Now all challenge objects (along with their components) were disabled. The next step was to manually enable the gameobject I needed, when needed. Again, many ways to do this, but I found a solution that perfectly fit my purpose. I already kept track of the currentChallenge in the ChallengeManager. To enable the challenge gameobject that goes along with the current challenge, I used this integer to search for the right object in the list (see image below). At th

Day 7 - Targets

Today is the day that I will finilaze my challenge system! Targets finalize challenge system implement challenge designs (1-3) Because I got most of the work on the challenge system already done, I hope I can also add dialogue system to my target list.

Day 6 - Reflection

Today's targets My target for today was to finalize the challenge system. I came a long way, but it's not completely finished. Reflection A day full of ups and downs. I started with cleaning up my messy code from the day before. I didn't really have any tactics, so I researched different approaches, which took up much time. From then on everything went great, my code looked neat and clear, everything worked and I programmed it quite fast as well. But then when I initialized the inherited classes a few things went wrong and it took me a while to fix it. Now it's almost 2AM and I'm happy with my neat code without any bugs, but I wish I was further in the process. Tomorrow's targets Tomorrow the challenge system must be completely finished and I want to implement 1 - 3 challenge designs.

Day 6 - Progress

Image
Ok, so I'm looking back at my challenge system script and it feels messy and unclear. Eventhough the largest part was for testing purposes, I need it optimized before I start implementing the challenges. My new approach in using game states. This will make my code much neater and clearer. Game Manager & State Manager I've created a singleton Game Manager (empty GameObject + GameManager script). This Game Manager gets instantiated at run time and can not be destroyed during run time. (see image below) For the State Manager I've also created a similar script. The StateManager will contain all states used within the game, e.g.: GameState, ChallengeState, TimerState.  Both singletons get instantiated by the LoadGame script. Challenge System The hierarchy of the challenge system is: ChallengeManager, Challenge, Challenge1(2,3,...). The last class in the hierarchy inherits from the challenge class, and overrides specific functions per challenge. The Chal

Day 6 - Targets

I'm halfway through this project now. A good moment to take a look at my global planning before setting today's targets. I finished the pre-production targets and I'm about halfway in my production stage. I've done quite some work, but I still have a long way to go. I think when I complete the challenge and dialogue system I will really see my project come together. Luckily, I don't have to worry about the 3d models for the scene, since my boyfriend offered to help me with that, so I can put all my time and energy in programming! Now back to today! Targets finalize challenge system I set only one target, because it's a large task.

Day 5 - Reflection

Today's targets I didn't complete the challenge system, but I finished the design and did a lot of work on the system. I added two extra targets: the game flowchart, which helps me creating a code structure and the desktop UI, which is the first step of the implementation. Reflection Today I did quite a large amount of work. In the morning I wanted to start programming the challenge system. But when I looked back at my design I realized the overscope and knew I had to do something. So I ditched the idea of having multiple types of challenges and came up with a design which allows me to create more content along the way, but can still be kept small enough to finish in time.  So this new approach gave me a fresh start. I made a flowchart for the game to help me get a clear vision on what exactly I needed to code. I  started on the UI. For me it was the first time working with the new Unity UI, so I had a lot to discover. But I'm so glad for the new UI system, it m

Day 5 - Progress

Image
Challenge Design Today, I planned to first work out the challenge designs and I wanted to translate them into flow charts before I started programming, when I noticed the overscope. All these different types of challenges, where in fact small mini games within my simulation. Which isn't really achievable within a week time. So I decided to redesign my challenges in a way that is do-able within the time limit. My new design excists of one type of challenge, one implementation script, one general design. But with different types of input, variables and slightly different gameplay. This new design can be interpreted as one generic design with alternate levels. This will probably result in a more efficient code and more content. Challenge System Now that I know I want to design my challenges, it's time to create the challenge system. I've created a flowchart to have a clear image of what I need to code (see image below). For the challenge system I fir

Day 5 - Targets

Because I can't finish the challenge system, design and implementation in one day, I'll be working on that today. My goal is to complete the design and have the set up of the challenge system ready . I'd also like to start working on the implementation. Targets challenge system challenge design challenge implementation

Day 4 - Reflection

Targets I added an extra target, because I had to fix my freezeMovement. Afterwards I completed the player/camera rotation based on mouse input. I started on the challenge design and came up with an approach on the challenge system.  Reflection Today I had a great start, I quickly fixed my code and scraped the unnecessary code repetition. Also changing my rotation script was done pretty easily. Next was the vertical rotation, this was something I had done in a previous project. For the up and down range for the vertical rotation I used Mathf.Clamp, this was something I had to look up in my old code in order to integrate it into my script.  After finishing the character movement and rotation I moved on to the challenge system. I found that my concept was still really vague, which made it hard for me to decide on my approach. So I thought of looking at the problem step by step. First I decided that I wanted to keep it in the same scene. Then I decided I wanted to create seper

Day 4 - Progress

Image
Before I started working on my first target I noticed something in my code I didn't like, regarding the freezeMovement boolean. This needed to be fixed first! Fix freezeMovement Whenever the Update function of the CharacterMovement script checked for player input and the outcome was less than or greater than zero a function was called. In this function a check was performed, whether freezeMovement was false, if so the movement script started. But I did this separate for each movement function (see image below) and now I was going to add two more for the rotation.  This unnecessary (and ugly) code repetition had to go! So I moved the boolean check for freezeMovment to the Update, so now the first thing that get's checked is if the character's movement is frozen, if not the code checks if there's player input and then the function gets called. This way the system only needs to check the freezeMovement once (see image below).

Day 4 - Targets

Yay, day four! Or should I say, the first day of my sprint. I have a lot of work in store and also some catching up to do :) Targets character rotation based on mouse input set up challenge system start challenge design I think I have a full day of work ahead of me, the most important target is working on the challenge system.

Day 3 - Reflection

Today's Targets Eventhough I had little time I finished today's targets. I created the interactive object behaviour and I programmed the camera switch. Reflection When I was working on the interactive object behaviour I was determined to write a shader for this, because I don't like the halo. I spent way to much time on creating the shader and I'm still not satisfied on how it look, so I'll probably scrape it and start over again. But that's a task for later. Allthough I was again going into detail to early in the proces, I manager to recognize my behaviour, and moved onto the next task. I had more luck with the camera switch script and didn't ancounter any issues. Only want to change the switch from monitor view to first person view into another function or key binding, once I've designed that part. Tomorrow's Targets I have a lot of catching up to do, because I had so little time today. So tomorrow I plan on doing much programming. For sta

Day 3 - Progress

Today I've worked on the interactive object behaviour and camera switch funtion. Interactive object behaviour I've programmed the functions for the mouse activity, like OnMouseEnter, OnMouseExit and OnMouseDown. The interaction function gets called on OnMouseDown, so when the player clicks the interactive object.  I want the interactive to have an outline on hover, so it communicates to the player that they have the option to interact. To do so I have to create a shader. I've been watching many tutorials on creating an outline or glow shader, but thus far I haven't been able to create the effect that I'd like. I will continue this tomorrow. Camera switch function The default camera is set to the character's main camera. But when the player interacts with the monitor, the camera switched to the monitor camera. For now, when the player clicks the screen again the camera will switch back to first person view. This will be changed later on, e.g. by pressing

Day 3 - Targets

Today is the official start of the production stage. Luckily, I made a small head start yesterday, because today I'm limited on my time, due to a job interview. I keep the targets limited and will catch up on the lost time by working twice as hard tomorrow. Targets interactive object behaviour camera switch function I had also hoped to start working on the monitor script and GUI today. So if I have any time left I will work on those as well.

Day 2 - Reflection

Like I'd hoped I finished the pre-production stage today and made a start with the next stage. Today's targets I completed all targets on pre-production. I started by finalizing the class structure. Afterwards, I expanded the test scene by creating a desk and added a few more interactive objects. Then I fixed the camera set up and the audio set up. I also did some work for the next stage, production, which included character movement and the camera switch script. Progress I managed to finalize the pre-production pretty fast, only I found myself a little distracted by finding myself a text-to-speech narrator. I was working on the audio set up and thought it'd be nice to look up the possibilities, only to find myself listening to suitable voices for the next hour or two, instead of working on my set up. Luckily, I managed to pick it back up and finished the pre-production. Once I was satisfied with the project set up, I moved on to the production stage tasks I

Day 2 - Progress

Image
Let's finish the pre-production stage! Finalize class structure Today I started by finalizing the class structures. I already created a class diagram and the scripts. So my next step is to add the variables and functions to the scripts. I like to use regions in my code, to keep my code structured and clear. With this structure, I think, it's easier to find a certain piece of code, also you can fold and unfold the regions you will or won't need. But this is just my personal preference. Naming convention It's important to have a clear naming convention. Though there are many different opinions on this topic, I found a naming convention that fit me. For my funtions I use PascalCasing, for my public variables I use camelCasing and for my private variables I use _camelCasing with a single underscore. And for my constant variables I use UPPER_CASE. The image below shows an example of how my scripts look after finalizing the class structure. It basically looks lik

Day 2 - Targets

Today I will finish the pre-production stage and hopefully get a head start with the production stage. Tasks finalize test scene set up finalize class structure camera set up audio set up After completing these tasks, I will work on my character movement script and camera switch script.

Day 1 - Reflection

I've reached the end of my first day of this project. Each day I will reflect on how my day went, to see if I've reached my targets, if I stumbled across any difficulties and ofcourse about what I've learned. Also, I will think of a set up for tomorrow's targets. Today's targets I managed to complete today's targets, which were: creating a Unity project, setting up the Unity project, creating a game architecture and a class structure. Reflection Overall I'm happy with my progress, I managed to complete the basic set up. The class structure took me longer than expected, probably because this game is totally different from the projects I've done in the past and also it's been a while since I set up a class diagram. Also, setting up my blog was more time consuming that I'd hoped. Tomorrow's targets Tomorrow I want to finalize the class structure by creating the variables and funtions in the scripts. I also want to finish the scen

Day 1 - Progress

Image
Each day I will document my progress per target. Game Architecture For this project I use a rather simple game architecture. The chart below shows the elements that will be incorporated in my game. Class structure In my opinion it's important to create the class structure in an early development stage. Thinking ahead about what you're going to make, before you actually start programming, results in having a great overview and framework for your actual scripts. Also, to me personally, it's a helpful tool for my pitfall, which is perfectionism. I tend to go into detail too early in the process, but by setting up a base and expanding this base step by step, I make sure I have working fundementals, before worrying about the polishment.  The image above shows the class structure I set up for my game. This diagram presents the classes with their variables and functions.  Create Unity project For this assignment I cr