CAwards entry & Obscurus development slowing down

CAwards entry

Work on Obscurus has gone slowly this past week and half, as I decided to take part in the CAwards. CAwards is a competition held by Visualiseringscenter C in Norrköping, where ambitious student projects in visualization and human computer interaction can compete in 5 categories for 10,000 sek. To compete, you need to create a video of your project, and enclose a description with the application. Therefore, I needed to create a video that showed what Obscurus was all about. This included finding a way to show Virtual Reality for people who’ve never experienced it. I ended up recording myself playing the game and simultaneously recording the screen so I get a side by side in the final video. I like the effect.

Obscurus development slowing down

Obscurus development has been slow as of late. I fear I’ve hit the Indie shame spiral. My early enthusiasm for Obscurus has started to dwindle, and I’m looking to new projects, like Mimic, to keep going. I will continue small development on Obscurus though, as I want it to be as polished as possible for the Swedish Game Awards. I will restricting it to a single level for the time being however. SGA is more of a vertical slice competition anyhow.

To conclude this post, here’s a collection of images I’ve saved from development over the past two weeks.

Obscurus | Preparing for the Swedish Game Awards Conference

So over the past week I’ve been hard at work, getting Obscurus to run as smoothly as possible, as well as adding new assets for Level 2. This has mostly been because of the Swedish Game Awards Conference which is hosted by Södertörn on the 8th and 9th of March. This blog post will document what I’ve been doing and what is left to do before Saturday. I’m taking part of the the Student Showcase, where I get to show off Obscurus for the companies there as well as the other students who are attending. This is a great opportunity for me to show how far I’ve come with Obscurus.

Level 1 Rebooted

As has been said previously, I’m working on a rebooted version of the first level. This has mainly consisted of creating larger asset building blocks and building the level. This work completed this week, and I have started the arduous task of transferring all the doors, sound effects, speakers, etc. Luckily, the way I set up my initial Level Flow in Bitsquid, all I actually need to do is move these assets to their corresponding places. The flow looks like the image below. A trigger with a delay plays the animation on the door, that triggers an unspawning of a collider once the animation of opening the door is completed. At the same time, the trigger also triggers the door’s sound effect at the door’s location. Thus, I only need to move the trigger and door to the correct position and my initial Flow still works.

flowexample

Level 2 – The Hotel

The second level is where I’ve been focusing most of my efforts lately, as it provides a nice break from adjusting assets or perusing Lua code. This level has a 50’s / 60’s hotel theme, reminiscent of The Shining or The God Complex episode of Doctor Who. This level will feature a very different narration (more on that in a future post), and will have a different feel, for a very specific reason that hopefully will become clear by the end of the game.

When designing the wallpapers, I looked at 50’s wallpaper designs, brought them into Photoshop, where I then drew over them to try and get a more cartoony feel. This, however, led to some not so seamless textures, something that still needs to be fixed soon. Overall it was a lot of fun to do though, a nice change of pace.

I’ve also got some ideas for the menu, but I’m leaving that for another post, other than this image.

menuWIP1

So my first update video for Obscurus is done and posted over on my Youtube channel. It features the original alpha design that can be seen in the banner. I was happy with this design at first, but after user testing, and realizing that most people who’ve played it want to play again, I decided to redesign the level with occluders in mind.
I was also, foolishly, limited by the stationary that I used to design the first level by hand. I used a small A5 notepad with squares, instead of an A4. This meant that I was rather limited by the page dimensions, and couldn’t make the experience as intertwined as I wanted. An inspiration for Obscurus has always been the fantastic indiegame Antichamber by Alexander Bruce, and as such I wanted the player to be able to come back to the same room again, or miss a whole bunch of rooms if they weren’t watchful enough.
The video also shows my first experimenting with the Oculus Rift version. As you can see, I’m still having trouble with the shadows, so I had to turn off all lights except for the sun to make it at least bearable. I hope to keep contact with Bitsquid to try and sort out this inconvenience.

Bitsquid | The Bitsquid tool center and asset pipeline

Over the past two days I’ve been working on a video for some master thesis proposals. One of these included adding lots of new assets to show how the Bitsquid pipeline worked. I figured that I could go through the same steps here, to show those who haven’t worked in Bitsquid how it works.

To start out, this is what the Bitsquid toolcenter looks like:

It’s very Windows 8 inspired, and while I first disliked it, with each tool being separated, I soon learned that this is actually a positive when it comes to games engines. In other engines, like Unity which I have the most experience with, everything is available from the main editor tool, and code is handled in a separate part. This means that all your tools are in the same place, and it’s easy to get lost, be flustered by all the possibilities, or accidentally do something you didn’t mean to.

In Bitsquid, this is not the case. Every tool is separated out, so you only ever need to work in one tool at a time, and it’s also easier to spread out your tools on multiple monitors, as most game developers tend to have. The beauty in this is also, that thanks to the data driven design of Bitsquid, by editing an asset or code in one window, it updates it in the level editor or running game, depending on how sensitive the given asset or code is. You can even change the shader code midway through playing a level, which is very cool.

Asset pipeline

So back to the matter at hand, I needed to integrate art assets from other sources to show how easy it could be. I got some free 3D models of weapons from TurboSquid. I then proceeded to import them into Maya, as that is my preferred 3D modelling tool, and Bitsquid provides exporter tools for most Maya and Max versions. This is necessary, as Bitsquid uses an internal file format for assets called Bitsquid Intermediate, or .bsi for short. This file format is what allows the speed and data driven approach to work. Importing and exporting the models is fairly simple. Once you’ve placed the appropriate exporter tool in the plug-ins folder of your modelling tool, you can export your models.

Once this is done, and you’ve placed your model in your project folder, you need to start up the Unit Editor tool. No select “New Unit From Mesh”. A window will appear will all .bsi files in your project that haven’t been assigned units. Selecting one, you will now be able to create physics actors, occluders, shadow meshes, LOD steps, and so on. Once you’re done with that, save and exit the tool.

Next we need to import your textures. Bitsquid takes the dds format. As I use Photoshop, I found Nvidias texture tools plugin very useful, which can be found here. When saving your textures, make sure they are in a multiple of 4, as Bitsquid only takes this size. Also make sure to use the 8.8.8.8 ARGB unsigned format.

You can generate the mipmaps directly, or let Bitsquid do it for you later. Now that you have your textures ready, start the Texture Manager tool. Much like the Unit Editor, if you select “New Texture from DDS”, you’ll get a list of all the dds files that aren’t assigned as a texture yet. Once you’re done, save and exit the tool.

Next we need to assign all those fancy textures you just created. This is done in the Material Editor tool. Now this is where Bitsquids design comes to the forefront. If you have a window with your asset visible, like the Unit Editor or Level Editor, you can now see the changes your material make to the asset, live! In this way, you can tweak the specularity so it shines perfectly, see that the transparency works as you intended, and so on. In effect, you get something like the image below.

And now you’re done. You’re asset is in the game! I hope this short tutorial helped you!

Obscurus Development | Shadow fixes, optimizations, and thesis reflections

Shadow fixes (sorta)

After getting in contact with Bitsquid, I have confirmed my suspicions; the renderer in this alpha-state Oculus Rift build renders the lights from different offsets. This is apparently caused by how the engine is structured, and my main contact with Bitsquid is looking into how difficult it would be to restructure the renderer so that the problem disappears.

Optimizing in Bitsquid

This is a topic that deserves it’s own blog post, and I’ll get to that, but for now I just want to document the steps I’ve taken to optimize my game. Working in Bitsquid can be very interesting, as it is a data driven engine unlike any other conventional game engine like Unity or UDK. It means you can do certain things a lot faster or in a different way to other engines, and tricks that work in those engines might not necessarily work in Bitsquid. This became very evident for me when I started to optimize Obscurus for the Oculus Rift.

In order to achieve the best possible experience in virtual reality, you need to get as low a latency between the player moving their head and the game updating the view port. 20ms is the upper threshold according to John Carmack, Oculus Rift’s new CTO. It is also advisable to get your game running at as high a frame rate as possible, and to keep it stable.

60 frames per second is my goal for Obscurus, and I thought it would be easily attainable, with it being a confined corridor game, most objects should be obscured. Lo and behold my surprise when I was getting 25fps on a powerful rig! It took some time to figure out what was happening, and asking the Bitsquid Q&A forum. The forum is great in that it has a lot of talent, mostly Swedish, that are working in the engine. The only problem that it is a very small pool of developers, something that will change as Bitsquid gets more widely adopted, I’m sure.

I got some sound advice on how to optimize my game. I had carelessly just copy-pasted my assets (I love this feature!), building my entire level with the basic building block of wall, roof, and floor. The problem with building this way is the amount of draw calls you get. I was submitting more than 20,000 batches per frame. That really taxes your computer, no matter how powerful!

Type ‘Perfhud artist’ for a useful overlay

So how should I go about fixing this problem with my shadow casters? Simple, really. I instanced my floor, wall, and roof textures, as they are repeated a few hundred times each. This immediately garnered an almost 100% increase in frames per second. The next step is to combine as many assets into larger assets as possible. I am currently in the process of creating larger building blocks comprised of my simpler smaller assets. 3×3 wall sections, 1×3 floor sections and so on. This will also speed up future levels that I’ll create.

Making new building blocks

At the same time as I was doing this work in Maya, I’m also creating occluders inside the objects. Occluders are create big planes that hide anything behind them. You don’t expect to draw something behind a wall, so you put an occluder in the wall, and voilá nothing is drawn. An occluder in action can be seen below.

Occluders in action

The downside with me having to do this is that it takes a bit of time to create all the building blocks I need to recreate my level. Then of course I need to actually rebuild my level, rewriting the Flow scripts for it too. As mentioned though, it will really speed up future development of the title.

A final optimization tip, which I luckily had already implemented, is to create simplified meshes as you are creating your assets that can be used for shadow casting. It isn’t necessary to have the super high detailed mesh for shadow casting, but a simpler series of boxes will often suffice. It can also be a good idea to create level of detail meshes at this point, and use the shadow mesh as the lowest level of detail. An example of LOD and a shadow caster from the Fatshark game Hamilton’s Great Adventure can be seen below.

Level of Detail and Shadow Caster meshes

Master Thesis reflections

I had the pleasure to listen to my friend, Andreas Tarandi perform a first presentation of his Master’s Thesis in Computer Science that he did for DICE. It detailed a new sort of renderer for tessellated objects that in real time can provide the texture for an object, without using the archaic notion of UV mapping. Instead, his method uses triangle strips storing the colour values of the triangles’ hexes in an array. In this way, he could render an obscenely high poly face (millions of triangles) in 30+ fps (real time).

It was especially interesting as I myself am in the process of starting my master thesis. I’ve applied to a few companies already, about doing different work for them, including Oculus Rift and tools to integrate user created content. I’m hoping they respond soon, as I can’t wait to start working in the video game industry, and think that I bring many competencies and qualities to the table.

Obscurus development | Shadow problems

Working in Bitsquid is fun. Working in Bitsquid as a student is not as much fun. Working in Bitsquid as a lone developer is down right what it is: work.

I have been working on my first-person pacifist puzzle game Obscurus since November 2013 now, and I am very close to finishing up the demo/first level. The game is meant to be played with an Oculus Rift or other Head Mounted Display in order to immerse the player in a virtual reality. The game’s puzzles rely on the player being immersed as if in a real world, from being blinded, to achieving vertigo or getting lost in a cramped maze. Development has gone really well, until it was time to integrate Oculus Rift support for real.

Surprisingly the main problem isn’t that Bitsquid doesn’t have native support for it. I got in contact with the nice folks at Bitsquid and they hooked me up with an experimental build. After some frustration (more like a TON of frustration), that ended up being that I forgot to render environment to the stereo renderer, I finally got to play my game in VR.

However amazing it was to work in it, I noticed some interesting errors. The dynamic shadows were different in each eye. After diving into the shader code in HLSL, I have stared myself blind, and I’m no closer to solving the problem. Hopefully the new week can give me some fresh eyes and finally solve it.