Contact Us

If you'd like to get in touch you can reach us at the following email addresses.

General Email: contact 'at' cardboardkeep.com

Press Enquiry: press 'at' cardboardkeep.com

Alternatively use the form on the right to contact us with general or press enquiries.

Cardboard Keep Video Policy
We hereby grant permission to any and all video content creators to use footage and gameplay of our games, and to place advertisements for the purpose of monetization in their videos of our games.
Please insert a link to our website in the video description, and feel free to contact us to let us know about the videos you make!

         

123 Street Avenue, City Town, 99999

(123) 555-6789

email@address.com

 

You can set your address, phone number, email and site description in the settings tab.
Link to read me page with more information.

combat-planning-blurred.jpg

Blog

Dev Blog: Fixing Texture Banding in Unity

Timothy

Hey Devaroos, Just a quick post from me today, but I had fun optimizing our current project, mainly looking at textures and materials. Whilst plumming the depths of the Unity project and fiddling with the import settings of our assets I discovered a surprising and quite frankly beautiful act of compression.

The default "automatic compression" in Unity doesn't like colour gradients. If one was to change the compression from automatic to DXT5 compression we not only have no more banding, which is awesome, but it also halves the size of the texture.

BandingFixOur programmer loved this, and the game looks better!

So if you are having trouble with a texture banding or having its colours blend horrifically, try changing the Texture Type setting to advanced, and the compression to DXT5. I encourage you to try out all the compression that Unity offers, as some can reduce the size immensely while maintaining or even improving perceived quality.

Thanks for your time, I hope this helps out.

Tim.

Dev Blog: Quick and Easy Particle Sprites

Timothy

Hey Devs,

Today we're going to have a look at how to create particle sprites. There are a great many different kinds of sprites that one can paint however I’ll go through my basic technique here. It is really fast, and easy to get a lot of variation out of.

SpriteTute

Starting in Photoshop, I create a new document of 256x256. This is a huge sprite to make; most sprites we use get down-scaled to 64x64 or maybe 128x128. However I like to author my image large enough for the resolution to never become a problem.

With our blank image I use the gradient tool, set to radial from white to black. With the ruler tool I can start the gradient in the very center and drag it out to just before the edge of the document. This is the base that we paint our sprite details onto.

Smoke:

For a smokey particle, I create a new layer and use the Cloud filter. With adjustments from the levels tool I can blend this cloud layer with multiply to make the white base we started with become much more wispy.

The sprite however is now too circular, this can become quite noticeable in particle systems with few particles, to clean this up we can paint black into the base layer, this has the effect of essentially erasing the particle.

Fire:

For a flame effect, you need to know what kind of fire it will be and how your particle effect is going to function. Often you can get away with the same particles you use for your smoke, but if you you want to go the extra mile utilize an eraser with a hard falloff and use the chalk brush preset to give some harder edges to the flame sprite. For added effect you can apply the liquify tool and drag out tendrils of the flame, however this can quickly become messy and look nothing like fire.

Tips:

  • You can generate an alpha by pasting the final image into the alpha channel, or if you are working in Unity, you can simply tag the "import Alpha from greyscale" in the texture import options.
  • Setting the opacity of the sprite in Photoshop to 60 - 90% will give it a softer feel.
  • You could generate a series of these to create a sprite sheet, tweaking them via the warp tool, liquify, etc.
  • Be wary of dragging out long tendrils, these will make the sprite much more recognizable in engine.

Applying these techniques can quickly get you a variety of particles and often sprites designed for one thing work surprisingly well for another. Don’t be afraid to use the same sprite again and again but be careful how big and obvious those sprites become as players will pick up on the repetitive nature of them. Really, they are so easy and quick to make that unless you need to cull textures from the project, you may as well make another.

 Cheers guys, I hope this helps out for some quick particles. Timothy

Dev Blog: Inheritance in Unity 3D

Calum Spring

This blog post is technical and aimed at programmers new to Unity.

Howdy readers,

This is going to be an introduction to using the Object Oriented programming principle of Inheritance in our game engine of choice, Unity 3D and programming language of choice, C#. Inheritance is one of the primary OO concepts and deals with creating classes that are parents and children of each other, allowing them to share information and functionality.

I thought for years that classical inheritance was incompatible with Unity’s Component-Object model but not only is this not the case, it’s implementation in Unity is particularly potent, and compatible with Unity’s inspector. The main advantages of using inheritance are twofold; firstly, Subtype Polymorphism allows parents and children to co-exist as members of a single array or list, as well as be substituted for each other as parameters for functions. Secondly, it means you can set up basic behaviour only once for any given object type, such as a bullet or enemy, and have that identical functionality shared across all subtypes.

Hopefully you’re already a little familiar with using inheritance, but how does it work in Unity? Let’s find out!

Project1

Step 1 - Creating a base (parent) class to extend from

Creating the parent class is no different to creating any regular script file in Unity, with one exception; if you want a function to be over-ridable (adding extra functionality but also retaining base functionality) in a child class, that function needs to be made “virtual”. The following screenshot shows a virtual start and update function. Virtual functions are, confusingly, still real functions and can be called as such, but now they can also be extended by a child class. (Unity will helpfully let you know these functions also need to be public or protected, a keyword we’ll cover in step 2.)

Script1

Step 2 - Creating a child, how to use parent variables, and the keyword protected

You can start creating a child class again like any regular class, but there are a couple of changes to be made. Firstly, that bit of the class header where we say “ClassName : MonoBehaviour”? The class after the colon, in this case MonoBehaviour, is the parent we are inheriting from. We want to change that in our child class to be the new parent. Don’t worry, because the parent still inherits from MonoBehaviour we still have all of MonoBehaviour's functionality! (like transform and gameObject)

Script2

Now that we have a parent and child set up, let’s have our child access and use some of the variables it inherits from being a subtype of the parent. You should be familiar with the keywords public and private. Just like public variables are visible to the rest of your program, they’re visible to children too. And just like private variables are hidden to the rest of your program, they’re hidden to children too! It doesn’t take a genius to realize neither of these are ideal. There could easily be variables you want a subtype object to access that aren’t available to your whole program. This is where the keyword protected comes in. Protected variables (and functions) are halfway in between private and public: visible to children but not the rest of your project.

Script3

To test this theory you can create one public, one private, and one protected variable in your parent class. Try accessing them from your child. Then see which are available in Unity’s inspector if you attach that script (or perhaps the child script!) to an object.

Step 3 - Parent methods; overriding and newing

The last important, and probably most mind-bending, part of inheritance is how to use parent methods (aka member functions) in a child class. The protected keyword is useful here too but we also need to learn a few extra ones. As we learnt in step 1, parent functions need to be marked as virtual if you want them to be “overridden” by a child, so the first step is to ensure your function is virtual.

Next step is to recreate the same function in the child. Don’t make it virtual this time! You can add some new, subtype-specific functionality to this one. You can access and modify both parent and child variables in here to your heart’s content. Okay. Try running that and see what Unity says. You should get the below warning, because there’s a few more things we have to do. One option is to add the new keyword to our child’s function. But if you do this, it will act like the parent’s function of the same name doesn’t even exist. Not exactly what we want.

Warning1

So, we also need to specify a new keyword to our child’s function to tell the program “This function is adding extra commands to an existing parent function”. We do this by specifying it as an “override” function. See the below image.

Script4

Almost there! Your code should compile without errors now, but your child function will be ignoring the parent’s. The last step is to actually call the parent function from the child one. You do this with the line “base.FunctionName();”. Base is another new keyword, it refers to “my parent class”. If you’ve used Java or ActionScript 3 before you might recognize it as the equivalent of super.

Script5

Our class relationship is complete! Any time the child function -  be it Start, Update, or something we define ourselves - is called, it will do it’s subtype-specific functionality alongside that of it’s parent. (Before or after depending on where you placed the base line.)

To use this setup in your games, attach subtype script files to your objects, such as SmallBullet.cs and LargeBullet.cs to their appropriate prefabs, and place all the functionality relevant to all of them in the parent Bullet.cs class. You don’t ever have to actually attach the parent script to anything! It will happily do it’s job from the shadows. With inheritance in place I can now create a list or array of Bullets and add both Small and Large bullets to it without a problem, they will peacefully coexist.

If you would like to download the project I created for this demonstration you can do so here, it’s compatible with Unity 4 and up: InheritanceProject.zip (130 KB)


Phew! Well done to anyone still reading, you should now have a greater understanding of how to utilize inheritance inside Unity 3D. Hopefully this aides you in future projects, I rely on it heavily to create expandable, readable code. In my next dev blog we’ll be looking at Unity’s player prefs library, a subject easier on the technical side but still aimed at programmers.

Until then, keep making games! Calum

Oculus Rift Day 3: Games and the Future

Calum Spring

The demos currently available for the Rift are packed with bite-sized fun and are a great window into what's to come, but of course what everyone's waiting for are the games. The support here is a little more lacking so far, but with enough dedication you can probably already get your money's worth.

Games

There are third party drivers around like Vireio Perception that are aiming to broaden Rift support to basically anything 3D with a first person controller, but the current early state has prevented us from getting it working. Which games do work, however, are Valve's Team Fortress 2 and Epic's Unreal Tournament 3 - via the Rift-enabled UDK.

UDK's Rift support isn't finalized but it can already be quickly enabled in any project. In the case of UT3, at least, while this turns on fairly painlessly, the standard implementation of shooting in the exact direction you're looking makes aiming a hilariously confusing experience. As far as we could tell support for other control methods are forthcoming.440_screenshots_2013-05-05_00001

Valve has dedicated a lot of effort already to Rift support for their free-to-play shooter. With in-built calibration and around a dozen control schemes you can easily equip the most pain-free setup for your eyes.

To play devil's advocate, what becomes more and more painfully (literally) obvious as you use the Rift is the damage the low-resolution panel causes to the experience. Reading and comprehending most UI elements is a fuzzy, eye-wateringly difficult effort in futility. This is where future hardware options need to step in, speaking of which...

Predictions (a.k.a. Speculation)

The most exciting part of the Rift is not what it currently does, but what the success of this early kit means for the future of the resurgence of VR. I've found my entire Rift experience dominated by exciting expectations as to what the future holds.

The next revision of this product - whether it be a second dev kit or first release product - should release fast, before the end of the year, even. The technology that's getting crammed into these units; mobile phone screens and sensors, are advancing so fast that by the time a new phone comes out it's already outdated, and the same is clearly true for the Rift.

While this could prove a challenge to keep up with, it provides a great opportunity for Oculus. A new kit with better screen, and probably front-facing cameras and more platform support could be, and should be, just around the corner. VR just 12 months from now will look unrecognizable and could never have been predicted to move this fast before the Rift was announced.

And I can't wait to see what happens.

This concludes our mini Rift series. Hope you enjoyed reading it as much as I did writing it! Calum

Missed the earlier installments? Rift Day 1 - Rift Day 2