Skip to main content

Posts

Using delegates in Objective-C

Why use delegation? Well when writing Objective-C programs in Xcode we are encouraged to use the MVC(Model View Controller) structure.In MVC a model cannot send messages directly to a specific controller.This can become a problem if data in your model changes independantly and you need to update this information in your view via the controller(The model must never communicate directly with the view).This is where a delegate comes in,it allows messages to be sent from the model to a controller that is not specified in the model but is rather specified by the controller,in other words the controller specifies itself. If you dont really understand what im talking about so far ,don't worry.I didn't understand delegates either until I needed one,but hopefully by the end of this tutorial you will understand not only how to use a delegate ,but the reason you would want to use one. Program breakdown For this tutorial we will write a program that has a model that will change an...

Lion's eat RAM's

I recently purchased a Mac-mini(Yes I own a Mac now) with relatively the same hardware specs as my(well the one I work with) MacBook pro, Intel Core i5,Graphics 3000(or whatever) etc. The only difference being that the ram in the Mini was only 2GB and the Laptop has 4GB,we will come back to this later. The MacBook Pro experience: My experience with the laptop has been great,never lagging and I really got used to using a track-pad instead of a mouse and found gestures very helpful for quick desktop management with a small screen.It was also very responsive and I keep tons of windows open all the time without problems.  When I got my Mac Mini,I popped it out of its box and plugged it in to my standard PC peripherals,switched it on and everything worked fine ,I got a few nice surprises too,I did not expect it to come with a wireless card or built in Bluetooth,just like it does on the MacBook. Then I tried to run Safari,iTunes and Xcode all at once(I do this often while worki...

The World’s best operating system

This is a debate that has waged since the beginning of the three major operating systems, namely Microsoft Windows, The Mac Operating system and the many variations of Linux. For the purpose of this post I will be comparing using the latest versions, so that is Microsoft Windows 7, Mac OSX Lion and well, Linux is Linux. Microsoft Windows is the operating system everybody should be familiar with, it’s pretty much what people grow up with and become used to, when you buy a pc, it more than likely comes with windows, you don’t get pc games, you get “games for windows”, plus the average person’s question when they see Linux on your pc is “What windows is that?”. Up until now though, I have never been happy with windows, there were always error messages and viruses and just general slowness and inefficiency. But from the moment I saw windows 7, I liked it, not only did it look good, but it performed well and I was able to use it for months without a single error, I nicknamed it Windo...

Skyrim

Out of all the games I was anticipating in 2011, The Elder Scrolls: Skyrim  (Kelle: Keizaal in the Dragon tounge) was strangely not one of them.This was because I hated Oblivion and expected Skyrim to be the same.  I was very,very wrong. There were actually only two reasons I hated Oblivion, but they deterred me from actually attempting to finish the game.Reason one was that the inventory used illogical little icons and was as intuitive as Quantum mechanics(I to this day don't know how to drop an item in Oblivion) .Reason two was aesthetics,the people are the ugliest collection of creatures ive seen in a game,and thats just the humans... And then theres the water,lets just say it filled my head with strange thoughts of water coolers in the Bethesda office being filled with a strange matte blue liquid. In Skyrim they fixed it all ,everything is beautiful ,and finally someone got it into thier head that words are alot more intuitive than silly little pictures (they even ...

Using The AeroGlass library

AeroGlass Library Version 1.2 Contents: ·          Usage with Windows forms ·          Usage with WPF forms The AeroGlass library accesses the dwmapidll to extend the frames of windows for use with the C# language, this gives the effect of having more glass areas on a window or making a window look as if it is completely glass. The library aims to make implementing this method easier so that you can achieve this effect with minimal code and will not have to access the dll yourself,version 1.2 of the library is compatible with both windows forms and WPF forms, though the implementation differs slightly. This documentation covers the implementations of both types. Usage with windows forms There are 2 ways of implementing glass on a Windows form using the AeroGlass library, one is to use the GlassPane controls AutoExtend property and the other is to use code, let us first take a...

My C# 2D Game

A couple of months ago i started writing a 2D shooter game using OpenTK(The Open Tool Kit) in C#,i got far but I ran into some issues,that ,due to my lack of knowledge and experience with the language caused be to abandon the project.I recently picked up the project again and in three days I was able to rewrite the game to the point at which I last stopped(this originally took me months),and the code is much more efficient. Luckily I have found ways to overcome certain problems and even though the collision checking is slightly dodgy it is now a simple working game that loads levels from a level file format I developed myself.It is my hope to soon release a "bemo'" so that people can see what I'm doing and I can maybe get some feedback.I use the term "bemo" to refer to a beta-demo containing only a few levels ,like a demo,but using the beta game code. So far the level files can only be produced by typing them out,I am working on documentation for the ...