Everyday’s a school day

I’ve been programming in c++ on/off for 20 years – tonight for the first time I used smart_pointers. Or should I say, I officially used smart pointers for the first time. ie: std::auto_ptr

I have been doing the effect of smart pointers in given situations for a long time, without realising that there was a special term for the practice!!

Related Posts:

  • No Related Posts

The Midnight Engine – iPhone

So I’ve taken, to porting The Midnight Engine to the iPhone. This is a task that I started 3 years ago. But as many of you loyally Midnight followers will know, time is not a friend to my projects.

I have been playing with getting the engine up and running under AirPlay SDK as this will hopefully give me a little more scope. It kinda goes against my normal philosophy with development, in that an engine must offer just the right amount of assistance to your project but not bog you down with far too many features that you don’t need nor want. There are reasons to consider AirPlay which I won’t go into here, but one of the advantages is that it allows me to keep development in C/C++ which is how TME was written. This is a bonus as I can just port the engine without having to rewrite – well that was the theory.

First I had to scrap my porting attempt from 3 years ago. A because there were an awful lot of errors, and B because I had no idea where I was at.

Creating a new project under XCode and Airplay, I had some 20,000 errors and warnings – mainly errors. Part of this problem was that the codebase had been written to cross-compile across OS’s. And it used to. Not any longer.

It’s been nearly 5 years since I did any proper work on TME, and things have moved on. The compiler didn’t like my code anymore. New keywords had been reserved. Warnings popped up for things that I’d never had warnings for before. eg. Comparing signed and unsigned variables. The Compiler was having different affects on areas of the code that previously compiled fine. The GNU compiler doesn’t appear to be as happy with namespaces as Visual Studio used to be. (that said I can’t get the old project to compile under VS2010 anymore!)

So I had to strip it back. And bit by bit put the code back into the project and painstakingly change everything that needed to be done to make it compile.

After a week – I’m done.

Now I need to do some testing and recoding. First is to get the project loading in the LOM database. This will allow me to wrinkle out some of the OS/Hardware issues in the TME libraries. After that I need to painstakingly test large chunks of the code to make sure they are still doing what I want them to…

Related Posts:

Lords of Midnight & Doomdark’s Revenge

Watch this space…

Related Posts:

Timbles Silverlight

SphenI mentioned previously that I was working on a new project.: Timbles. I also mentioned that I was developing it under Vb.net. And I also mentioned that I was using DirectX3D using SlimDX… Well… things changed…

The game was coming along nicely, and I had taken it into school and installed it on a number of their machines, and on the whole it was working ok. Their were just a few things niggling me about the installation process. That is; it was a pain. I felt it was coming a big ask to get people who were not used to installing games, to install DirectX. And not to mention that some of the machines struggled installing .Net2.0 – once everything was installed it all worked a treat. The process was just a little off putting.

Over the last 6 months I have done very little on Timbles. I started writing the backoffice code that would become the Measurements Server for the game; the idea is that everything that happens on the game is recorded by the measurements server so that teachers can run reports to see how the kids are performing. However, I didn’t touch the game much.

Anyway, last week started doing some work with Microsoft Silverlight, ( for those of you not familiar with it – think Flash ), and I’ll touch more on the specifics in a later post. Anyway, I now have almost all of Timbles running in a browser. Which means it is supported on all the platforms supported by Silverlight.

Here are some screenshots. Please excuse the poor quality – I hadn’t realised that I’d saved them in rubbish quality mode!

Timbles Menu
Main Menu
A Busy Screen
A Busy Screen
Just Starting A Level
Just Starting A Level
A Quiet Screen
A Quiet Screen

Level Rollover
Level Rollover

I hope to get a version running on my site for testing purposes, over the next week or two.

Related Posts:

Timbles, XNA, DirectX, and SlimDX

I’ve written some game code over the years. I joined SCi back in 1994 over the following 14 years I’ve written a fair few applications in C++ and utilised DirectX. When I started at SCi DirectX wasn’t out and we were still working with various graphics and audio libraries that gave you access to the plethera of hardware that was available. When DirectX was release in ’95 if was a godsend.

I haven’t written any game code on windows for a few years now and so coming back to it I spent a little moment thinking about what I wanted to achieve.

has now pretty much been replaced with . Replaced is a loose term there because of course DirectX is still available as a low level library – but have a large push on the XNA technologies. XNA allows you to develop game code in c# that targets windows, zune, and xbox 360. Now I know there will be a lot of pure programmers out there who would despair the concept of coding in c#, but hey, things move on. I’m getting a bit long in the tooth now and coding in C++ really doesn’t interest me anymore.

So I like the concept of XNA and C# – apart from two things – the minimum requirement and the platform dependence. You have to have a graphics card that has shader model 1.1 support. The laptop that I am typing this on – doesn’t!

I’m writing a 2d sprite based game. I want to use the graphics card to do all the work for me – why not, it can throw millions of textured polygons around the screen, so it will have no problem with my sprites – so why do I *need* shader model 1.1? Basically, that rules XNA out for me.

With regard platform dependence – I can target XNA using C++ if I use managed code. To be honest, after doing it, see my previous point – I can’t be arsed! Thinking about my target audience – really platform independance is not a major thing – the majority of them will be windows based. I intend to do a Mac version, but that can come later, and to be honest, porting from VB/c# to C++ or Objective-C – isn’t such a big issue.

DirectX can be used using managed directx. This is a way of accessing the libraries using c# or vb.net. It works well… I hade the prototype up and running pretty quickly using it – one problem – it’s discontinued in favour of XNA!

So that brings me to SlimDX. SlimDX is affectively a cross between XNA and Managed DirectX. It works a treat and doesn’t have the shader issue. So I have Timbles up and running in SlimDX very nicely!

This brings me back to another thing – the choice of language. As I mentioned earlier I coded the prototype in VB. After a little while of playing around, I made a decision: I’m going to leave the game in VB – why – well why not? The game is already up and running. I’m using the hardware for the audio and graphics. Thus the game logic doesn’t actually spend much time running in a update cycle. So why should I spend any time messing around trying to put it into another language. I actually prefer VB over c# – just because it’s simpler and there is nothing I can’t do in VB that I need c# for.

So the prototype has just moved to production code!

Technorati , ,
Wikipedia DirectX, XNA, Microsoft

Related Posts:

%d bloggers like this: