A short progress story for a train something

I've been tinkering for a little while on something quite ambitious (for me, anyway). I've sort of hit a knee-high wall in progressing it further so I thought I'd show what I have and talk about the things I found hard when writing it so far, before I vault my wall and carry on.

Making sketches and notes to figure out designs. This is a sketch of a artillery car from a 1939 Polish train. (Don't google 'armoured train' because then you'll know this is the first thing that comes up!)

The basic idea is a singleplayer videogame in which you command an (armoured) train across vast landscapes. You progress by transporting goods from town to town and hopefully turning a profit so that you can kit out your train to better fend off baddies. So far, so gamey. I wanted to rely on some optional storytelling, presented  in text form to fill in the gaps and make the world make a bit of sense, and to give you a reason to keep exploring. An aesthetic aim would have been low poly but realistic, trying to emulate some of the constraints late 90's game artists had but just in the interests of keeping the work I have to do at a minimum.

Same train from the side. Trying to understand the dimensions of the thing and relate them to the track drawing and physics I am working on.

So firstly, why trains? The simplest reason is because trains aren't spaceships (I'd be making Elite), or pirate ships (I'd be making Pirates!), or airships (I'd be making a budget version of Crimson Skies but I'm not yet ready to program flight models!).There's a majesty* about trains that I've never noticed before since they are so everyday and commonplace. A lot of music was composed on trains, Einstein uses them to illustrate the relativity of simultaneity, and somehow they're great place for fictional murderer mysteries. I wanted to give myself a reason to find out a little bit more about some of the effects trains have had on industry. As much as consuming media often compels me to do some peripheral research - I found out a lot about whales I didn't know about after half-finishing Moby Dick-, creatively I have been and hope to continue finding a lot to read about by trying to make a game about things I have no idea about.

Box follows pink line: GOTY

There are other reasons why trains might be a good subject when developing a game. It limits the design to thinking along one parameter: how far along the track we have travelled. I hope that when I get to it I can pull some visual trickery to make mountains look as big as they should, areas appear vast yet reasonably densely populated, thanks to train tracks being the perfect invisible wall - trains don't wander off in a different direction to the track unless they are very broken! I've also been thinking of base building as a mechanic, and trains makes the perfect mobile bases. You can operate a lot out of a train carriage, and each carriage can serve some very different functions - freight, combat, leisure(?), logistics and obviously the main loco driving the thing.

I have a reasonably clear vision of what I want to try develop, but the implementation has had its ups and downs. So far I've managed to make a tool for laying down train tracks and having them followed. That alone took a good while to get right, though to be fair following tracks does constitute to most of what trains do! This work was initially done in Gamemaker, but I panicked when I couldn't work out saving files and in frustration moved to Unity. Earlier on in the year I self-taught myself some C# so I handled the transition OK, but I'm by no means whatsoever talented at programming.

I wish computers could read my mind.

Some jargon. I experimented with saving these tracks as a list of angles, and the computer would read those angles and lay down tracks in the right places in sequence. That quickly became cumbersome. Now these tracks are a series of connected dots in the x-z plane. I've decided to keep those dots on the x-z plane to minimise efforts but I've take measures so that I can adapt it to 3D later on. The 'train' then obeys a differential equation and follows these points, and the space between each point is interpolated. Juggling between discreteness and continuousness is something I've had to start thinking about more explicitly. To be honest with you, most of the code is shoddy. It's a bunch of hacks and fixes. I spend a lot of time organising and reorganising it. At the moment I'm telling Unity what vertices make up which triangles, and it doesn't like it and kicks up a massive fuss if I am imprecise. I'm working out how to make tracks split off of each other so as you can imagine it's a bit of a nightmare right now!

I've taken a break with the programming in order to produce some art. First I've gone back to a set of books I half-read as a kid, Andrew Loomis' books on drawing. I'm building up the courage to go tackle those tracks splitting and move on to saving/loading. There's a very long way to go!



 Initially I thought about keeping the number of polygons to an absolute minimum for performance considerations, but according to some Unity documentation modern cards (HT&L upwards) can handle silly amounts of polygons! I wouldn't want it to be a limiting factor in any case. I'd rather have more polygons used in adding to the richness of the environment than in the models of the trains. Thankfully armoured, or even regular, trains do not have a massively complex shape. I've not done much 3-D modelling since I tried my hand at it as a kid but I'm sure I can get something functional out at some point in time.
*

Comments

Popular posts from this blog

The 1996 videogame Z, and the Men of War series have a lot in common, and I enjoy both

Cut Us Loose!

Itchy toe