Game Design, Programming and running a one-man games business…

Where does the memory go?

I haven’t been working on memory optimisations in GSB for a few days, in fact I’ve done nothing but work on features and bug fixes and other stuff for the campaign game. The game is getting better, and looks nicer now, but there is tons to do, a whole host of niggling little things, and some vital balancing and optimising still to do.

But as I work, I keep thinking back to my attempts to optimise the memory footprint of GSB. I wrote an overriden new and delete, to track all my memory (I never use malloc or free). I have spreadsheets showing all the allocations. However, it seems that the memory I allocate is just a trivial percentage of the RAM the game seems to use if you look at it with windows task manager or the windows performance monitor. Of course, there are about 36 different measurements of memory, such as ‘private bytes’ and ‘peak working set’, And nowhere is there a definitive answer on which one to use. However, even using the lowest one, there is still at least 50% of memory unaccounted for. At one point, I checked my stats were not reporting MB as KB, it was that bad.

Sadly, it’s hard to optimise when you can’t see the wastage. I suspect a big chunk of it is particles, but the maths don’t support that. It could be directx making system memory copies of video texture buffers and sound files, but would that be inside the GSB.exe memory footprint? Who knows!

In other news

1) The ecofan really works. In fact it is awesome.

2) Chopping wood from 3 year seasoned timber is trivial next to 10 month felled holly, which is like cutting neutronium with a spork.

3) The UK has a major apple glut. We have some apple trees in the garden and so many apples we literallty can’t walk in the garden for the fallen ones. I actually knocked on neighbours doors to hand them carrier bags full of apples today, just to get rid of a few hundred. It’s insane. We are eating as many as we can, and making apple cakes galore.

Drag and drop design

A lot of stuff in the GSB campaign UI is drag-and-drop based. For example, if you want to merge one fleet with another, you pick up a fleet icon and drop it on the other one. If you want to move a fleet you pick it up and drop it on the destination.

The trouble is there are some situations where that fleet has moved (and thus can’t move again) but you still want the ability to drop it on another fleet in the same location. That means I allow you to pick up an icon, but only drop it on a next-door icon, which is confusing. I change the icon color to show that it can’t now ‘move’ only be merged, and explain ti with tutorial windows, but it’s not really good enough.

I think I’m going to go for a two-pronged solution. Firstly I’ll restrict the distance you can move a dragged icon if it can’t leave the system, and secondly I’ll change the icon more drastically to have a big red stripe through it to show it can’t be moved right now. That’s still not a perfect solution, but it’s a step  in the right direction, which is always a good step :D

I tried out a competing space campaign style game today, which I didn’t get into at all, but that was entirely due to what seemed a clunky interface. I don’t want people to have the same view of the GSB campaign, so it needs a lot of work. Everything has to be super-intuitive. Lots of work to do.

In other news, we wanted quotes from 3 builders. We arranged 4 to come visit. Only 2 showed up, and 1’s quote was some sort of joke. I’ve now arranged a 5th builder. What the hell is wrong with these people?

Getting bigger?

GSB, and positech could be bigger than they are. I only have so much time, and frankly I’m knackered :D. I have no time to work on anything but the campaign game now. Ideally, there would be an ipad port of the game, idally there would be a game for the iphone, designed as a mini-game version. I just can’t do this stuff. Ideally the game would have a version that works on netbooks properly…

Maybe the solution is to find a few more ‘strategic’ partners like I have with redmarblegames, who do the mainstream mac port. There is also the possibility in the longer term of doing a GSB 2, or also maybe doing a spinoff game. A naval or land battle version, for example. This is all separate from my vague ever-changing plans for ‘Game 4’.

Gratuitous Space Battles is my most succesful game to date. It represents the clearest opportunity since I quit mainstream game dev, to increase the size of the company, and actually employ or strike deals with people to work alongside me. Do I want to do that?

I really don’t know. I wouldn’t be doing it for the money. I’m not convinced it would be more profitable anyway, but more because it’s taking me years to make a game, and I’d like to make a lot more. Maybe one day I’ll find the exact right people to make games on a fixed contract, or to even employ. I can’t help thinking that I’m being a bit too timid. You can only grow a company so much by increasing your ad budget and sticking with one employee.

I have a little sideline project that’s an experiment which will start in a few days. Not a big deal though. Not a revenue earner, either…


Solar Update

I’ve been working for hours on the campaign, so this is my break:

I emailed the solar company yesterday and finally said yes. That is the end result of a long torturous period of talking to different companies about potential installations, and looking at a total of 4 different roof locations, before eventually sadly concluding that they would have to be ground mounted.

What I’ve said yes to is an array of 10 PV  panels, in 2 groups of 5, in a portrait orientation, so as to minimise the width of the array, as the shading from the trees and the house take place at each end at the start and end of the day, thus minimzing overall shading. This means the array is likely to be about 5 meters by 3 meters in size, and means there is less room for parking, which is fine because this is the money I’d otherwise have bought a newer car with anyway :D

The panels themselves will be schuco MPE 215 (215watt) modules. The inverter will be a sunny boy, with a remote monitoring system called a sunny beam. If I can find out how to code a blog page widget to show current solar output, I will :D.

The installers (no doubt optimistic) estimate is for it to generate 2.15kwp which is 1,792KWH per year. Thats £740.19 in feed in tariff and a saving of roughly £268.33 per year. Thats a total of £1,009.02 per year on an investment of roughly £11k. Thats a ROI of  9.1%, or ‘much better than any bank account’. Now you see why I’m doing it :D If the power generated was 50% lower, it’s *still* a good investment…

HOWEVER. All this assumes that I get a) Listed Building consent and b) Planning permission. I am optimistic, but planning people can be very prickly. Quite *why* anyone could object to them is beyond me as you can only see the site from physically in our garden, plus they don’t even touch the house. I’m still nervous about getting an answer though.

I’ve wanted solar panels for about 10 years now, but I won’t believe it’s really happening until I have them working. The plus side to all this is the proposed site is right outside my office window, which is kinda cool.

Now back to debugging…