Archive for July, 2008

Sidetracked – upgrading wordpress

Monday, July 28th, 2008

Every time I log in to write a page as I did at the start of my lunch break today WordPress was asking me to update to a new version.  So I wondered what was improved in the latest shiny 2.6.  It turns out I can preview new themes without making them go live.  Great that’s a good excuse to upgrade so I thought I’d give it a go.  Apparently it’s as simple as a three step solution.

  1. backup
  2. copy over the new files and merge just one wp-config.php
  3. log in as admin and update the database.

Great, even I can do that.  So I downloaded the new installation here, played with the cPanel app at HostMonster until I was happy I’d a backup and then copied the new files over using Filezilla ftp from my windows box.  Then I merged up the configuration file, creating three new lines in my old one for new security using a website to generate random seeds.  All good – except then I couldn’t do step 3.  Fortunately my backups worked so I went back and tried again – nope.  So I got SSH access to my server, I needed to request it and the HostMonster help desk had enabled it within about 2 minutes after a quick e-mail.  Great!  I tried again, this time doing everything from the ssh log in as the process of unzipping and ftp-ing the php files appeared to have mangled line endings.  Still no luck.

Finally I read the more expanded instructions which make no mention of merging the wp-config.php file, instead just keeping your original.  As if by magic it works.  After some digging it turns out the automatic key generation had failed me and generated something that was messing everything up.  I generated new keys and added them for safety and now I’m on to the new WordPress 2.6.  Still sadly now there is no time for me to play with themes or write the blog I originally intended… bah!

First steps at mobile game

Tuesday, July 22nd, 2008

So over the weekend I spent a few hours working on my first ever mobile game. I installed NetBeans, the latest Java SDK and the Java Mobile SDK. Then I fired up NetBeansand started to follow the mobile development tutorial. Very quickly though I got bored of that and started to work on my own game.

For now I’m going to use the game designer application and draw up a simple town level which I can move around. To get things moving quickly I’m using the tiles that came with the sample game so I can’t actually distribute any of my versions until I rewrite it all.

I’m working on a roguelike game. At the moment everything is tiled based and the game doesn’t run in real time – instead it’s turn based. As I want to play it (and might be the only player) I’m making it so that the levels for the dungeon are autogenerated, infact the whole inspiration comes from Moria and later variants like Angband.

I might regret this later as I think it would be very cool to make the game run in real time so be much more like the Diablo series. If I did this then I’m sure the combat system would be inspired from that used by Bioware in KOTOR and Jade Empire. Here the game is effectively turn based however you input or queue up a series of commands for your protagonist to follow as combat unfolds.

So far I’ve found Netbeans to be an OK environment, although I miss the familiarity of Eclipse when writing Java. Also there is something wrong with the auto completion – when I ask it to tell me the arguments for a function call they’re always listed as “type arg0, type arg1, type arg2…” rather than showing me the argument names. Which is a bit annoying but I’m guessing a result of using a non-stable version of Netbeans.

So where have I got to with the game development? I’ve built a primitive map and can move my character around it, collide with walls/creatures and have my view port updated so the character is kept within the centre of the screen. Next up I’ve decided to tackle visibility – what can the character see. There’s some interesting articles on this on a site I found all about roguelike development called RogueBasin. There’s even a link to a java library that implements some of these functions – sadly it heavily uses generics for lists and generics don’t work on the mobile Java run times as far as I can tell. Also I want to optimize maths where possible to be integer based as I think that’s what the hardware supports and I want to minimize memory usage. This should be interesting as normally doing games I have control over what memory I’m using and how but not in the same way with Java! It will force me to think at the algorithm level much more than at the machine level.

Mobile games

Saturday, July 19th, 2008

I’ve always been interested in mobile phone games. They make a great way to pass the time whilst stuck waiting for something with little else to do. A common occurrence here in the Philippines. So I decided that as a project I’d have a go at writing my own game for a mobile phone – for my own fun and education.

I recently bought a new mobile – A Nokia 3120 Classic which has a nice big screen. Sadly however it’s not a S60 device, only a S40. I have two options developing for this phone, I can write in Java or I can try my hand at embedded development. However I write C/C++ for a day job and as this is a personal project I feel the urge to try my hand at Java. Also it should work on pretty much any mobile phone that way too without a great deal of effort.

I’ve used Java from time to time. At university I taught myself Java by writing a snake game as an applet which I might try to dig out. Then my second year group project was also Java with a fair amount of JNI – a plugin system for a VR world their research department worked on which allowed you to edit your avatar. Also my third year project – which was a ‘rogue like’ game editor was in Java. Actually in my third year I ended up being a lab assistant for the first years as their teaching language had changed and not enough of the teaching staff knew Java. Then more recently I dabbled with the some bits and pieces in eclipse using the SWT.

The first thing to do is to choose an IDE. For the sake of education I’ve decided to try out net beans. I don’t know if this is a good idea as it’s something else new to learn but that is the point. I’m already familiar with Visual Studio for C/C++ and Eclipse for for both Java and C/C++. Now I’m going to try my hand at Netbeans. Besides they appear to have a nice easy to use integration for just what I want. Being adventurous I’ve decided to download the cutting edge version, 6.5M1 and we’ll see how it goes. I’m going to use this blog to keep a development diary of this project under the category Mobile Games.

Setting up the site

Saturday, July 19th, 2008

So I’ve never actually owned a web site or domain before. Sure as a computer science student at the University of Nottingham I had a web page – we all did. However my page wasn’t the most inspiring of things. I was a first year back in ’96 when Netscape 4 was king of the browser and the web was a very different shape than today. So excuse me if I’m a little rusty!

I’ve been considering setting up this site for a long time. My first concern was finding a hosting service and also registering a domain name. I’ve been keeping my eye out on different hosting services and such and reading some reviews and in the end settled on wordpress blog and now I’m happily typing away with my second entry detailing it. So far everything has been as easy as following tutorials and clicking in the web site.

The PageWizard tool was an interesting experience – it’s really trying to be a web 2.0 tool allowing wysiwyg web page creation. I feel it’s a bit rough around the edges though to be honest. It took me a while to find out how to change the page title for example. Also sometimes it complains that my browser (firefox 3) can’t handle html text entry fields. Which is strange because it appears to work. Eventually I intent to had code my html but I wanted to get up and running quickly.

The only other thing that I’ve had any problems with is what would be a cool tool that is supposed to be provided that allows me to map a windows drive to my web space and browse it that way using windows explorer. I guess I’ll have a fiddle with that although it’s not so important – at some point I’ll try out the ftp and will probably publish my own, hand crafted html that way, if I ever get around to it!

So far so good, my experience with the Monster hosting service is a good one.

New challenges

Saturday, July 19th, 2008

Welcome to my brand new blog.  So why have I setup this web site and blog? Well as the front page say’s I’m a freelance games programmer. This is a blog for covering news and my thoughts for all things computer/technology related in both my professional life as well as hobby ideas. I’ve set up this site for a number of reasons. If anyone reading this knows me I’ve also got a personal blog where I try to keep my friends and family informed and in touch – however I’m pretty poor at posting there and my facebook account is probably a better way!

Firstly I feel it would be appropriate to have a site to send to prospective clients so that they can get an idea about who I am. Secondly I want somewhere I can talk to the world in general about my strange ideas and pet projects. This was all catalyzed however by the very sad demise of Pivotal Games a place where I was originally working in house and then more recently have been contracting for. I’ve been working with Pivotal almost since the very beginning, I’ve worked on every title they produced and it’s very sad. I’m hoping that some kind of phoenix will be able to rise from the ashes – they’re a very hard working and talented team and deserve to continue on and produce more great games.

So why did I leave Pivotal and become a contractor. Simply my private life interfered – for the better! I found myself in love and married to a wonderful Filipina – Lea. She wasn’t so happy living in Bristol (UK) and missed her home. I personally found the lure of living in the beautiful Philippine islands very strong indeed and so out we came. Both Pivotal and I wanted out professional relationship to continue and so now here I am.