Archive for the ‘unity’ category

Cube Swap Lock, out now!!!

June 25th, 2015

It’s finally out. After delaying to improve the interface from user testing the app is now on the app store, its taken a while but I think the extra work was totally worth it, it plays fantastically and the addictiveness of the game is far better than I thought it would be. Why not download it now for free and try for yourself

Project Sadist: Dev Diary #2

February 23rd, 2015

As you can see, still haven’t chosen an appropriate name

Things are going well for the game now, the model layer for the app is almost finalised so I can soon integrate saving & loading into it, I think in total I’m about 80% done on the app, I’m just focusing on getting the stats screen completed and then should have the entires structure working. That and some kind of help/tutorial system that will hopefully be simple enough so the user can start playing immediately

One thing that has slowed down some of my work is the layout and graphics of the app, this has changed drastically since I started coding the app and I think its something that will change more as we reach the completion of the app. I’m not particularly happy with the look of some of the menu buttons, I think its because you see that style used too much in the app and it starts to make it look tacky, I’ve made modifications to the score menu recently and quite like the layout so may have to implement something similar

Getting used to Unity 3d canvas for the updated NGUI has been good and bad for me, I think the overall NGUI is in its infancy and probably needs a few more update to fix the problems I’m facing, especially with regards to scaling for dimensions, I like some of it but I would love the to be an option to be able to specify canvases based on a min and max dimensions so I can rearrange the objects accordingly, due to this although I’d like to release on Android too I will probably leave this until the iOS one is completed.

Anyway hoping to finalise a few things and then I can start showing off some screenshots and offering so beta downloads

Project Sadist: Dev Diary #1

October 19th, 2014

Hi all, thought I’d update you with the current status of the game.

Things have been pretty busy recently so development has slowed down to a crawl, that being said I occasionally have time to work on it. The process I’m currently working on is the main bulk of the games scene with the intention that once working I can issue a few arguments into the scene and the game will populate meaning I can split my code into essentially two sections which should dramatically simplify things. This scene is soon to be finished and I am currently working on a few bug fixes, optimisations and general layout & look improvements.

Optimisation is something I’ve been working a lot on recently I had problems a little while ago with some code I used to generate borders on gameobjects and… well… it went bad I went from having 200~ draw calls a frame to over 1000 draw calls, this piece of code has gone through 3 transformations now but we’re finally at one with code that brings the draw calls back down to 200. A lot of this was due to rendering multiple 3D objects at real time to give the appearance of rounded edges whilst the new code now generates textures during the build setup so these can be cached and loaded instantly from RAM. Another series of optimisations had to be done to work of the current state of the users interactions and as this was part of the code this affected the frame rate whenever run meaning that if animations were running you could definitely see that the CPU was struggling, although this is an awful lot quicker its still not perfect, I may have to use coroutines however this isn’t desirable as the slowdown may manifest some other way. One more area of optimisation will also have to be made for the generation of the level, in the game you can choose settings for the level and it will check and generate the level, this can take a while as the calculation is random, ideally I need to pre-calculate every possible condition, store the valid levels into a database, then when I make a level all I need is a select for the inputs then load a random entry. Although usually it returns a valid level in a couple of seconds it would be nice for this to just generate immediately.

Anyway thats enough from me bye.
PS. I really need to think of a name for the app, no way is Apple gonna left me have the name Sadist in the app title

Shaders not loading properly in iOS Unity builds

September 24th, 2014

It’s that classic routine everything works in your game but when deploying to the device everything goes wrong, this time its due to unity’s shaders, you’ll most likely see something like this inside of the ios’s console logs

  at UnityEngine.Material..ctor (UnityEngine.Shader shader) [0x00000] in <filename unknown>:0

So whats going on here, we can see that the error is clearly with the shaders and the issue is that it can’t seem to find it. Let’s fix it

What should happen but doesn’t work
Shaders take up disk space and theres an awful lot of shaders that you can add, unity gets around this by only including shaders that you use in the scene. However some times you only mention the shader in the code so you need to inform unity to include specified shaders this can be done by going into:
Edit -> Project Settings -> Graphics
In this menu you can amend the array to include your added shaders, however closing the application and rerunning it shows the shaders no longer there so essentially nothings being saved, somethings going wrong here, and this is why you are getting the issue

The fix
Basically these can be fixed by ensuring shaders are available in the scene in edit mode, create a new material for each shader you want to use and add each to an object, I prefer to add these as child objects to parent with an empty scale, this way you can store it as a prefab and use it on multiple scenes.

Once built the ios device should be able to find the shader and your game can load again, happy days