Pioneer Clouds

Posted by | Posted in environment, Game Development, Pioneer | Posted on 03-06-2016

Some time ago I tried slapping a texture of the Earths clouds onto a sphere around Pioneers planets. It didn’t look awful but it was a static texture meant for just the Earth itself and having a selection of high-resolution textures to pick from would look very repetitive uncomfortably quickly.

As usual in a thread like that I immediately got asked why it wasn’t better, why aren’t I doing like X,Y or Z, etc but the idea is still bubbling away in my head. The thread itself was really just to gather resources and ideas rather than to track anything.

Now I have a small gallery of test images based on some noise based shaders which update over time but look rubbish.

See, from the ground:

From the ground

From orbit:

From Orbit

To get better looking clouds, ones that look like they’re generated by the planets surface and properties, you need to analyse that planets geography and the energy inputs/sinks.

There are a couple of interesting pages like the Stainless and Dungeon League sites who really dig into and iterate through ideas to produce some very interesting results.

Heat & Friction

Heat & Friction

2D normalised wind direction

2D normalised wind direction

I fairly sure that I can combine them already to get some interesting results but I hope that more than using them raw like this I can do some more processing to generate evaporation, rainfall (precipitation), rain-shadow style maps that will look even more compelling.

Right now I am basing the number of “bands” of weather on the Earth’s global atmospheric circulation which will not hold true for other worlds, so having some way of determining the number of “cells” to divide a planets circulation into will be necessary. Take Jupiter as an example, it has numerous “cells” which all have different gases being mixed into them giving it that distinctive layered look. Depending on the planets size, rotational velocity, atmospheric density, viscosity, heat absorbtion, angle of inclination to the nearest star(s), etc there could be anything from 1 to 100’s of cells dividing up the atmophere.

That would be something amazing to see, different on each and every world with corresponding weather systems and biomes.

That still won’t be the end however as all of this so far is excruciatingly slow to generate, requiring as it does a decent level of heightmap detail.

Generating those heightmaps is the most expensive single process in Pioneer, which is why the development of the multi-threaded processing made such a big difference.

Some simplifications, optimisation and cleverness will be required before this can ever make it into the game proper.

PS: IN parting I should also add that working on this came about because I needed to generate from of this data for the new JSON driven terrain generation system and because of the XFrontier forum thread which just looked too damned good to pass up.

Concentration!

Posted by | Posted in Life | Posted on 13-12-2015

There are times when I hate my own brain.

This isn’t a depression post by the way, that’s a different way to hate your brain ;)

No this is when I hate my brain because there’s 3 or 5 or 10 different things competing for my conscious attention and it does nothing to filter or quiet them all down.

I start on one task to try and clear the load a little but cannot concentrate due to the competing volume of other things. This I know is the ADHD I’ve always suffered from, the inability to just hold onto one thought for long because the interruptions aren’t from outside, they aren’t pressures, there’s just this constant deluge of things you feel need your attention right now, like RIGHT NOW ANDY!

This is why I actually have 3 different Git repo’s for Pioneer, plus the branches for them all and keep them all sync’d. I know that sounds crazy but it means that I can have multiple instances of VS2015 open and the moment that one thing starts screaming the loudest I can just alt-tab and satisfy that disturbance for a few minutes.

As any coder can tell you though task switching is itself a productivity killer. So I’m less productive overall, yes, but more productive than if I just waded on through trying to ignore the screaming insistence and feeling of urgency.

Sometimes though, it’s just too much, the demands just come constantly and there’s no single loudest impulse for more than a few seconds.

Even concentrating on writing this it’s difficult to maintain the focus.

So i’m going to have a shower, that sometimes quietens it for a bit, maybe make some lunch.

Unspeakably rude.

Posted by | Posted in Game Development, Life | Posted on 11-08-2015

The Incident:

The other night (Friday, 7th Aug) I was in the RoundHouse pub with some friends when I spotted a group of former work colleagues sat at another table.

I exchanged the usual pleasantries with one I know a bit better & thought nothing more of it.

At the end of the evening as they left someone I didn’t know came over and said “Hi I’m ####, you’re Andrew Copland?“, and I said – whilst reaching to shake hands – “Yes that’s me“. He shook my hand and said “I fix all your bugs“.

He let go of my hand and left laughing leaving me in silence with my hand still in the air, stunned.

A friend that I was sat beside asked me if he really had just said that and I, slightly dazed, simply confirmed he had.

This has been bugging me more than it should so I want to get why off my chest.

The Past:

When I started at this former workplace I was broke. It was after another company I worked for had gotten into financial difficulty and not been able to pay, simultaneously several big studios in the UK had gone under and made about 800 developers (in total) redundant in the UK.
There was a massive glut of talent and finding work got really hard, really fast at the worst possible time. I was unemployed from early July to late October that year.

Eventually I went to this place out of desperation, I’d heard bad things about them, so even though they were based very conveniently I’d instead chosen to go up and down the length of the country before applying to them. Partly this was also because it wasn’t a games role but a Tools one and my first time doing more than just tinkering or bug fixes on development tools.

It started fairly badly with some office politics treating the outgoing developer I would replace unfairly. Thankfully the Tools team themselves were great and the guy who was leaving (that I knew already) made that whole time work despite the bullshit.

Sadly about 6 months into this I started to suffer from depression and a little anxiety. It took me a while to realise this of course, anyone with these things will know that they don’t come with an easily identifiable rash or something to give themselves away, they come on slowly and discreetly.

The pressure was on at work due to company finance problems, project deadlines, a new tool that needed creating – which should have been a simple affair and conceptually I had no problem with. However by now my mental health was affecting my work. This was when I realised what was wrong and went to my doctors.

To cut all that short, I got help.

The Fix:

I got some very mild anti-anxiety tablets to stop me having panic attacks and elected not to treat the depression medically but to get counselling (CBT to be precise) instead and to keep medication an option for later if that wasn’t helping.

I also started to look for another job as it was clear that the way the company worked, and the work itself, didn’t suit me at all.

Getting the anxiety under control really helped my work but during the time leading up to this I had written some of the worst code of my entire life. Even with things being better I was still under a lot of time pressure to fix existing bugs / features and to write the new tool so this code also suffered quite badly. I have no doubt that I left some absolute stinkers in that codebase.

Since I started as a technical QA (bug fixer) I’ve been on the receiving end of code like that too. In fact the code I was replacing was already pretty hideous and bug ridden but only because it too was written whilst it was being used in production with all those same time constraints.

What I have never done is approach someone else and mock them for their bad code.

I’m Normal.. No, Really:

Perhaps it’s because I am an average coder, I strive for excellence, I achieve average but I don’t see a reason to beat myself up for that as I always strive for excellence regardless. The attitude that you should only code if you’re some kind of code-magician is only held by the most deplorable of shit heads. Sadly I’ve worked with a few, being openly mocked in a company wide email by the lead programmer of another studio, as junior coder, for asking for help comes to mind. I shrugged it off as my own lead was far more supportive and the better man, it was his opinion (to paraphrase: “Don’t mind him, he’s a dick”) that mattered more. I’ve remained friends with many of the people I’ve worked with, and have been rewarded in my work by always being recommended and thought of highly, sometimes even for my skill and not just my dedication.

Over time I’ve learnt that I’m not alone, other people have gone through periods like me, outside influences in their lives that have affected their proficiency at work. It seems obvious when you say it aloud, but if you’ve been dumped by your girlfriend, divorced by your partner or separated from your children, maybe you suffer from depression or anxiety for any reason, then yes your work will suffer because you are suffering. You shouldn’t be mocked for that, not then and not unfairly in the future when some 20-ish-year-old University graduate has to see those bugs you wrote at one of the lowest and most difficult times of life you’ve yet faced.

My subsequent job was also in Tools, I found out that at least that hadn’t been the problem. Just some combination of the company / tasks / projects / environment had combined badly with what was going on in my personal life at the time to affect so horribly. The next job went well and I enjoyed it until the company was being bought out and I saw an opportunity to get back into developing games themselves. Tools development just isn’t for me, Tools are part of the process of making a game, and it’s the game I wanted to be making.

These days I do contract work, we re-launched an older PC title on Steam with some bug fixes and improvements including replacing the old networking with Steam’s system and I wrote a lot of improvements and additions for it. Now I’m still working with that company and with my friends because everyone has been pleased with my work, for the most part I am too. There are disappointments, I am after all just average and I make mistake or do stupid things, but I’m also successful far more than I fail.

The, let’s be generous and assume nothing malicious, “witty-put-down” I experienced the other night out with friend has been slowly gnawing at my mind now not because I’m without fault but because of that time, because of those difficulties I faced and how much everything hurt…

…well, that and it was a just a really shit thing of them to say ;)

Andy

 

NB: Yes you can probably look at my LinkedIn page and figure out where this all happened but I’ve deliberately omitted that stuff so keep it out of the comments please.

Asteroids

Posted by | Posted in Game Development, Pioneer | Posted on 08-02-2015

These are some screenshots of a test asteroid created via procedural methods for Pioneer Space Sim.

Work, DLC & DRM

Posted by | Posted in Game Development, Life | Posted on 22-01-2015

So, back from Xmas I get my PC working again at long last, several parts later but what the hell eh?

This means back to work too and immediately I am reminded of just how clueless this industry can be. Take our DLC releases, or rather the DLC we’re releasing for other companies for our game. Confused yet? Not as confused as I was since this wasn’t supposed to be on the cards for quite some time yet. However due to the games success it’s been pushed forwards from “many weeks” after launch to… well we’re about to release the 3rd DLC pack on Tuesday! How’s that for a change in timetable.

Maybe it wasn’t a change and the client are simply goddamn awful at communicating with us what is going to be happening, or indeed when it will happen. Having dealt with this now for a few weeks, and through my exhaustion, I can confirm there’s nothing malicious just sheer ineptitude.

The reason I am exhausted is because I’ve been implementing the initial DRM system we’ll be using for future DLC. Yes even whilst we’re releasing DLC that I have to double-check for problems I am writing the DRM for that same system. This is a DRM setup that I explained could take upto 3 months to write, but they wanted it in a hurry so I stripped it down and said “How about 3 weeks?” to which the reply was “Great! We’ll start testing it in 1.5 weeks then!” … that’s not how it works, 3 weeks means it will start working in 3 weeks. No I am of course now committed to doing what was initially a 3 MONTH task in 1.5 weeks because some people can’t read who sadly are also the ones who pay the bills :(

Then there’s the DLC, I’ve had them turn up without you being able to see outside of the plane, then to get a “fixed” version, where the plane was completely invisible. Or when asking for the raw original why is it that we nearly always get the installer? Meaning we must install the thing, get past it’s DRM / license then extract the changed files then build the DLC from them and hope we didn’t miss anything? That’s assuming that anything works. We’ve fixed issues in each and every DLC we’ve received, issues that were in them when they were sold as standalone products for the last 8 years! Simple text file and naming issues that take seconds to fix.

All the while I’m trying to create this whole new DRM system and my mind is staggering under it all.

Thankfully Rocco has finished most /all of his bugs and has taken the DLC checking off my hands, Steve does the initial unpacking/packing and testing, then Roc’ does a sanity pass on it in the Debug build to see what asserts, which given that they’re mostly conversions from an even older version of the game means that lots of things assert.

The lack of professionalism is confusing, nevermind staggering, and tiring to deal with. Files arriving at the very last possible second when testing them properly is impossible because it’s so late in the day, or last minute changes the morning before launch abound. It’s risky and it’s unnecessary.

Mostly I am enjoying this work but as ever the parts that suck are the parts where your deadlines are driven by those who don’t have a clue and don’t seem to have the nous to acquire one.

Back to work.

What to do when your PC goes Kablooey on you.

Posted by | Posted in Game Development, Life | Posted on 06-01-2015

Obviously your first response should always be to panic.

By “Panic” I don’t mean furiously try and solve your problem. I mean that you should take a long time to just sit there, scream, cry, wail, gnash your teeth at the wall of horror that is the demise of years of effort and a couple of thousands of pounds of hardware. Really wallow in that despair because lets face it: You’re fucked.

Just before Christmas I was faced with this and I made the classic mistake: I didn’t panic. No what I did was carefully diagnose the issue, then the reality crept up on me. The costs to fix it began to mount, the work and personal data I had that could be irreparably lost followed by that absolute sadness that is the demise of your personal PC.

Maybe I should explain that last item. I built my PC. I didn’t make the chips and circuit boards that are in it I just picked them, carefully and after lots of choice. I weighed up all of the costs, the implications for the future, the path that choosing a particular chipset would set me upon. Those decisions were heavy and the impacts are still being felt now.

When everything was chosen, bought and delivered I sacrificed my old machine. It was another custom built one but I couldn’t afford to buy all-new and had to re-use certain components. This is fairly typical for the budget tight PC builder but it does have one terrifying downside: fuck-up and you have no PC at all, and no money left to get one. Things went well though and I built my new PC. it was awesome compared to the old. Over the years there have been numerous upgrades, memory, GPU(s), harddrives and even the CPU. An attempt at water cooling using a closed loop cooler is best forgotten but hey, I tried!

It’s been through 3 operating systems too and a couple of monitors, and multi-monitor setups, I’m probably missing out a lot of things. I think I had SLI GPUs for a while, I forget, there’s been a lot of things. Things I have done, with that machine, we have spent time together. More time than anyone spends on a car, more personal than any static musical instrument, more involved and consuming than anything I can think of beside having children. I don’t have children.

I’ve earn’t money with that machine, it has been my personal PC, my work PC, my hobby PC, my gaming PC, my learning PC, my development PC.

Right now it’s switched off. Inert, inoperative, lifeless and waiting for me to make it function again. People that I discuss this with tend to think I’m a bit special, then harp on about there own hobby, the one they spend the odd evening once a week/month doing, and how it makes much more sense to feel involved with that despite spending a tiny fraction of the time and energy on it. Yes it is “only a  PC” in much the same way someone might say to a musician that something is “only a guitar” – I wouldn’t, I have at least half a fucking clue.

The last time it turned out that it had fried the GPU, an expensive component by itself but thankfully under warranty.

By the way www.overclockers.co.uk customer service were great, I phoned, told them the problem, they immediately sent me the return information and issued an RMA. They sent me a replacement card the same day that they received the broken one. I couldn’t have asked for better. They gave me the option of a refund too but I chose the replacement. Cheers anyway if you ever read this.

This time it’s looking like it might actually me even more serious, and more like the problem I initially believed it to be before Christmas. I think the motherboard might be toast. Not completely toasted yet, but getting a bit crunchy and too dry to call bread anymore at this point… I may have to abandon that analogy. The motherboard being the most central component of the whole machine means replacing other parts like the CPU and RAM too. At this point there are only a few other parts I’d want to bring across. That shiny-shiny GPU, the harddrives (2x SSD, 1x HDD) and erm… that’s it actually. Even the case is old and newer ones have some much better layouts and… I’m justifying aren’t it? I can hear the imaginary pound coins being sucked out of my bank account “full” of imaginary money.

When it initially went kablooey before Xmas, once I’d stopped not-panicking, I priced up a replacement machine. Then I went looking for how much a loan would cost me.

Time to dig out those figures and get a PC built then? Something a lot less Personal, less PC more Computer. Something with … a warranty.

Andy

I quit Pitbull before it became Epic UK.

Posted by | Posted in Uncategorized | Posted on 19-11-2014

It seems I never mentioned that I had quit Pitbull Studio before it got bought out by Epic Games to become Epic Games UK.

So yeah that’s a thing that I did :)

Why?” you might reasonably ask as it doesn’t seem like a particularly great decision on the surface.

There are a few reasons with the main ones being:

  • When we were going through the process I was getting the feeling they didn’t want to have people remote working regularly – which I did 100% of the time.
  • I didn’t want to be working on tools anymore and that’s all that I was doing – tools to me are a means to an end, it’s the END that I’m interested on.
  • Another chance came up at about the right time that was working on games, remotely, for more pay, with people I knew and liked.

So you see that it kind of makes sense towards the end there.

Pitbull was good to me, the guys who work there are great, dealing with Epic was mostly great and UE4 is very interesting and some of the best tech’ I’ve ever worked on. It was just time to leave and get back to doing the things that I wanted to do before I got dragged into Tools development by the drag anchor of my mortgage commitments.

Andy

OpenGL 3.2 in Pioneer

Posted by | Posted in Game Development, Pioneer | Posted on 19-11-2014

I just merged in my changes to update Pioneer to use OpenGL 3.2 on Windows/Linux/OSX and since I haven’t posted about anything in a while now seemed like a good time to describe those changes, and why I’ve made them.

Pioneer has been using OpenGL 2 for many years now, it even supported the fixedfunctionpipeline until not long ago and it’s rendering system has stopped Pioneer from being ported to run on mobile class devices which typically use OpenGL ES. It used methods that have become deprecated including the matrix stacks, built-in lighting and texture coordinate structures and had several performance sapping calls to glGet* functions.

Over time I have removed all of the glGet* function calls, which improved performance and consistency but put off the really big rewrite to refactor everything to use our own matrix stacks, lighting and texturing for a long time. Eventually the lure of modern Vertex Array Objects tempted me and I bit, sadly this broke the OSX version of the game and I didn’t even notice for a few weeks.

This was the straw that broke the camels back. I knew that OpenGL 3.2 would work on OSX/Linux and Windows for most people from experiments/rewrites I had done, but struggling along with all of the old crud and extensions was taking up a lot of time and making it almost impossible to progress.

Perhaps a better coder could have found the magic combination of incantations required to make everything work across of them and retain the OpenGL 2.x setup we had but I am only human so that Sisyphean task could go and kiss my ass.

There will be no talk of the “future” in this post since I’ve learnt my lesson that discussing it just means it gets sidetracked and won’t happen within anything like the timeframe I thought it would. Of course these changes means that there will be bugs, there will be performance issues and opportunities, there will be features that people will magically want adding in zero time ;) and so on and so forth. We’ll just have to deal with them as they occur.

NB: I have removed the links to the older 2.x compatible executables as they were removed from the download page at some point.

Andy

Birthday Depression

Posted by | Posted in climate change, environment, film, Life, movie, plot | Posted on 31-07-2014

I might possibly be crazy as no-one else I know seems to get this way about their approaching Birthday so I thought I’d jot down how I feel as I approach 35.

Yep, 35 years old. An age that’s neither too old nor too young, for me it’s something of a nothing year. Just like all of the others.

Let us take my 30th as an example. I wasn’t worried about my 30th Birthday except in one specific way: It was my 30th therefore people would expect something of it.

A party, drunken nights out, some big event. The trouble was that like most of my birthdays I really couldn’t have given a shit.

The day was saved by Danni who organised a great day, with drinking, showed the original (and as far as I’m concerned: only) Transformers: The Movie at a small local cinema, with more drinking and celebrating as the evening went on. Just as well she did too because otherwise I’d have been sat at home with a beer/wine reading a book.

In the here and now as my 35th approaches my parents are asking me to update my Amazon wish list. I use it as a sort of bookmark for “things I will never buy and don’t really need/want but they looked shiny when I was browsing that one time…“. Friends ask/demand that I do or do not do parties and drinks and things either when they are or are not around, and many people seem to want to know what I plan-to-do.

On any given day I have no plans, ever. This isn’t some stubborn male thing, although it is more prevalent amongst my male peers I’ve noticed, perhaps it’s because we’re completely out of control of our lives.

Whenever I do make plans I inevitably discover that they conflict with someone else’s plans which were laid down during the time of William the Conquerer and are apparently recorded in the Bayern Tapestry so why didn’t I check that or at least respond to the FaceBook invite (I’m not on FaceBook)? Inevitably these plans take, at least historical, precedence and once this has happened for the 500th time (I’m a slow learner) you get the feeling that no-one gives a shit what your plans were anyway even if they don’t conflict with someone else’s, so why make them if it’s an exercise in futility?

Thus I find that like so many male peers I totally suck at planning things. So, no, I don’t have anything planned for my 35th.

Now the depression part.

Well I’m getting older, I’ve noticed it of course. I’ve been going to the gym and seeing a personal trainer for almost 2 years now. We’ve changed my diet, my drinking and I’m much more active. This has resulted in me achieving a little better health than absolute stasis. I am slightly fitter than I was, slightly less fat, slightly stronger and much, much, poorer. Oh fine I am also quite a lot happier that I’ve achieved that much rather than the stubborn and rapid decline that I was previously going through ;)

Still the fact remains that I’m greyer and things creak and ache more than they used too. These aren’t things I feel like celebrating or enjoying. The good bits sure, but most of those don’t revolve around this bizarre present giving ritual we’ve built up around “Birthday’s” as a special thing. It feels more “Hallmark(tm)” than Birthright. I long ago grew out of presents, most of the stuff I want I buy myself but more importantly the things that I want are either outside of the price range people can afford, or simply intangible.

I don’t want more stuff or possessions instead I want time-off, happy friends, world peace, good news, all sorts of hippy thoughts and mumbo jumbo like that. Now the thought of costing my friends money to buy me a round, or get me a gift disturbs me. It’s the opposite of what I want for them, from them, or our friendship. Sure when I was younger I loved getting toys, books, t-shirts and I still do get part of that feeling when they’re given as honest gifts but something has soured about the experience because I as an adult know it has cost them something in time, effort and money which are 3 things that I finally realise are more than just words.

All of this culminates in some mess of dreaded expectations, plans that’s don’t exist and a feeling of responsibility that I really should have done something with my life by now all because of a single date that comes by every damned year. It’s all atop the things that are already bothering me.

To end all this then please don’t get me wrong: If you enjoy your Birthday and celebrate it then I will be right there, buying you drink and handing you the gift that I spend time, effort and money getting for you and wishing you a sincere and heartfelt Happy Birthday – whatever you do just don’t entrust me with planning anything (see above) for it.

We are all different though, so as we would celebrate your Birthday as you would wish, could we just sort of … relax when it comes to mine? I’ll be out for a beer at some point – I would have been anyway. I’d prefer to buy my own drinks, and to only have between 2 and 4 in the entire night. No cards, no gifts, no crazy shit (crazy shit is alarmingly normal for me), I’d prefer to read a book, watch a film and chill out without organising, or being organised against my will.

That’s a Happy Birthday.

Andy

Making more work

Posted by | Posted in Game Development, Pioneer | Posted on 09-03-2014

After taking a look at the awesome No Man’s Sky videos and artwork I decided that enough was enough: Pioneers terrain engine must die!

Now I’ve been “meaning” to do something about it for several years, and I have done bits of work too it over the years: reduced it’s memory footprint drastically, refactored it internally, multi-threaded it with a job system, numerous optimisations etc. There’s some things though that I’ve just left well alone.

That time is over: yesterday I merged some work-in-progress code that takes the underlying GeoSphere code and splits it into 3 classes: BaseSphere, GeoSphere and GasGiant.

In future there will be more splits because Stars are still rendered with the GeoSphere system meant for CONSTRUCTING PLANETS! That won’t do at all.

It also means separate shaders, materials and all manner of other technical bits which means that the way gas giants are generated and rendered can now start to diverge drastically and rapidly without worrying about breaking the way that stars or rocky planets are created. Even just doing this much has taken a surprising amount of time mostly because I do this as a hobby and don’t have a lot of opportunity to dedicate too it. Also my real job tends to leave me without an awful lot of spare mental capacity at the end of a day.

Progress s progress though and there’s  couple of other things coming up.

  1. I’ve been working on implementing terrain texturing, which you can read about on the forum, and am currently writing the system to manage to tiles and build the texture atlas.
  2. GPU generation of gas giant textures, hopefully allowing for less CPU work and bigger textures, possibly updating them in realtime someday in the future.
  3. Placing instanced detail objects – think trees, rocks, grass etc – this ones very very early work though don’t expect it … for a long time!

I haven’t forgotten the Oculus Rift stuff either, it’s just a little bit down the priority list.

Oh and I am now on Twitter, although I haven’t figured out why yet.