Project Sadist: Dev Diary #1

October 19th, 2014 by Alan MacGregor No comments »

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 by Alan MacGregor No comments »

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

NullReferenceException
  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

It’s finally time to start work on another game

August 9th, 2014 by Alan MacGregor No comments »

Hello there, it’s been a while, I’m not gonna say that I’ll add more posts in the future because things are crazy busy and, well, I’ve said that all before.

Anyway, just wanted to announce that I’m working on a new puzzle game with a project name of “Project Sadist”, basically due to early builds being tough as nails to getting anywhere close to finishing it. I’m programming it in C# in Unity3D which seems to be doing the job pretty well, with things going smoothly I hope to have something on the App Store before the end of the year and if I’m lucky on Android soon after.

I’ll try to remember to put something up on here occasionally (if I remember) maybe some screenshots and the like

Stay beautiful xx

PS Met the amazing Chris Barrie today from Red Dwarf, top bloke :)

Saints Row IV

August 28th, 2013 by Alan MacGregor No comments »

Loving this game, really funny, buy it

NewAwakeNothingHere

July 12th, 2013 by Alan MacGregor No comments »

Been working on some more sounds, some are starting to compile well, need to buy a new bass, and get some more beats from the drum machine, no vocals on this one

Beadsprites: The future of boring people

July 2nd, 2012 by Alan MacGregor 1 comment »

Recently while being very bored on reddit I came across something called Beadsprites, essentially they’re little plastic beads which when arranged and melted with other beads can produce small images or “sprites”. At the time I was very bored (On holiday bucketting down with rain with ‘Homes under the hammer’ on TV) and decided to give it a go. I soon became hooked.

I started creating small sprites (generally video game sprites from 8-bit to 16-bit era) which were around 3 inches long and then created larger ones just under 2ft tall. I became enthralled by it, constantly wanting to increase my collection of these things, looking at other peoples sprites, discussing on tips and then I realised something, without knowing I had gone back to being the person who if discussed this kind of thing around his peers would automatically be the most boring person on the planet. I’m only writing on here because the likely hood of someone reading this is near to nothing. Who reads personal blogs these days anyway?

Thankfully, looking up on facebook I find that there are people that I know who do even more boring things *cough* Warhammer *cough* so I’ve stopped caring so much, it entertains me, kills a few hours so I can live with that.

Anyway if you do want to see some examples check this reddit, you may even see some by myself http://www.reddit.com/r/beadsprites

#BongShower

June 18th, 2012 by Alan MacGregor 1 comment »

It’s a thing

Off Topic: Video Games

November 16th, 2011 by Alan MacGregor No comments »

I was raised in the 90s, a decade for great change in all things regarding technology, I loved this time, but looking back on it I find that the main thing I did in those days was play video games, and at the time that was fine. I went to school and during the holidays I would play games for hours and hours and hours and somehow that was all I needed. 11+ years later and a lot has changed.

Having to be a “responsible adult” has made me change my attitude on games, I now see them as distractions which is really annoying because ultimately I still love games. However. There seems so be and overt culture of obsessed video gamers, there always have been but now they are everywhere, and the worst thing is, they always swarm to the same few games, I am of course referencing the recent MW3 release.

The experience of games has been removed, people are playing the same few video games without having any experience for the rest that the gaming world has to offer. I’m not saying that people should not be buying these games I’m just saying that these are not the only games available, there are many more out there. One of the great things in the past is that if you wanted a game you would have to look round the store, buy a game you knew none of your friends had so you could swap it with them when you completed it, more than half of the games I ever played were from swaps. It was a great way of playing a wide array of games that you didn’t think you would ever play.

Thankfully there are some saving graces out there, one of them is the introduction of casual games in particular games for mobile devices such as iPhone, iPad, Android, etc. These games are often sold very cheaply and allow the user to give the game a try when they wouldn’t buy it if it were a £40+ game. Its also a fantastic tool for indie developers, it finally offers them a real chance to get into the big league.

Of course the problem with casual games is that they are just that, casual games. I still remember playing all my old games such as Final Fantasy 7, Broken Sword, Half Life because they had a story with memorable events. Just like movies and literature they took you to a new world and filled your head with memories, something that casual games such as Angry Birds and Tiny Tower can’t give you. Sure, they may keep you entertained for a few minutes but its a long distance to how good games could be.

Essentially there are many good games out there being made all the time, even some of the big budget games are good, but every now and then why not try some Independent games, or some obscure game that you’ve never heard of, you never know, they may be your new favourite

Programming Update

September 14th, 2011 by Alan MacGregor No comments »

A lots been happening with regards to my programming recently, one of the first major things is writing OpenGL. OpenGL is a language I’ve always wanted to learn but it often went way over my head, around May time I decided that I would try and learn it and in turn create an iPhone game. What happened was that I got very confused but eventually got down to how the code works, I’m still quite new to it so I’m gradually getting better at it with learning to techniques to make the code work better. One of the surprising things about OpenGL (not surprising actually) is the amount of optimisation you need to make to ensure that the user gets to see a high a frame rate as possible. Anyway a game was released and is now on the App Store, it isnt selling very well but I still like the fact that it is my first proper game

Since I’m struggling trying to get a job as a programmer I have also decided to start learning additional languages, the two that I have chosen are C++ and Javascript. I have programmed in C++ in the past but I felt it would be best to begin from the start again and really master this language. I also decided to use javascript so I can get some really nice AJAX scripts running, I already have one which admittedly isn’t that great but it does a task that saves me time so its all good.

Well thats my update, hope you all are ok, byes

Dos and Do-nots of iPhone development

June 10th, 2011 by Alan MacGregor 2 comments »

A couple of months ago I revisited my very first app on the appstore, iWin, which when I first created was the best I could come up with, then after creating iUnlocked I came up with lots of improvements for my initial app. I appreciate that programming is a learning process but here’s some things that I did to my app to really improve the quality

  1. UITABLEVIEWs are your friend. Originally any of the setting views I had created were held together on a normal UIVIEW and a couple of UITEXTFIELDS. The problem with this is that they often tend to look a bit basic and can give the impression of bad design, this is why grouped UITABLEVIEWs are so helpful. Anyone whose used an iPhone for any period of time will be very apparent of these views, mainly with the fact that they are commonly used with settings, because of this people will understand what is going on with your app when you reach one of these views. These are also really useful in about views as they break the information up clearly
  2. ReloadData means reload ALL data, if you have a UITableView with numerous rows and only one row needs to be changed, reload that one row rather than all of them, its often a little more technical than just issuing the ReloadData command but the performance you gain back from doing so is often worth it
  3. You don’t always have to use the singleton to transfer data from one class to another, if you are opening a new view from another view simply parse the data into the controller directly into the other class, as long as the property is nonatomic, retain and the variable is allocated you should be ok.