Sunday, 18 March 2018

The Asset Fidelity Arms Race

So there has been a lot of discussion about the cost of game development recently. Unfortunately a lot of that has been used to defend questionable business practices (there is another gaming industry and I have absolutely no interest in ever being part of it) or extremely short-term views of economic expansion (eg increasing new-release unit prices for a medium that's already one of the most expensive ways of purchasing a single piece of mass produced entertainment and has been shrinking unit costs and value [loss of resale/lending etc] with the successful transition to digital).

Of course, while there are billions in revenue to be made from a single project, massive corporations will continue to greenlight projects whose scopes grow to a decent percentage of the potential rewards. So really the biggest budgets will always grow to fill the potential maximum returns, which means a growing hit-driven industry trends towards growth. This gives me a rather fatalist view of that original discussion (and concern about the "solutions" proposed which point at gambling mechanics and increasing unit prices as if they could not lead to a market crash or reverse decades of market growth).

But let's step back a second. Asset costs are going up and games are getting bigger (if not longer - not a bad trend as we balance the endless replayability of something like chess with the expectation that you can tell most stories in much less than 100 hours - be that in a book, movie, or TV series). We've been talking about this for as long as I've been involved in video games (~1999 onwards, first as press then adding indie).

We're about to watch another GDC where there should be a great selection of technical talks, often that propose paths out of an increasingly expensive asset fidelity arms race. But are we going to listen and then go back and just use these techniques to build even more detailed worlds? Even on an indie project (where the project decisions are usually made by an in-the-trenches dev), we tend to scope for the most that we think we can do. Doesn't that say something about how this arms race only exists because we aren't threatened by it? That we're already engaged in a careful process of ensuring the incline is just right for stable growth.

Forza Motorsport 4 - Xbox 360 (2011)

Seven years ago, this was the detail level for Forza, except this used an offline renderer (photo mode) to really make the most of those assets. To my eye, this asset stands up a generation and a half of consoles later. When I look back at some titles no longer considered cutting edge on game photography sites like DeadEndThrills, there is a lot to like about the actual assets even when just tweaking the real-time renderer to try and push the limits of what it can offer. And the cost of making assets at that fidelity level (as our tools advance) is only going down with time. Not to mention, the potential for reuse grows (especially with more component-based design from workflows promoted by stuff like PBR).

When I'm working on level-of-detail systems, it's really only an incremental improvement in the potential density of the very local area that chasing asset fidelity is bringing us today - the rest of the scene is managing way more assets/detail than we have the ability to render in 16ms. Is the asset fidelity arms race over if we want it to be? Long term, are we looking towards one off costs (R&D: new rendering technology and hardware advances) and larger budgets building bigger worlds (for the projects that need it) rather than major increases in the fidelity of assets? Not to say there is no point in increasing fidelity but how quickly will this look like diminishing returns? So much of the very recent increases in visual fidelity seems to come from rendering advances that provide things like rich environmental lighting or better utilisation of existing assets (combining high pixel counts with good actually super-sampled anti-aliasing).

Sometimes I feel like we're being sold a false choice: between sustainable development costs or expensive looking games. As we slowly ride the silicon advances (the rendering potential of a $150 to $500 device, quite a narrow window that is constantly throwing extra FLOPS at us) and develop new real-time rendering algorithms, it is far from as clear-cut as it can sometimes sound. When we look at the photo modes that have come to games, often that produce extremely clean and detailed versions of what the game actually looks like in action, we should remember that this is already the potential visual detail of current game assets. We’re just a bit of hardware performance and a few real-time techniques away from realising it. These are long-term advances that lift all projects up, sometimes with major increases in asset-creation productivity (eg integrating various procedural assists and more recently the potential from moving to PBR). In addition, expecting users to buy new hardware for a few hundred dollars every four to seven years is a lot more reasonable (and sustainable, as we chase the affordable silicon cutting edge) than pushing unit prices to $100 or even beyond.

GT Sport - PlayStation 4 Pro (2017)

So, as I look to GDC, I'm looking forward to hearing about a load of exciting advances. I always look forward to SIGGRAPH for the same reason. Even if the budget to expand asset fidelity dries up tomorrow, we should be able to continue to make amazing things. Video games are built on innovation. Let's not allow our concerns about the asset fidelity arms race to lead us down a path of thinking the people who buy games are a resource to be strip-mined as rapidly as possible. Sustainability is just as much about ensuring we can offer something at a price everyone can afford and which enriches their lives, providing delight rather than cynically tapping into gambling-like addictions or experiences that feel hollowed out.

Saturday, 17 February 2018

Building the Scaffolding: Mashinky

The last month has involved a lot of building the scaffolding required for a large project. The unsexy code that allows you to build things quickly in the future. Core services - debug displays, logging, state save & load, program execution playback; and basic tasks - data structures, juggling between CPU & GPU, job systems for organising work, etc. It's the work of not starting out with an existing engine and only some of it can be avoided by looking into the ecosystem for Rust and picking out the crates that best satisfy my requirements.

The benefit of getting this stuff done in Rust is that I'm not too worried about my threaded code, and I'm getting used to the details of the language and compiler tools before I start any heavy experimenting or profiling to optimise what I'm building. There is always a period of getting up to speed and sometimes you can overlap it with doing the basic code that often is more about getting plans down than doing anything novel or particularly complex.


I've been playing quite a bit of Mashinky recently, which is an early release of what could turn into a pretty exciting spin on the TTD model. A seven year solo development project is being brought together for a final landing and it's interesting to see such a clear vision which hopefully this team (presumably paid via the Early Access monetisation of the final part of development) will be able to polish off. It's good to find inspiration in the work of others, especially when you're building something that has yet to really create anything worth showing off.

The real party trick in this game right now is flipping between a stylised orthographic (polygonal) projection and a more modern and realistic perspective projection. You build on the classic grid but can flip back to enjoy the scenery at any point. It's a good way of providing both the underlying details you need to construct line extensions and offer a visually interesting view into the virtual world you're shaping.

Speaking of scaffolding, the Early Access version is very much incomplete and, between the features that are completely missing, what is here does feel a lot like it is scaffolding for a pretty engaging problem engine (as most builder games are, for example Cities Skylines lives on the traffic problem engine that drives many of the decisions you have to make). In the case of this Mashinky alpha, it provides the template for dynamic and authored quests along with three eras of technology that slowly advance the available equipment and the sites of resource creation and processing. An interesting decision is to cost lots of the technology and upgrades in resource tokens. You deliver felled trees to be processed into planks but then need those to be delivered to the workshop before you get lumber tokens to spend on better rolling stock (and all these locations are randomly populated based on the map seed). Almost everything is extended throughout the game so expect all of those locations to also be heavily upgraded (again, using a mix of token types) as you progress. But there are plenty more eras not in the game and the quest system is extremely light in what it offers you.

If you want to build train tracks and work a slowly deepening optimisation problem of moving resources around randomly generated locations then you're ready to go. But Mashinky right now is very clearly only showing us the hints of a potentially great game. It is exactly the type of game that has previously done very well being refined in public for a couple of years before hitting a 1.0 release. There are always going to be lots of quality of life ideas that a small community can quickly highlight. Right now I would really enjoy being able to disable production buildings as they build up to having lots of different production lines which all have different efficiencies and production output (especially with the current way around this being to destroy extensions if you really want to turn them off).

Right now a big scenario builder update is the next thing coming, which I can see the point of (vs the current random generation only maps), but I'm at the point where I'll probably wait a while before some major updates (like a new era or two) arrive before jumping back in. With 30 hours already logged on Steam, it has already been plenty of fun. By the time it leaves Early Access, it could be something to recommend to anyone who finds Factorio too daunting or violent.

Saturday, 20 January 2018

Why I'm Trying Rust in 2018

Last year, when considering a long overdue upgrade for my home desktop, I pondered the end of quad-core desktop dominance. Since then we've seen 8 hardware threads on mainstream "thin" laptop CPUs so even at 15 Watts (including the iGPU) you're not expecting everyone to only have two or four (possibly via SMT) threads. Intel are still charging to enable 2-way SMT on desktop but even there the mainstream is now solidly six threads, possibly 12 via SMT. AMD are running away with 12 hardware threads for pennies and 16 for not much more with a slight speed boost expected in April to eat into that single-threaded gap (while Intel are busy reacting to slightly bad news for their real world performance).

At this point, if we want to maximise the performance of our code (ok, which is not the sole focus), I think it goes beyond saying that a single-threaded process is typically not going to cut it. If we're statically slicing our workload into two to four blocks ("main loop here, audio subsystem and this on a second thread..." ) then we're also not building something that scales to the mainstream consumer hardware we will expect to be running on in the next few years. Even ignoring SMT (maybe our tasks leave very few unused execution units in each core so running two threads just adds overhead/reduces cache per thread) then we're going to have to start to expect six to eight cores that can all run fast enough to always be much better than running fewer cores faster (due to boost/TDP limited processor design - which doesn't even appear to be a factor on desktop). When thrown 32 hardware threads, we should be laughing with joy, not worried about having the single-threaded performance to run our code. We have to work under the assumption that basically everything we do has to be thread-safe and able to split into chunks all working on different cores. Yes, some tasks have to be worked on sequentially but in areas like game development we are juggling a lot of tasks and many of them are not so constrained, so we've got to adapt.

It's 2018 and when I think about some of the most successful threaded code I've written in recent years, it's mainly in Python. Yes, GIL-containing, dynamically-typed (static analysis nightmare) Python. It was never going to be the fastest but I had expressiveness and a great set of libraries behind me. I also have no doubt that a subtle defect is probably still sitting in that code which we never found. But if I was to rewrite it in C, those odds only go up to an almost absolute certainty. At this point, I'd say my ability to debug most defects is ok but, even assuming I catch everything, the time lost to that task is a significant percentage of my development budget. I started looking around for something that retained the system programming language power I expect from C (and knowing that I'd be doing FFI-binds into C ABIs) but with better tools to enable me to write threaded code I felt more confident about being correct.

Enter, stage left, Rust. A system programming language that's just about old enough to have gotten the first round of real-world testing out of the way and start to build an ecosystem while also having one feature you'll not find in most of the other multi-paradigm, high-performance languages: a borrow checker as part of the compiler. It has the expressiveness you'd expect from a modern high-level language eg Python or Scala, with enough bits of Functional or OO, but it has no time for handing out mutable references to memory like candy. The compiler requires you always consider how you interact with your memory, which I found very useful for doing threaded work, along with ensuring you've got no GC overheads (and only count references for memory where you really need it). Once I'd gotten my head around it, the constraints no longer felt onerous.

This is certainly not the only way of doing things, but Rust feels like it is just close enough to C-like for me to feel comfortable (and know what my code will most likely actually do) while offering almost everything I expect from the integration of various modern/functional features, all wrapped in low-overhead (often completely free at run-time) safety. You can still shoot yourself in the foot, but there's not a book of undefined behaviour you have to carefully avoid and which the compiler will often not warn you about. So I'm changing my traditional view of wait and see, 2018 will be a year where I explore a new language and iterate on projects while the tools are very much developing around it. Rust may not quite be here yet, but it's getting close enough that I can't see myself jumping into a large independent project in C and not regretting it in a year. I'm also currently between major contracts and probably looking to relocate so now is an ideal time to use a bit of that freedom to investigate new ideas. Even if it doesn't work out, operating with this ownership model will probably push how I think about (and aim for safety in) concurrent programming in the future.

How is the current state of play? They've got a (mostly) working Language Server for Visual Studio etc with advancing integration into some other IDEs (JetBrains stuff, vim). I've spend quite a lot of time in PyCharm recently so it feels natural to stick with that (using an early plugin that's developed enough to offer the standard niceties, which is handy for the type hints in a language that doesn't require many explicit type declarations). The installer is the library manager (kinda turbo pip) is the solution manager/build system (and installs optional tools so they can tightly integrate into the default workflow). If you've got the C runtime libraries (there is an option to build without ever calling into CRT but default is a standard library built on that) then you're basically ready to go.

The ecosystem makes a lot of stuff seamless. You add an external library by name (or git repo), the solution manager finds the latest version in the central repository, downloads it, builds it, and notes the version (so you don't get caught out by an update unless you ask for it to upgrade). Documentation auto-builds, examples in documentation automatically get included in the test suite, and there's just some light TOML config plus conventions on file locations to keep your solution managed. There's a default style and a decent source formatter (with customisation options) to enforce it if desired. Once you're up and running then VS Code's C/C++ debugger works fine (I've not had much luck debugging with JetBrains but this is the Community edition and CLion retail apparently is where you need to be) or try your favourite tools based on GDB or LLDB for support. Want to share your library code with the community? The library manager just needs your user key and will package it up to upload (so others can include it in their projects).

There is still work ongoing (a year ago the Language Server sounds like it was pretty iffy and even now it's flagged as preview for a reason) but there's enough working that you'll not be feeling like you're working with researchware. 2017 was the year of getting a lot of stuff basically there (the community went through and cleaned a lot of the important libraries to SemVer 1.0.0 releases). 2018 is a year for sanding off some more rough edges (adding a few convenience features to the language, cutting away verbosity that the compiler can reason around for most cases, polishing the development experience) and it sounds like 2019 will be the next time a major revision happens. I've got a few things I'd like to see (faster compilation times would be extremely valuable - I don't want to feel like I'm back in C++ land) but so far I've yet to find a deal-breaker and the potential is evident. Not sure I entirely agree with all these executables carrying stdlib code with them (static linking is the norm) - I've got 110MB made up of 14 binaries just for the Rust CLI package/build manager and I'm betting a lot of that is duplicated stdlib code they really could be calling from the dlls. Maybe this is the C coder talking but it feels like the compiler could be emitting smaller binaries in general, even ignoring static linking.

So far I've been getting used to the language, the tools, the ecosystem; building lots of smaller projects so I can see how things are done and what performance looks like compared to the same work done (idiomatically) in other languages. I'm expecting to move to Ryzen in April or May (based on availability, price, and if the revised parts are worth getting or just make the current parts even more affordable) so that'll be an interesting jump in performance potential. It's time to see what developing a large project feels like in Rust, it's time to start from...



Starting resources

The Official Documentation (includes links to all the books, a couple highlighted below)
The Rust Programming Language (2nd ed intro book - draft being finalised)
The Rust FFI Omnibus (detailed notes on ensuring you can call into your Rust code)
Cookin' with Rust (various common tasks using major bits of the ecosystem's libraries)
Rust by Example (what it says on the tin)
Rustlings (small exercises for getting used to writing Rust)
The Unstable Book (for documentation of what's not yet in the stable feature set)
The Rustonomicon (for those deeper questions about the language)

Sunday, 31 December 2017

Games of the Year 2017

Year six of our annual gaming celebration on this blog. At the end of last year I wanted to find time for a few games and The Witness certainly gave me two days of intense puzzle solving early in 2017. It seemed almost tailored to me (as if the black box in my head was used to decide the training set used to introduce the puzzles) with the only exception being the few puzzles that involved audio cues. Unfortunately I also think that's a major weakness as anyone who doesn't learn like me should not be surprised to feel completely alienated by that learning path (also there's not much deeper than the visuals and a few twists to enjoy beyond the puzzles). A lot of the rest of my missed games were enjoyable but I'm reasonably happy with my list from last year despite a few things slipping through the cracks. But it's 2017 and I already noted that this year has been incredible (something about years ending in seven and video games) so let's check out the few highlights I thought we had to talk about.


    Robots of the year:

NieR: Automata

As one of the few people with a copy of the original NieR on my shelf, this was always going to be the sort of game story I'm attracted to. But it's also found a far wider audience thanks to a reasonable budget, some polished combat mechanics, and word of mouth as everyone attempted to avoid spoiling the glimpse they got of a world seen through this prism of a story.

Games have (often through the focal point of various mechanics originated in RPGs) come to merge genres and offer experiences that are many things. Every open world game on this list does this to some extent. Stealth games now offer deep combat alternatives to restarting after being caught; immersive sims build around several ways of progressing. We are used to bending genre conventions and being offered several ways of playing games but rarely is it done like this - taking different styles of action (shooter) and moving the camera between them while retaining the same mechanics/rules.

This is one of those games that is both long and also much of the emotional payload is built around various reveals that are best not spoiled (unless you've played the last game, in which case you know some themes that are about to be revealed). Even all of the side stuff that's mainly adding texture to the world is best stumbled upon rather than knowing what's coming so anecdotes aren't really suitable. Suffice to say it's a story about sapient/sentient androids dealing with the deafening echoes of humanity and it's all scored with a great soundtrack to bring up the emotional tones.

The visuals are inconsistent, with some great particle effects and certain style/scale stuff mixed in with other rather uninspiring areas and dated/sparse assets. That's not helped by a PC port that didn't seem to optimise for all system configurations or offer meaningful options for lowering the impact of the most demanding settings. There are visuals to like here (while targeting 60fps on all platforms) but it's not something to play for the eye candy. The hype for this game points in the right direction: there's a lot of things to find in this world and you should look around for yourself.



    Open world of the year:

Horizon Zero Dawn

Seeing this game in action is enough to make sure you remember to check every white paper about the rendering engine. This is, on a technical level, a significant achievement out of the PS4 and something to study in terms of real-time rendering with just enough sub-pixel stability to push a soft 4K that doesn't look like an aliased compromise. On top of that technical achievement, it's also a great art direction and world that leverages the ability to render people, machines, and foliage with equal ease.

Aloy's travels (another great performance from Ashly Burch) through another post-apocalyptic world offer just enough pieces to keep you engaged with uncovering what happened long before and what the current state of play is. It's neither purely spelunking into the past or only concerned with the here and now - both parts offering a reason to keep exploring for answers. Combat is perfectly serviceable with upgrade trees and enough range of options to allow you to play how you want without ever becoming outstanding. Add in the standard open world affordances, including optional item maps to avoid cluttering the world until you wish to go hunting for the final missing pieces, and you've got a space you can get lost in without ever being forced to aimlessly trudge through. The only slight downer is the lack of vertical traversal options - this is very much the Uncharted/Tomb Raider style of limited predefined climbing paths, not even going as far as what you'd expect in an Assassin's Creed open world.


    Queer of the year:

Butterfly Soup

This coming-of-age visual novel revolves around queer girls and baseball. Its somewhat basic art style doesn't get in the way of the writing and that's what'll keep you hooked through the few hours of (seemingly pretty linear) story. Fun, light, and queer; this is more of that refreshing independent content finding ways to reach wide distribution in recent years.


    Good boys of the year:

Yakuza Zero

The Yakuza series continues what was started in the Shenmue series - building distinctly Japanese open worlds around small, compact areas and filling them with stories that mix the mundane with the explosive. Are you about to shift the balance of power between the great crime families or dropping into an arcade to play some era-appropriate classics between helping someone find a date? Here, you'll do both all wrapped around a decent brawler combat engine and several large skill trees (with stance changes to access each set). This prequel makes for a good starting point for the series (which Sega seem to be planning to update and re-release at least some of with the Kiwami subtitle) with the bright setting of Tokyo during the tail of the 1980s combining with two protagonists whose journey oscillates from heart-breaking to laugh-out-loud funny. Once again (in common with most of the Japanese games that made my list this year) the soundtrack here deftly brings energy to the proceedings and weight to the emotions.



    Puzzle machine of the year:

Opus Magnum

Zachtronics puzzles are about expressive play, designing machines around certain functional constraints and evolving your solutions as you figure out new structures to build into complete designs. There is not the answer to the puzzle, only a space of many possible solutions with various local maxima in the metrics of speed, costs, and area (which provides a gradient on which to refine designs beyond just "does it work"). The solutions you craft show your path there, from the basic patterns you prefer to the early design ideas leading to constraints that shape the final design you run. This is engineering catnip, a great sandbox of puzzles you can keep coming back to refine.

A sequel to 2011's SpaceChem, this game moves away from concurrency (SpaceChem used two threads/loops per processor, with added parallelism through several processors in most solutions) and towards a simple design problem of coordinating many swinging arms doing a similar job of connecting and separating various orbs (elements) from source compounds to form the product required; all programmed with a simple action bar. The narrative provides a suitable framework for ever more complex puzzles and gives a taste of a world and characters trapped in it.


    Nazi killer of the year:

Wolfenstein II: The New Colossus

The New Order brought character and an interesting mix of all-out (duel-wielding) shooting & stealth to the Wolfenstein series. It also showed that id tech 5 (designed for massive open spaces) did not lend itself to corridors and contained more than a couple of rather tall difficulty spikes.

Here, id tech 6 shows a massive step up (even if not quite at the same technical level as Doom last year) and replaying the last game immediately before on the same PC really showed how visuals jumped forward as well as performance. The drama sections and cut-scenes dripping with character return and a better upgrade system quickly allows you to lock up some armour penetration on your ranged rifle to ease through the harder enemies (this completely fixed any difficulty concerns I had playing on Hard, although some of that probably relies on being able to dial in headshots with whatever controller you're using - the only time I felt stuck was in the final boss fight, which I realised is actually optional). In The New Colossus there are far fewer points where I wished the shooting would finish so the story could continue and just as many points where I was hooked on where the story was going.

A great advertising campaign (world-building) led into a story that pulls relatively few punches for a mainstream title; this is the game about shooting Nazis we needed in 2017.


    Horror return of the year:

Resident Evil 7: Biohazard

This series had been on the decline for a while. Resident Evil 4 was the high point for a playable world of horror/action which didn't hate the player (at least with Wii controls allowing precision aiming in an era when not all games had the accuracy on dual-analogues of a Halo) while the immediate sequel provided less of a world but the first workable dual-analogue controls. Since then we've had a bad pure action sequel, several more spin-offs, and very little to recommend.

This first person reinvention of the series starts out really leaning back into the horror roots, while building a pretty new pocket of the universe to keep things fresh. Impressive as a return to form that doesn't just retread previous highs, Resident Evil 7 really shows why it's on this list when you put on a headset and play a AAA budget horror game in VR. Being trapped in a 360 degree immersive space to play horror games with great positional sound is something else, quite possibly too much for some. It's an experience you've not had before and hopefully a sign of more things to come.



    Spaceship of the year:

Prey

Prey is to System Shock as Dishonored is to Thief. That description alone is enough to attract at least a modest crowd who know exactly what to expect and will feast on another modern immersive sim.

To draw in the rest of the crowd, the opening area of Prey perfectly combines some tastes of what is to come with an opening reveal about how the story of deception will play out (as it must in a game built on discovering the backstory of areas and diving into notes and messages to understand what has happened and what there is left to do to shape what comes next). Going through a looped day with that great credit roll during a helicopter flight through a city skyline into being treated as an experiment, watching as a mimic hides in plain sight and things start to all go wrong, to finally uncovering the first secret that the flight was just part of a fancy "Looking Glass" virtual sound stage - the moments of horror, of feeling your only real option is often to hide, and being lied to: these roll through the first half of the game before turning to more of a power fantasy. If you want to see a AAA game set in a lavish traversable space station, infested by hidden creatures intent on destroying you, then this is a place you need to explore. I'm possibly going to side with Dishonored as the slightly better series at this point (and with low sales and leads leaving the studio, we may see far less AAA immersive sims in the next few years, including no sequel to this) but you should definitely check this out; the opening hours are available as a demo on all platforms.


    Hella queer of the year:

Life Is Strange: Before the Storm

Two years later, a new team with a new engine are going back to fill in the backstory of a game I still think back over as the best of the modern adventure game genre. Stripping the core gameplay mechanic out of a series (along with the protagonist) is actually a surprisingly bold move here, considering this is the obvious prequel story set up in the first game which fleshes out a character you never got a chance to meet and the primary love interest in that game. It also gives the chance to embrace the audience Life is Strange found and make the queer subtext into text.

This new team, with a new voice cast due to a strike by US workers during production (which has since been resolved), have managed to not fumble it (despite all these causes for concern). Here we get to play as a younger, less cocky, and more uncertain Chloe who is just falling for Rachel Amber. The performances don't quite hit the level achieved by the later episodes of the first season, nor is there quite as much to the writing, but there's just enough there that it'll draw in existing fans and give us what we crave. There is also a bonus episode releasing early next year to finish off this season but even just based on the main three episodes, this is worth it and we can finally stop relying on implied queer subtext.


    Burnt rubber of the year:

Gran Turismo Sport

GT Sport has issues. Even after patches, keeping your credits and xp from solo progression is locked behind an online requirement (almost keeping it off this list). The visuals are a bit of a step back from current PC sim/semi-sim offerings (it’s not bad and there are flashes of real attention to detail but a PS4 Pro is working from a significant disadvantage compared to a PC to feed a 4K screen). Collisions seem iffy at best and sound terrible. The assists seem less major performance penalties and more like obvious options to work with (playing on "Expert" with ABS dialled back to Weak, Traction Control is a dial you can set at any point during a race, and there is some Countersteering Assistance that also gets set to Weak on the top predefined tier - that last one being something you do really need to play on a controller rather than a wheel and equivalent to Forza's Normal Steering). Missing: any dynamic racing line with braking-/speed-colours so using the manual gears becomes an assist as it notes which gear you’ll probably want to drop down to for the next corner - which, along with cones on the track edge, give you just enough information to brake confidently your first time into a corner. The most major difference from Forza's model of how assists work: there is no rewind so you'll also be driving more conservatively because you can't afford to fluff a corner on the last lap. The bit that's not racing online is a decent selection of challenges but the actual career mode is a very threadbare offering that only just arrived via a patch. Add a limited section of vehicles (slowly being added via patches), no real upgrades (there are two dials, one for engine performance and one for weight that you can upgrade to push cars into different vehicle classes), and possibly a few less tracks than you'd really want (with no dynamic time or weather) and it sounds like a hard sell.

And yet, Sony got worried by the reception and quickly discounted this into the bargain bin and I got hooked. There are some smart choices like a reasonable daily distance goal (about 15 minutes of fast driving) which rewards a free random car and the challenges & missions have a decent range of demands with fixed vehicles (plus some freedom to pick your own car in a class in some events - it's a somewhat limited career mode inside the other modes) while also throwing out lots of car rewards. What really captured me was what I started to look at once I'd stopped obsessing over the triggers around each corner - tyre wear, fuel consumption (a dial you manage during the race, next to traction control), when to pit. These are all a million miles from Forza Motorsport 7's model of magic tyres that transform into wets once the rain starts and AIs that don't experience tyre wear even when it's set to Simulation. Even when you do decide to pay more attention to the triggers, the UI offers information that makes it easier to know what you need to do - rather than flat blue bars, GT paints the top of the white bar red when it's too much trigger (allowing you to learn what each vehicle demands).

I always thought I’d generally spend much of my 2017 slowly improving with rewind to let me race up until the edge of my skill/attention (while needing a clean lap to leaderboard and so actually compare); that I’d always be for the development of better reactive skills (eg ABS etc driving assists off, managing a changing track condition) rather than memory skills (eg no braking line). And yet I’ll jump into GT Sport for a bit every day or take on an endurance challenge. It's making me question most of what I thought I wanted out of a semi-sim package and even the basics of how they should control. When I played DriveClub it was the dynamic time and weather (plus mini-challenges) that kept each track fresh but here it is the tyres and fuel that perform a similar role in giving each race an arc. Once an accessible (ie works well on controller) semi-sim game does everything at once, that'll be truly exceptional.



    Halo of the year:

Destiny 2

As I mentioned a few moths ago, this was what I wanted from a new Halo game. There isn't an endless online experience waiting for you (unless you get deep into the middling online PvP - it's fun enough but you've seen it all before) but if you've got 20-30 hours then there's a good campaign and some less structured fun to be had (some with friends or even strangers) all the while slowly levelling up your gear and finding which weapons really speak to your play style (at which point you feed the drops you get into those to make them level up with you).

The visuals, freed of PS360 era ports, provide great vistas and lovely lighting over a range of locations onto which the missions and other corridor sections have been attached. The shooting feels precise and makes to move to mouse without feeling like you're playing something meant for sticks (something the old Halo ports never managed). I don't think this will stand up with some of the releases this year, something looked back on in a decade as why 2017 was amazing for games, but it's certainly the pinnacle of what Bungie have been building for the last 20 years.


    Ripped from the headlines:

Persona 5

This is, as has now becomes the expectation, an RPG that combines dungeon crawling with a significant teen social drama that drives you through an extensive cast and pantheon of villains. As always, the music selection is catchy and will worm its way into your brain, fused to the stylish presentation that permeates this game. Always a series that slowly releases significant iterations, this has again completely changed the style while retaining the premium (and not seen elsewhere) feel of the presentation. Rather than relying on a catchy level up chime that's been iterated in half a dozen sequels, Persona 5 creates a completely new tune that makes it feel unique and brands this game. It's the little touches that make each sequel in this series feel special and explain why it's been years since we last played new content.

The story of friendship here moves towards actual headlines shaping the various incidents you'll encounter as you level up and fuse your various personas. The adults have failed you, carceral solutions block any path forward, and now extreme actions are the only answer to provide any justice. Mechanically the ability to talk to and persuade enemies replaces games of chance in recruiting new personas, which is a welcome move back to Shin Megami Tensei. If you've seen any footage (something Atlus Japan have made harder by trying to ban users from recording and sharing footage of the game) then you've seen just how stylish every inch of the presentation is here, even if the game is clearly a PS3 port (as noted, a very slow release schedule) and could have really done with higher upscaling considering (especially on PS4 Pro, where there is no Pro Mode patch).


    Blast processing of the year:

Sonic Mania

Classic Sonic is back in 2017. The work of several fan-developers who provided various ROM hacks and engine rebuilds for classic 2D Sonic games, Sega handed over an official license and got behind a passion project, resulting in a great new game in the series. This is exactly the Sonic you remember from the early '90s, managing momentum through massive levels in which you could build up a stunning top speed, only now with boss fights that were never this good before. Visually it's an homage that does a few things those old games couldn't 25 years ago. Hopefully this will lead to a sequel that breaks away from remixed themes and builds a game out of entirely new worlds.


    Daddies of the year:

Dream Daddy: A Dad Dating Simulator

A visual novel about a dad dating a bunch of dads and his relationship with his teenage daughter. This fantasy world is just filled with joy and kindness, a welcome escape from reality into an alternative cul-de-sac populated with queer guys. Consistently well written, there are touches of reality mixed in with the fantastical but this very much feels like the sort of escapism you sometimes need, that rejects the idea that representation always has to be "gritty" to have value.




The games that didn't quite make the cut:

    Zelda: Breath of the Wild - It was Eventide Island when I realised this wasn't going to get onto my list (despite looking good for sweeping many publication's GotY awards). Playing some months after the buzz, I'd been looking for a new Morrowind (or even Far Cry 2) and found a world devoid of interesting writing or even much diverse use of the game systems outside of Shrines (which I'd already started to wear out after only scratching this massive world). But everyone spoke of Eventide as a really clever section you stumble onto and fall in love with so I'd avoided all spoilers or hunting for it. At some point, I'd just naturally arrive there... and 20 hours in, I did. No real narrative payload, not even an interesting visual flourish, and three incredibly stock challenges involving collecting metal balls later, I completed the island in about 25 minutes. I actually went and checked a walkthrough to make sure I'd not accidentally sequence-broken it and missed the good part everyone loved. I hadn't (although it seems many don't know that Hinox can be paraglided onto). This wasn't something new, this was yet more copy-paste problems I'd seen elsewhere in the game that didn't ask me to be inventive beyond the very surface veneer of novelty (here, taking away my disposable weapons and locking away my partially-upgraded clothing - but under that it has no more variety than an MMO "collect X of Y" quest).

On top of a story that seems decades out of date (with the worst kind of gender essentialism dripping from the moment to moment and bigger picture), BotW creates a massive world and then fails to find something to fill it with. There are 900 Korok Seed puzzles but actually there are about 9 puzzles which have been endlessly copied to locations on the map and which you'll need to stumble upon (and if you want to get round the inventory limitations then you better keep looking for them) as there's no way to get a map pulse or reveal (basic affordances figured out years ago). In another pair of examples, the Shrines seem to exist more as fast-travel nodes than because they had that many original ideas for puzzle rooms and the mount system is about as broken as you can make it - completely useless for the most part. You have to wonder, given how many open world games (MMO and offline) have refined mount systems to be low friction while not trivialising traversal, who decided to do it this way. Many of the systems presented here seem to similarly ignore where the genre design has gone in the last decades. The climbing traversal and carefully designed sight-lines are fun for the first dozen hours but there's little of substance under it and it's a great lesson in why something like inFamous (which also refined traversal, slowly allowing you to run anywhere by First Light) was smart to stick with 5-15 hour experiences. The potential is here but the praise feels like it will age as well as that for Super Mario Sunshine.

    Forza Motorsport 7 - I knew what I wanted this year from a driving game. An engine I'd already seen running wonderfully on Windows, masses of cars and circuits (new and returning), and a system of assists/difficulty that I'd slowly advanced through and was ready to push (with rewind always there to catch a slightly too aggressive corner attempt). Then it all started to fall apart.

Thanks to homologation, I’m almost never thinking about the fun of upgrading a car to a spec tier but rather am stuck with the precise list of parts that lock it to the specs (it seems far more common for there to the be one restrictor you have to apply than being a range of viable parts you can use to build the car to the requirements) and that’s it. That’s the car - one that’s often kinda broken from what it should be due to being restricted from the racing spec it would have in real life and competing with a load of other vehicles that... are kinda the same. There’s a bit of variety to it but really, in order to make all cars in a spec competitive, every car has to roughly be able to do corners at the same speed and hit the same top with similar acceleration (otherwise some cars would be vastly better than others and it would just depend on the track). Somehow I'm at the end of the year with several dozen hours in a game that just doesn't grip me like GT Sport does. It's a fine game, it's exactly what I thought I wanted, but I'd much rather be dealing with proper tyre wear, fuel richness dials, and pit stop strategy (even with a limited car roster) rather than finessing braking (without ABS) with infinite cars that all feel homologated into a blur.

    Night in the Woods - It just didn't quite grab me like it did many other people. Honourable mention but in a year with this many great games, this angsty tale couldn't get into my top tier.

    Tales of Berseria - The sixteenth main Tales game and yet this feels like a reinvigorated series that has stories left to tell. Unfortunately this year has just had so many amazing and huge games (plenty of which didn't make the list) that I've not had enough time to play this enough to put it on the big list. It's definitely got character from what I've played of it and most years I'd expect I'd have had more time to give to it.

    Torment: Tides of Numenera - Speaking of not having time for RPGs, who would have thought that the spiritual successor to Planescape: Torment would be released and I wouldn't be able to find time to play more than the start of it. The 2D style revitalised in Pillars of Eternity is back but it'll have to wait until I find time in 2018.

    Atelier Firis - Wow, and the curse of 2017 strikes again. Now the Atelier series have eased off the time constraints, they feel a lot more fun to play as light RPGs with a lot of heart. Hopefully I'll get to explore it more fully in 2018.

    Gravity Rush 2 - Here's one that I really should have found time for earlier in the year and just kept on being pushed back. It's here because I really need to find time for it in 2018; speaking of...


    The 2017 games that I really need to find time to start playing in 2018:
Assassin's Creed: Origins, Dishonored: Death of the Outsider, Hellblade: Senua's Sacrifice, What Remains of Edith Finch, Uncharted: The Lost Legacy, Divinity: Original Sin II, The Evil Within 2, >observer_, Pyre, & Mario + Rabbids Kingdom Battle. Ye, it's been a year and a half!

Wednesday, 15 November 2017

Tabs vs Spaces is the Wrong Question

We've all been there, let's agree upon a style guide/rules for this source code so we can all work on it without anything falling apart via an inconsistent mess or the commit logs being endless back and forth over style changes. From the most basic (CR+LF or LF - because no one wants that flipping back and forward in a document's commits as people work on it from various systems) to K&R vs 1TBS vs Allman etc braces. If we can find agreement on indent styles, can we also find agreement on spaces (2? 4? 3?) vs tabs?

The problem is, this asks the wrong questions. Why does my view of this source code need to be the same as yours? Why is our version control system working so hard to force us to all agree on the most minute of details (even totally invisible ones like line breaks)? I'd always said tabs was the right answer to indentation because that way the user can set their own indentation length without changing the underlying text but this is not actually the answer. The answer is that we shouldn't be sharing source code as (pure, versioned char by char) text in the first place. We should look at what this source code actually looks like to the machine, the underlying meaning onto which we insert some decoration (comments that we should preserve at their attachment point in the source code): the AST.

Maybe I spent a year or two too many in the metaprogramming/code analysis/compiler dev space recently but this seems like not only the obvious solution (only held back by lack of inertia) but also something where everyone wins. We standardise a bit, because you'll no longer be messing around with fixed-width spacing to align notes and will have to get better at both self-documenting code and writing meaningful contained comments, and we allow the actual sharing of our source code to compare via ASTs. From there the actual storage medium can still be text documents (or some AST intermediate format) but before anyone views stuff then it goes through their own pretty printer. Whatever style guide you want to make to most clear what the code does, you apply that and that's what you see and edit (with your own settings keeping your style consistent). When you share it again then it gets turned back into the AST view and so only the actual changes are committed (to be shared back to everyone else).

Do you find K&R braces so much easier to parse? Then that's what you set your pretty printer to generate for your local copy. There's no reason why we should all be forced to view the same text document representation of source code. We all have different views on the various choices of formatting and which errors it makes easier or harder to spot. We all have different susceptibilities to inserting those defects. We should all find the best way to view source code to reduce our chances of making mistakes when writing our source code. We can start this today. Rather than spending time in meetings and maintaining or teaching the house style guide, spend the time writing tools to make your sharing layer style agnostic. Just start out by always pretty printing the code before commit into a common style and pretty printing changed documents with the user's preferred style after a pull. If you have someone on the team who tinkers with LLVM/Clang then you've probably already got the expertise to make those tools (even if you can't find something suitable that's already out there which can do what we need in reformatting for your programming language). If this idea gains traction, this is something that should be extended into the basic functionality of VCSs.

Once tools start to support this we can look at moving the VCSs to never needing the text version, just storing an AST representation. Also your commit system now automatically includes static code analysis options as you're parsing this text into an AST - no excuse for allowing commits that your compiler will choke on.

We can move into more deeply integrating this new freedom. While I may like mixedCase names/ids, another person may prefer snake_case and why do we need a common naming convention when actually we're just using different ways of compounding a list of words (the actual unique identifier). We can store them as lists of words tied to each name and pretty print then into the actual source code to suit your preference. As long as we're not tripping over any language restrictions then that should be totally fine. We don't need to fight over so much in these style guides, the compiler certainly doesn't care.

Edit: with thanks for links to projects already working to provide the tools to do exactly this: SwiftFormat & Esprima's Source Rewrite demo. I'll add that my own source rewriting tools were always built on PyCParser (which is a lot easier to throw something together with than using the transformation stuff in LLVM/Clang but also only for C99 unless you write your own grammar). I see Clang now has a mature ClangFormat tool so C/C++/Obj-C code doesn't need to poke around in the guts of (potentially moving) Clang APIs for formatting. I see that's already getting some thumbs up (with the same desire to one day fix all this via ASTs).

Also very good to hear of development teams who are already doing exactly what I've suggested above (with rewriting to a house style on commit & option to custom pretty print on pull).

Tuesday, 31 October 2017

Guild Wars 1: Halo Edition

I thought I was going to write about Forza again this month. New game, it was the first time back on the circuit-driving stuff for me for some time so all of those new tracks & cars would be fresh (and lovingly rendered in 4K HDR with the arrival of the Motorsport series on Windows). The series had finally caught up with the competition (dynamic conditions etc) and this has always been the best semi-sim racing to be had with a controller.


It was not to be. The actual racing still got me where it needed to be. Start out with assists off (baring a braking point so I don't need to memorise tracks), cockpit cam; overtake the pack for a few laps of racing then go into driving mode and chase that top clean lap for the leaderboards at the end. But I'd decided to play around with longer races in the career (nice option) and beyond the LoD system seeming to remove all the LoD levels at once (possibly now patched), the game's stability simply wasn't there. There are no in-race checkpoints that save your progress so if you select a three hour race (as the long version of the very first endurance race in the career is) and the game crashes after two hours then you have to start again. I asked myself, "what if it crashes again?" and realised I don't know if I want that groundhog experience. Guess I'm waiting for them to nail down a proper release (still no Forzathon events, an auction house, or leagues) that works 100% of the time or add in mid-race save points for endurance races.


What have I been doing instead? Catching up on some backlog stuff and then jumping into that Destiny 2 PC release. I'd generally not been that bothered by the release of the first game, especially with the crashlanding of the launch version they originally scraped together from their cancelled initial vision. Basically the idea of a Halo game without even the framework of a low-budget SciFi story to keep it all going forward sounded like something I'd find ok but not remarkable (and the bits of it I did play confirmed that it wasn't quite sticky enough for me to keep going with that gameplay loop around shooting the packs of enemies).

What changed? I guess I finally had a break from playing Halo games (Halo 4 was fine but maybe I'm done until they find something new to engage me with and Halo 5 was not that) which gave me time to look forward to more of that sort of SciFi shooting. I also found something in the RPG loop of The Division that scratched an itch I wasn't convinced you could scratch well (with years of FPS RPGs showing that anything but the actual shooting or gun collecting was where the real game was - the point of classic Deus Ex is not to constantly find the guns fun to shoot with, they're where you go when a plan is unravelling).

So Destiny 2 is a shooter based around being part of a class of people who are special but during the plot it turns out that actually you are the one true extremely special person (or person in a robot body? some of the world details are really not explained if you didn't dig into the website descriptions provided with the first game) and so get to do a load of heroic missions where everyone speaks in your ear to say what a good person you are for being good at shooting and literally unable to die. Except for the bits where you're not allowed to die and you get checkpointed back to the last save point. It's very Halo possibly by way of Bioshock's Vita-Chambers. But it tells a basic complete story which is accompanied by a load of good skyboxes and enough dialogue to keep you bouncing along that ten hours of main narrative. If you have played AAA solo FPSs, you know roughly what to expect.


There is also, in an almost Guild Wars 1 style move to bring a story to an online setting, lots of side missions (many co-op, others solo) and hidden treasure in the four large open areas that much of the story campaign is built around. There's probably another ten hours of narrative there (moving away from cut-scenes into purely audio and scenarios - some repurposing the mission areas with new enemies and set dressing) and a lot of it doesn't really get pointed out while you play the main campaign story (beyond being map icons to run past).

The story is for pushing players from level 1 to 20 which ties into a gear (power) level of 10 to 200. After which the gear goes to around 300 but you'll have finished the main campaign so it's an ideal time to do all the other side missions. I ended up at around 275 after enjoying those additional stories and hunting for some hidden caches in each open area. I even bumped into some other players and did some of the co-op encounters (not story but just a scenario that plays out against waves of enemies and some props that you have to destroy to capture within the time limit of the public event) while I was moving between locations. It's all very as expected for an online game like this without making it a game you need to constantly group up to enjoy. They put a full Halo in there, even if they did make it so basically better gear stops really dropping at 265 in order to make there a tier left for people who want to group up and do "end-level" activities (some PvP and PvE content, including a single raid, for which there is a bit of story setting it up in the game but not that much - they did kill the big bad at the end of the story so you can't fight them here).

One of the weirder things is that The Division (and what I understand from Destiny 1) built guns from random perks and archetypes/names with a bit of variety to give it that Diablo dice roll for exactly what you get. Here, a gun has a name and a power level; that's enough to completely define it. From there you get to equip your own paint skin, mod (a gem system for attaching a small extra stat to a single slot), and pick from what that weapon type has in terms of options. But you're not rolling a "Gun X with Red Dot 3" - all Gun Xs either have the option (ready to be enabled) to equip Red Dot 3 or they don't. A few guns have no options at all and many it's just a choice of short or medium scope (which changes the effective range far more critically than changing the actual optics of the weapon - if you're outside of the effective range then it doesn't matter if you always hit the weak point, you'll be doing next to no damage).

It's a fun game for the moment to moment and there's just enough variety in there to give you enough to get a strong preference for certain play styles and so weapons that enable that (eg by the end I had decided that I always wanted range for my kinetic slot and leave the 3-shot pulse rifles at home because I'll always take a scout rifle for the DMR-style experience). If you're looking for a slightly more evolved combat than just replaying a Halo game, Destiny 2 isn't a bad option.