This site is a self-contained low down on what's going on in my life, what I'm working on, what I'm thinking about, and how I'm feeling about life in general.

Sunday, 04 May 2008

I recently faced a conundrum after upgrading the memory on my old iMac G5.

After the upgrade, I was greeted by silence. A quick check in Leopards preferences indicated that there was no audio hardware present, a check in Apple System Profiler confirmed the same.

My first thought was that I'd knocked a card or cable while inserting the DIMM. A search online indicated that this was a real posibility. I was dreading pulling the plastic monster apart.

Before breaking out the toolkit, I thought I'd take a chance on an old friend, Apple + Alt + P + R.

I'd dabbled with macs on / off for the last 10 years or so, and you pick up a few trick, resetting the pram and the vram, rebuilding the desktop etc. Since my g3 iBook I can't recall ever using those tricks.

With nothing to lose I booted up holding down those four keys and on the second boot, chimes! I was a bit surprised it worked, and puzzled as to why it worked but I'm glad it did.



Tags: Apple Mac No Sound Upgrade Memory Failure Silent Macintosh OSX Leopard

Sunday, 06 April 2008

I've been looking around for a rich text editor that works with the iPhone / iPod Touch Safari browser. I sometimes make posts when I'm out and about and manually creating html tags is a real bind, so my options, at a high level are:

  • Use a rich text editor
  • Add buttons to insert common tags
  • Dynamically add paragraph tags based on carriage returns

The problem with the iPhone is that the keyboard is only displayed when the cursor is inside a textarea, which rules out rich text editing, beside the fact that you can't currently highligh a block of text.

The next reasonable option would invove a textarea and using javascript to insert html tags at the cursor point. The only problem with this approach is that although it works it removes focus from the textarea and the keyboard disapears. This is an inconvenience but is the best available option available currently.

Dynamically adding paragraph tags is a time saver, as you just need to focus on typing. The problem occurs when you don't want to automatically add paragraph tags, say around a block of code.

A solution we haven't discussed, which would be ideal, is a custom key / keyboard feature. If you could have a keyboard set aside for custom, complex phrases, that were user programmable, then you could add your html syntax this was. Alternatively, a html key, which when held down, lists 5 / 6 common html tags.

Hopefully, within the next year or so this issue will be addressed for Safari, otherwise, native os html editors will need to be used and the content pasted into the web page, which is far from ideal.



Tags: Javascript Safari iPhone Apple HTML Rich Text Editor Webkit

Saturday, 29 March 2008

My sites iPhone icon

Just a very quick and simple tip for your site. Why not add an iPhone compatible icon to your site. When a user adds your site to their iPhone / iPod touch home screen, rather that a clip of the page, it will use your specified icon.

Start by creating a 60px x 60px png image that you want to show as your icon, I've opted for a cheesy example :).

Then, in your site, add the following line to the head:

<link rel="apple-touch-icon" href="/images/iphone_icon.png" />

Then, when someone adds your site to their home screen, they see the nice, purpose made icon rather than a flakey corner of the webpage.



Tags: iPhone iPod_Touch Apple Icon PNG Homescreen

Friday, 21 March 2008

For a long time now I've fancied trying to make an online web-based ajax-powered 4x game for myself. It would be a space-based game, similar to a game I used to love, Star Wars Supremacy (Rebellion in the US).

I used to stay up till the early hours grinding away at that game. It was not well received critically but it struck a chord with me anyway.

The only part I wouldn't be able to replicate is the real-time 3d space combat component, which is only a small piece of the game anyway. I don't really plan on hosting the game, though I may offer it for free download if I think it's any good.

I've worked out the majority of algorithms already, either by myself or by googling. The last one was how the combat system would work. In the end, I decided to give each vessel an attacking and defensive value to start with, that gives us a simple calculation for victory. 

Sum of attack from side a versus sum of defense from side b, and vice versa. For example:

  • Side a totals an Attack value of 65, and a defensive value of 135. 
  • Side b totals an attack value of 105, and a defensive value of 110
  • Side a's attack v defense outcome is -45, and their defense outcome is +25 giving them a total score of -20.
  • Side b's attack v defense outcome is -20, and their defense outcome is +45, giving them a total score of +20.

It is a high level approach, playing real-time the result may differ through tactical deployment of assets and targeting strategically.

Add to this captain bonuses for game characters on-board the ships and it does get slightly more complicated, but that's a different discussion.

Anyway, back to the topic. As a proud Mac owner and an iPod touch owner, I've decided to side-line the web-based version and concentrate on a version for the iPhone / iPod touch using the highly capable iPhone SDK.

Having seen the demos, I think it might be possible to create a 3d space battle engine also, which would just be amazing.

We'll see how it goes, I'm going to dust of my C programming skills and brush up on objective-c through a couple of books that I've ordered and see where it takes me.



Tags: iPhone iPod_Touch Apple 4x 4x_game Objective-C Game Algorithm Space Starwars Star Wars Supremacy Rebellion

Saturday, 08 March 2008

Just watched the apple keynote on the new iPhone sdk. I was very impressed by the apparent ease of use of the Api's and the comprehensive yet straight forward development tools and environments.

It gave me some great ideas for projects anyway!

I'm glad that apple were sensible with the pricing structure. Free meaning free in every respect. This allays some fears I had of spending a fortune on apps for my ipod touch. phew.

 



Tags: iPhone iPod iPod_Touch SDK Apple Projects
Featured Articles
Recent Articles