Sunday, 26 April 2015

Week 30: From a pretty level, to a game!

Time To Shine

This week I finally got my hands on the level and had the chance to properly work on getting it to a playable state. I started off by working on dialogue boxes, particularly those of the dialogue with the white rabbit, which would initiate the first puzzle in the level. For the puzzle itself we wanted the player to explore the lake area a bit, so we decided to have the white rabbit lose his gloves and nosegay flowers and send the players on a quest to find them. For the beginning cutscene I decided to start off by showing Alice and the Rabbit from a third person view. Then after that pat of the dialogue was finished the camera would cut to show a bit of a fly over of the lake. The camera then cut to show the gloves, to at least give the player an idea of whereabouts the gloves are hidden. After that the camera would cut to show the nosegay flowers, before finally cutting back to Alice and the rabbit. This way it wouldn't just be a boring static screen that shows Alice and the rabbit talking and it would also aid the player in completing the objective.

Implementing the actual dialogue boxes wasn't too hard, but I encountered a tiny problem. Currently in UE4 to make other cameras in the scene active (for cutscenes) I used a node called "Set View Target with Blend", which allows for the player's camera to temporarily switch to another one, which worked great. However, the problem with this is that any UMG HUD that the player has displayed on their screen, will not work with this. It will simply disappear. When doing dialogue boxes I used a UMG HUD to display them, so I came into a bit of a problem when they wouldn't show up. Unfortunately. there wasn't an easy way to solve this either and I had do change the blueprints that I had created so instead of using "Set View Target with Blend" I ended up changing the blueprints to be actual pawns that I could then "Possess" instead. This worked great for what I wanted to do, since it would not only allow me to display the UMG HUD, but it would also automatically remove the player's ability to move, since possessing a different pawn would completely detach the player controller from his character. Since I didn't want the player to move during the cutscene anyway this came in quite handy.

This did cause another problem though, which I only noticed on Friday, which was that the HUD for the player was currently created "On Possess", which meant when I ended up possessing the player character agian after the cutscene, it would end up creating another HUD on top of the original one. So I changed it to be created "On Begin Play", which caused it to disappear completely and the reason for that was probably the reason why I originally set the HUD to be created "On Possess". This happened because we start off the game inside a matinee cutscene and not in the character. We only possess the character once the matinee has finished playing. For the HUD to show up on the screen we need to have the player possess the character BEFORE creating the HUD, so when I go back on Monday I'll need to work around that and fix it.

Rabbit (with Quest)

Puzzles!

After I had created the cutscene and dialogue boxes I then focussed on getting the puzzles in the level to work. I had been told by Mark to concentrate on the actual level for now and leave the Dark World and with that the Mad Hatter puzzle out for now, since they still have to actually create and adjust the mood within that level. So I started off with the rabbit's puzzle, which I had mostly finished before anyway, by creating the HUD that shows what items had been collected already. I just needed to add a bit extra to check whether both items were collected and if they were, allow the player to end the puzzle.

After I finished creating the rabbit's puzzle I then went and attached the last key part onto the butterfly script that I made earlier in this project. This was one of our key part puzzles and the player would have to catch the butterfly to get the key part. This took a bit of figuring out, since I wasn't quite sure what I had to do to attach 2 completely different blueprints onto one another. When I finally managed to do it, it ended up not working in the game and the reason for that was that my collectable blueprint was using "Set World Position" to make the key part bop up and down. This ultimately forced the key to stay where it was and just bop up and down instead of fly through the air together with the butterfly. I fixed this by simply disabling the bopping for this particular key part, since it was looking a bit weird anyway (if a part of a key hovering below a butterfly and emitting sparkles isn't weird enough already!).

The next thing I wanted to do was a quick fix for the fountain puzzle, which was moving too low and would allow the player to simply jump straight onto the last platform (completely skipping the level). So I did this quickly by making the platform move less further down, which ultimately made them move slower and therefore making the puzzle easier, but since people were already struggling with it before I thought I might as well just leave it a bit easier anyway. We don't need the puzzles in our level to be too challenging, since we want everyone to be able to play through it.

Finally I moved onto maze, which was one of the first puzzles that I had originally created, however since the beginning of this project the maze itself had moved a bit and therefore it needed to be readjusted and I had to change some things to get it to work. The biggest problem I had with this was a simple stupid error, where Alice wouldn't be visible once I switched into third person. This was just because I thought she wasn't visible though, when actually she was visible, but from the camera angle that I chose she was about 1 pixel in size. This was because I disabled the beginning cutscene (in which Alice grows) for testing purposes and since you had to shrink to get into the maze, the actual Alice model was basically shrunk twice (exponentially!) I also wanted to get the Alice model to face the direction that she was moving in, since the maze controls disabled the mouse controls, so that it wouldn't be too confusing. This was also a bit challenging, since there was several checkboxes that needed to be ticked/unticked in order for this to work and it took me quite a while to find the last vital checkbox. After a bit of googling I eventually found this thread, which outlines all 4 checkboxes that control the camera/character rotation (Massive thanks to doC!).

The Maze
For a quick couple of pictures showing how the maze works, have a look at Mark's blog here: http://markeastlanddmuga.blogspot.co.uk/2015/04/dmuga-week-30-end-is-nigh.html

The Final Challenge

At the end of the week I got as far as working on the final puzzle, however while it is currently playable it is not yet finished. For this puzzle we wanted the player to paint a set of rose bushes from white to red within a certain time limit. I managed to create a timer that would count down the time and display it on screen and I also created the actual function that paints the rose bushes. The only thing that currently is missing for this puzzle is the card guard, which you need to talk to first in order to activate the ability to start the puzzle. I got a manual work around for this that I used to test the actual puzzle, but if you fail the puzzle like this, then where would be no way to retry. The guard itself should not need a lot of scripting though. It will just be another dialogue, for which I can just copy what I have created for the rabbit and then it would just need to set a boolean inside the puzzle to true, which controls whether you can play the puzzle or not.

Hopefully I will be able to quickly implement this during the next week, however our main focus for the next week is to get the Dark World set up, so that I can work on getting the last bits done during the final week afterwards. It's a very stressful time for us all, but we can do this!

Until then, stay tuned~

Thursday, 23 April 2015

Week 29: Better late than never!

Workload Overload

This blog post is quite a bit late, so apologies for that. In fact with the last official week of this term going on at the moment, I find myself in a lot of stress to get everything finished. Of course we did get an extension for our OTM project, so I will have an additional 2 weeks to work on that, however there are a few things that I had to get done during last week.

Stressful times.


Presentation Time!

First of all it was the presentation. I did my presentation on geocaching, which is one of my hobbies and a great way to get outside and have fun! I am not going to go into too much detail on the subject now (I might do another blog post purely aimed at that sometime), but if you wish to read more about it then head to the official website: http://www.geocaching.com/


The presentation itself went pretty good. I practiced quite a bit to get it right and I was pretty confident on the day before the presentation, but once I actually got up to do it I was feeling anything but confident. Apart from shaking uncontrollably I kind of lost track half way through and had to pretty much read off my script to get back into what I was talking about. All in all it was quite good though, but I didn't receive a lot of feedback. There was a very few questions after I had done my presentation, however they were directed at the subject itself, rather than the presentation.



Extended Writing.

Another major thing I had to get done during the last week was my extended writing, which actually is due tomorrow! However, I spent my time and had it finished by the time the weekend had gone, so there is no more need to stress about that, since I already handed it in. For our extended writing we had to write a reflection of the second year in relationship to our career aspirations as well as an action plan for the next step.

My career aspirations always had been a bit of a mystery as I mentioned in previous blog posts, however in the end I decided that for now at least I will stick to becoming a technical artist. It just seems like that is the one position that is made for me.


Update in Wonderland

Regarding our OTM project I did not get a lot of work done during the last week. This was mostly due to me focussing on getting my theoretical part out of the way first. I did however create a couple of minor cutscenes to get started on the workload of scripts that I had to work through, but it was nothing major.

During this week I am putting a lot more of my time into working on the level and I will update my blog again with what I have achieved within the next few days, so stay tuned!~

Wednesday, 15 April 2015

Week 27 - 28: Easter Holidays - The End Came Quickly

Still more issues!

I didn't do a post for last week and this post is a bit late as well. The reason for that is that not much happened. I tried optimizing the framerate and researched a lot into it and tried many different ways, but I couldn't get it to run any better. When we came back from the Easter holidays I asked some tutors and as it turns out UE4 is not particularly good with rendering alphas, which results in us having to re-do a lot of foliage. The main problem that occurs in our case is overdraw, which is mainly caused by polys overlapping (a standard procedure of creating foliage in games is by overlapping planes with an alpha mask). To counter this issue, we need to further cut out the alpha planes using additional tris, so that there will be less overlap.

Apart from that nothing really happened since I decided to actually take a break over Easter and enjoy the holidays. I will now have to focus on getting my work done over the next few weeks, which might get a bit stressful. On top of the Off The Map project I also have to create a presentation and an extended piece of writing.

I will update my blog next week with what I have accomplished!

Monday, 30 March 2015

Week 26: Easter Holidays - FPS Optimization?

A level full of lag.

Another week has passed and we find ourselves within the ongoing Easter holidays. This will be a rather short post, since not much has happened this week! While it is a bit of time for me to rest, it is also the time where I finally get to implement most of the gameplay into our Alice In Wonderland level though, so I will try and get more done during the next week.

The problem we are having at the moment is with FPS and optimization. We started off the week by implementing the much needed LODs into our level and after all the work of implementing them had been done, we noticed only a very slight increase in FPS, which is not what we had hoped for! The level still runs with an average of 15-25 FPS and that's simply not good enough, especially considering that we are using high end PCs and we simply can not expect the judges to have a similar machine to run the level on. So I took another look into it and got in contact with some communities online to figure out what exactly was causing the FPS lag. After quite a bit of digging I discovered a tool that would help me debug the frame rate and with that I could easily see that one major issue was lighting.

My first step was disabling all the dynamic lighting on the foliage, since (thinking about it now) having thousands of meshes cast a shadow, which changes every single frame would obviously be quite heavy on performance. This however meant that we would loose all the shadows in the level, which made it look a lot worse, so I decided to try using static lighting instead. Unfortunately I did run out of time in the end and wasn't able to build the lighting yet to see what the level would look like with static shadows, so I will have to try this out as soon as possible.

There was another element that was causing a lot of FPS lag (approximately the same amount as the dynamic lighting), however I have to further investigate into that as well. Hopefully by the end of all this I can get the level to run at 30FPS+ and then focus on getting the gameplay elements implemented.

Until then, stay tuned~

Monday, 23 March 2015

Week 25: Breakages and Aspirations

An Eventful Ending

The Easter break is finally here and with it we say goodbye to the last major term of this year. After the holidays we are back for another 2 weeks before the hand-in of our last project and then we get to work on own projects while our work is being marked for this year. Actually no, that is not quite true, because we actually found out this week that we will be getting an additional 2 weeks to finish-off our Alice In Wonderland project. Wohoo!

Although we were doing pretty well up to this point and I feel like this project is the first group project that I have done this year where not everything has gone completely wrong, we did have a couple of down moments throughout working on our Off The Map Competition entry. This was usually minor things, which only really seemed pretty major at the time, but were easily solved within a couple of hours. This time, we had a bit more of a major problem though!

Group work is super-awesome! (Well, sometimes.)

I had been working throughout Monday and Tuesday to implement a new mechanic into our level: Level Streaming! This would allow us to load levels faster and easier and also have animated loading screens instead of a frozen image with text. Awesome! However, this was also the first time we used this new system and it meant that we had to get used to switching between levels within the editor and having all the other levels be visible on the screen at the same time. This could get confusing, for example if we were to place an object within the dark world, but forgot to actually switch to that level and still have the normal world set as the active level. Once we would then unload the normal world, the object that we just placed would disappear with it, no matter if it was actually placed inside the normal world or the dark world.

In the end it turned out that this way of working (while it worked great for us) was just bad practice though and we faced a massive problem with our landscape completely breaking and causing the engine to crash everytime we tried to edit it. This was a major problem as Anya took over the engine from me to place a lot of foliage into the level and populate everything and the foliage she painted was bound to the landscape. Replacing the landscape with a new landscape would therefore mean that we would lose all of our foliage and that would've been quite a big impact on our progress. So we tried to solve the issue and I went into contact with an employee at Epic Games (the developers of the unreal engine) who tried to assist me by taking a look at the level. In the end it turned out that the only solution for this problem was to switch directly into the level we were editing, rather than using the level streaming within the editor. It took us a whole day to figure this out, but at least in the end we managed to save our project. Phew!

An engine crash! Oh wait.. wrong engine.

Technical Artist?

Furthermore, we had our formal reviews this week. Funnily enough I was actually looking at internships at different companies on the day before and discovered a position for a Technical Artist Intern at Ubisoft in Newcastle. I had a browse through and pretty much decided that becoming a technical artist would probably best suit me. Combining modelling and texturing with scripting is something that I personally feel like is interesting and it almost seems that it is pretty much what I am doing on this project right now already and what I have done on the project before. When I came into my review I was promptly told by my tutor that a technical artist is what I've been put down for as well. So clearly, this is where I am going, which is great!

I finally feel like I have something to aim for. So far I was always quite unsure of what to do, but it seems like I have found my goal and now I can focus on getting where I want to be. One of the things that stood out to me were the fact that I needed to have good knowledge of scripted language such as Max Script and Python for the internship at Ubisoft, which is something I have yet to look into. I am fairly confident when it comes to scripting, but I have not yet had the patience to sit through and actually learn a particular language. I know bits and bobs when it comes to PHP and back when I was playing a lot of Garry's Mod, I learned scripting from scratch using a made-up language known as "Expression 2" (http://wiki.wiremod.com/wiki/Expression_2) within an addon called "wiremod", so I am fairly confident that it should not be too hard for me to pick up on Max Script or Python. However, for now I will concentrate on getting our current project done.

Easter Holidays!

I am aiming to keep posting on my blog over easter, since I have quite a bit of work to do for out project. Most of the asthetics are done now, but I have yet to create many cutscenes and puzzles. We went over this during the beginning of the week and I have made a nice big list of stuff that I need to do. I am quite confident that I will get everything done though and if not, then I still have 4 weeks to finish it off after Easter and most importantly several months until the final hand-in for the actual competition. So I should be fine.

Stay tuned~

Sunday, 15 March 2015

Week 24: Sounds fishy!

When will the blueprints end?!

The short answer: Not yet, and looking at it, probably not that soon either.

Over the past few weeks I have been focussing a lot on blueprints and I am glad to say that I have learned a lot! I am becoming increasingly more confident in scripting using Unreal's blueprint system and on top of that I am fully enjoying it, however there is a slight problem. I am still studying Game ART - and there's a reason for that.

I was originally always more inclined to become a programmer myself. I was naturally very talented in maths and my logical side of the brain is a lot more predominant than my creative side. After I had finished school I was aiming to study maths and computer science, however things went a bit out of hand and I found myself stuck taking a gap year instead, which was followed by another gap year in which I even started working, until I finally decided that I didn't yet want to give up on my aspirations of working within the games industry and had to get back into learning.

The 2 Sides of the Brain (Logic and Creativity)
During my gap years I had tried to learn programming myself, however I quickly lost motivation and it didn't go all too well. The subject was easy enough to learn, yet I just didn't want to go on. So instead I took up a course at college labelled "Games Development", fully knowing that it will most likely be either programming or art, since those seem to be the 2 major components of making video games. When I actually started the course this turned out to be art.

At first I was a bit scared that it might not be the course for me, as I never considered myself to be any good at art, even though throughout all my school history I studied art (mostly because it was compulsory back in Germany and when I finally moved the the UK I decided to choose art as a subject since I was so used to having it within my curriculum.) After I had spent a couple of weeks it quickly became apparent though, that most of the people on the course didn't seem to be the creative type either, so I adjusted. I then also discovered 3D modelling and quickly fell in love with it. Although I never considered myself to be a creative person, I absolutely LOVED creating things. 3D Modelling is quite a bit more technical than drawing and it suited me a lot more than using pen and paper, so it became one of my favourite things to do! I even took part in the very first 3D Speed Modelling Competition endorsed by World Skills UK and won!

So throughout my time at college, I discovered the second side of making video games and I was more inclined than ever to get a job in the industry. I ended college feeling quite comfortable with my 3D skills, however I knew my 2D was still quite lacking, so I ended up applying for DMU, since I had heard that the Game Art Design course at DMU is a lot more 2D oriented at the beginning and I had hoped that this would give me a chance to improve my skills in that area. Safe to say I was more than excited when I had heard that I managed to get accepted onto the course.


Looking back at it now, I definitely got what I asked for in the first year. A lot of drawing and still quite a bit of creating 3D models; And my skills in the 2D area improved drastically. The second year however, the curriculum had changed. The industry was moving forward fast, so the course had to change in order to adapt the changes in the industry. We went from covering the basics of art straight onto content creation and as much as I had liked to have another year of going out and drawing the world, I wasn't too fussed. In the end I knew that what I truly wanted to do in the industry was anything to do with 3D modelling (most likely environments, since I am still not too much into characters) and actually creating my concepts in 3D would help me get better in that area.

With the last project (Container City) and this project (Alice in Wonderland), my focus has changed a lot back into working more technically. Especially using the Unreal Engine 4. Since most people on our course are more creative than technical I sort of felt inclined to take over the scripting side of level creation; (A level is not a level, unless it's interactive!) - And I thoroughly enjoy it as such, due to my history of learning how to script and my more logical brain. However, I have slowly been thinking more and more about the art side and I really need to start taking care of that. So I really want to get back into doing more arty stuff for this project. However, as it seems right now this won't happen too soon, since there is still a lot to be done on the interactiveness of our level and I am working full steam ahead to make sure we get everything into our level that we want to.

So let's get into what I have done this week.

Funky Fishes and (K)omplex Kelp

This week started a bit earlier than Monday, since I had received a message from Anya who had finished rigging and animating her fish models and had them ready to be imported into the engine for me. So I sat down in the evening on the weekend and gave it a quick go, which worked out great and by Monday morning the fishes were all in the engine and had their animations assigned, so that I could begin scripting a simple AI for them.

To do that I took my butterfly blueprint as an inspiration and made minor changes to it to make it seem more like a fish than a butterfly. I am glad to say that I managed to get the blueprint working pretty quickly and the fishes look absolutely adorable! Unfortunately. I haven't got any screenshots available, but if you head over to Anya's blog you can have a look at them.

Furthermore I also took on another little challenge that arose this week. Anya had modelled a string of kelp and rigged it to animate it to move slowly so it looks more lively underwater. As it stands right now, you can't use the foliage tool to paint skeletal meshes in Unreal, which meant that we had to come up with another solution, since placing every piece of kelp by hand seemed a little over the top. To solve this issue we once again resorted to using blueprints.

I knew that it was more than possible to generate random foliage with blueprint, since there was an example of this in the blueprint examples demo in UE4. I also have been becoming a lot more accustomed to using the construction script within blueprints in UE4. This meant that creating this kelp generating blueprint wasn't all too challenging. However, I only managed to get it to work for a square area at first, by using 2 points that mark the start and end of the square that you could place as needed within the world. The hard part was making the kelp generate in a circle around the area.

My first idea to solve that issue was jumping straight into calculating the area of a circle: pi*r^2, however while that gave me the area of the circle, it was the size and not the actual coordinates. This was a lot more complex and after some research I finally got it. This is also when I realised that I did this sort of thing before when I plotted a circle into a graph using maths. The simple solution to this problem was using sine and cosine. Using sin(A)=x and cos(A)=y you can find a single point on the circumference of the circle. 'A' represents the angle (so 0 would be facing straight up and 90 facing to the right, etc.). So for my kelp generator I used a random float between 0 and 360 to find a random point on the circumference and then used a random float between 0 and the radius of the circle to find a random spot within the circle to place the kelp at.

You can find a bit more about this on Mark's blog and also about how we solved some more issues underwater.

Rocky Road ahead?

I still have to create some rocks in the near future. This is one of the only arty things that I got assigned to do for this project and I really want to get into it. I did some practice with zBrush earlier in this project trying to create rocks, however I haven't actually done a rock that I was pleased with yet. Due to a recent lecture from a third year about baking normal maps I think I found a reason why my rocks just didn't look that great, so I am aiming to get some better looking rocks done pretty soon.



Oh and I also did a bit of a personal project. I sat down and tried to script a little Tetris game in Unreal, just using blueprints. The game is still in development, however there is a playable version here: http://goo.gl/7R5aQh Tell me what you think about it in the comments.

Sunday, 8 March 2015

Week 23: Like a Butterfly!

Little Problems and Weekly Changes

First of all let me say this: Our level is making an amazing progress!



I ended my last post by saying that I would aim to get the tea party puzzle finished by this week, however I quickly discovered this Monday, that this would not be the case. First of all I encountered a problem: Previously in older versions of the engine you were able to select a group of meshes in the level and convert them all into a single blueprint. I was going to use this to make a blueprint for the tea party table, which I could then play around with to take out some parts and enable the player to find them. However, as of 4.7 this feature has been replaced with something different, so I ultimately wasn't able to do what I planned to do.

I also thought once again about the puzzle in general and wasn't too keen on it anymore, so as a group we will have to think of puzzles a bit more. While we do have a few nice puzzles in the level, as it stands it just seems like we're still lacking gameplay. This will be an important part, as we won't just be judged on how nice the level looks, but also on how much interactivity there is. I hope we get around to this problem soon and find some nice gameplay elements that we could implement.

Additions: The Butterfly!

I did manage to work on something awesome this week though: A butterfly! I already started working on it a bit earlier, however this week I focused on completing it and now I have a fully working butterfly with very basic AI. I am using blueprints in this case to simulate AI, rather than using actual Unreal Engine AI systems. The whole idea is inspired by a butterfly that I found within the blueprints example of UE4. I made the whole thing from scratch however and also included a little addition. I wanted the butterfly to keep a distance from the player, as it would feel more realistic (anyone who tried to catch a butterfly before knows how hard it is to get close enough to a butterfly**) Everything works like a charm. The butterfly finds a random target to fly towards every few seconds and if something is within his range then it will land on it for a few seconds. If you get close to the butterfly it will quickly fly up high into the air and out of the player's reach. The model itself for the butterfly was made by Mark and it looks absolutely stunning!

Next up I am also planning on implementing a bird, which will work the same way. However, for that I would need a fully rigged bird with animations, as it would look weird if I have the wings of the bird flap in the same way as I have for the butterfly.

Additions Part 2: Collectibles

Finally, I have sat down and created a quick blueprint for collectibles. It's a fully dynamic blueprint, in which you can choose a static mesh and it will make it look and work like a collectible. I made the mesh glow slightly and added some sparkling particle effects around it. The object is then rotating slowly and bopping up and down slightly in the air. Looks quite awesome!

Plans for next week:

For the upcoming week I am looking into further thinking about puzzles and trying to implement some more things into our level. I will also probably look back at the maze that we have in our level as we are currently working on changing quite a bit of it. Also if I will find some time I want to try and do some more arty stuff. After all, I am studying Game Art Design :)

Stay tuned~

**- And yes, I have actually tried to catch a butterfly..(during a volunteering session I did as part of my job at McDonald's) and I succeeded: