Hacker News new | past | comments | ask | show | jobs | submit login
A trip down the League of Legends graphics pipeline (riotgames.com)
261 points by adamnemecek on Jan 19, 2017 | hide | past | favorite | 111 comments



Several years ago, if I had to choose a video game company where I would loved to work as a software developer, it would have been Blizzard Entertainment.

Now, it would definitely be Riot Games.

As player, spectator and developper, I'm so impressed by their work, the evolution of their game since the release in 2009, how they listen their community [1], try new things and, most of the time, admit their mistakes (e.g. removing the ranked solo queue in 2016) and rollback [2] or improve their changes when it's needed.

Their game is the most played game ever. ~100 millions active players every month [3].

Their game is also the most watched game ever. ~40 millions unique viewers for the finals of the last World Cup in September [4]. Hundreds of thousands of viewers on Twitch every day (without even counting the Asian region). They have revolutionized the "e-sport" in Occident. I don't play anymore (for now) but I'm still watching most of the professional games because they created an accessible, passionate and entertaining game to watch (for those interested, the new season just started in Korea, China and Europe, and tomorrow in North America [5]).

Really inspiring. Congratz Riot Games.

[1] https://www.reddit.com/r/leagueoflegends

[2] http://na.leagueoflegends.com/en/news/game-updates/competiti...

[3] http://www.riftherald.com/2016/9/13/12865314/monthly-lol-pla...

[4] http://www.espn.com/esports/story/_/id/18221739/2016-league-...

[5] http://www.lolesports.com/en_US


You might want to reconsider blizzard...overwatch is doing extremely well and has not been out for very long.

Just for off the cuff figures, the LoL subreddit has 942k subs, and overwatch has 743k subs. Overwatch is very promising


True, Overwatch is amazing, as is Blizzard. However, I caution against using subreddits as a general sense of popularity. Subreddits are a fraction of a fraction of these games playerbase (LoL and Overwatch included) and tend to largely be North American English speakers. In the case of LoL, there is a huge Chinese and Korean playerbase that is simply absent from that forum.


I'd say the same thing about twitch and esports in general. lol seems to be the premiere esport game, but I feel like other developers do a much better job catering to different types of fans- namely more casual players (Blizzard definitely falling into that category).

Riot feels less like a game developer and more like a sporting league (ala the NFL) Do they even have any other games planned?


Also Overwatch has some of best art direction/aesthetic quality of any game I've ever seen. League is my goto example of art direction failure.


I couldn't disagree more - the visuals in Overwatch are in fact the main reason I left it after the open beta.

Overwatch is very pretty (both games are in my opinion), however it is so busy. There are no visual cues in the design - characters and scenery share the same palette, important elements (like payloads, turrets, etc) don't stand out. No way of knowing where the important flow points are other than to play the game a lot (no indication of where the playload will go). Having had such a great example in TF2 that did all this so well it was just sad trying to get to grips with Overwatch.

League of Legends on the other hand had an amazing visual update a year or two ago and they explicitly addressed all these kind of issues. Making sure the map doesn't distract from the important in game information.

Both games have a lot of characters and a lot of knowledge burden for the players, so anything they can pull off the player makes a big difference when first starting.


>There are no visual cues in the design - characters and scenery share the same palette, important elements (like payloads, turrets, etc) don't stand out.

All key characters/items have a unique silhouette which makes it easy to pick out at a glance

>(no indication of where the playload will go).

There's a giant colorful line on the ground that denotes the path the payload will take

Not saying you have to like the game (It seems like it's not for you).


Silhouettes are a good start, but take these two images as an example:

http://gameplaying.info/wp-content/uploads/2016/05/overwatch... From this image I have no idea who is on what side in this battle. The sniper blends into her spot as she is a similar colour scheme to the metal work. Where will the car move next if it is being escorted? There is so much going on it takes a lot of knowledge to understand what is happening.

http://i.imgur.com/l3pCIgk.jpg Here on the other hand it is obvious what team everyone is part of. All character pop out as they are very different to the background (colour and shape wise). The track shows where the payload is going and where it will roll back.

TF2 has great visual clarity, it gives you information clearly without having to explain it to you. Obviously for many the lack of visual clarity in Overwatch is not a problem - which is fine, but Blizzard made a choice which is not without cost.

As for the a payload line, it definitely wasn't there in beta, it's possible they've added one, but this video from a few weeks ago suggests they have not. https://www.youtube.com/watch?v=CiAitNchwYM


That's either an old screenshot or they've disabled some features. The stock game has a red outline around all enemy characters and red names over their heads: https://vice-images.vice.com/images/content-images/2016/09/0...


The outline certainly helps with team identification. I don't play Overwatch so it is certainly possible things have improved a lot, but from the video I linked before I think it still looks very noisy to my eye.


That's funny - I play Overwatch and never have played TF2 and I can tell at a glance what's happening in the first image and have trouble distinguishing much of anything in the second (the path of the pyload is at least clear).


I think the visuals are perfect and can't relate to a single thing you write.


For a more modern game, yeah, but StarCraft 1 is just in a league of its own, specifically vanilla (the Valkyrie and devourer feel a little off-key, along with some of the BW textures). The feel of every unit, texture, and doodad and even the sound design in vanilla is just perfect.


> ... even the sound design in vanilla is just perfect

The sound of the tank when it switches to siege mode is one of the best and most satisfying sounds I have ever heard in my life.


Good old HISS-KACHOOSH.


Blizzard = equal part casual and competitive. Works for neither. Hearth Stone, Heroes of the Storm , Overwatch. All extremely boring to watch, but HS takes a bit to understand the RNG > Tactics of that game and grow tired of the unbelievable happening for and against.


Pretty boring imo. I prefer watching TF2 even though it has much fewer viewers. It's not a fair comparison, I know. The TF2 comp community has been active for almost a decade now. I'm hopeful that OW will improve in the future.

Regarding OW, a lot of what made TF2 attractive has been scrapped in the name of making the game "accessible" to casual players. That's fine of course, but it unfortunately makes the game less fun to watch at a high level. For example, there is almost zero skill required for advanced map traversal (save for Lucio). In TF2 on the other hand, rocket jumping and sticky jumping are non-trivial, and are critical for map dominance. Another thing I find weird is character caps. The goal (in theory) was to ensure that there was variety int the meta, but it doesn't look like it's working tbh. It also shows that Blizzard doesn't really trust the comp community to independently minmax strategies for team comp.

Let's not even start talking about the collectible system. TF2 does this masterfully through the trading and crafting systems. I can get every single item in the game without spending a cent, including cosmetics - without relying on RNG of course. Blizzard on the other hand is in it for the $$$. Have you ever heard of a card game where you can't trade cards? An absolute joke!

But Blizzard is doing quite a few things damn well. Most prominently, their approach to openly communicating changes and stuff that's in progress is very refreshing imo. I hope other devs learn from this approach.


I wouldn't call overwatch boring to watch


Has it not dropped off in number on Twitch?


It seems more like there was an unusual spike that wore off quickly [1]. Still, an order of magnitude fewer viewers than LoL [2].

[1] http://sullygnome.com/temp/bd061c88-c4f9-4f70-9231-a5089bbd7...

[2] http://sullygnome.com/temp/d49580c6-7a16-4601-915b-df42bc752...


I find Starcraft2 fun to watch but it's not like I hang out on twitch to watch each day. Usually if a tourney lines up with a weekend where I can stay up until 3am is where I indulge :)

Dwindling twitch numbers doesn't always mean a game isn't fun to watch.


> All extremely boring to watch

What? I've watched Hearthstone and Overwatch on Twitch several hours a day since launch and I will probably never be bored. They are by far the best streaming games out there IMO.


In fairness Hearthstone was never meant to be competitive and I wish Blizzard would just have a separate "competitive" bracket where they ban all the RNG cards. Trying to make a game that fills both niches of casual rng-based play and competitive tournaments leads to a less good product.


If you don't HS because of RNG, try DireWolf games, namely Eternal.


Overwatch seems like it shipped with servere networking issues that were plastered over by lowering the rate the server ran game simulations at. The nature of the issue and the way the lead was kind of buried until they had a fix months later (they hardly ever mentioned the setting that masked it until then) make me curious if that was nearly a showstopper for them, or more of a stretch goal for them.


AFAIK the server has always run at the same rate, and the update was just to how often the server sent new data to clients — it would receive client updates and run the game very frequently, but only send updates every 47 ms or so. I feel like rather than being some critical issue they were trying to bury, it's more likely they just didn't initially think updating client state for every single frame was necessary, or at least not high-priority.


The details buried at the bottom of patch notes pointed to there being severe bugs with the higher rate from clients going out of sync to abilities not working (it was under the "high bandwidth" option in patch notes)


That wasn't their first, either. Were you there for release day of vanilla D3? Millions bought it at midnight only to stay offline for a couple days.


Here is interview with Overwatch SEs: https://www.youtube.com/watch?v=vTH2ZPgYujQ


Valve is pretty cool. Both their products and their internal policies.

And regarding Riot, their marketing is (was?) really shady.


> And regarding Riot, their marketing is (was?) really shady.

If you're going to throw shade like this it'd be helpful to bring some examples, I have no idea what you're referring to so this contributes nothing to my understanding other than FUD.


I'm a long time Dota player, I started playing in 2005. Pendragon, one of the original Riot employees (maybe co-founder? can't really remember), owned the official Dota site, dota-allstars.com.

Not long after launching LoL, Pendragon replaced the whole site, including: hero page descriptions, various Dota related web-tools, forum, etc., with a JPEG link thanking the Dota community for all the fish and pointing everyone to the LoL site.

He released the forum database available 5 years later, I think, when it didn't matter anymore.

The LoL advertising during the early period was extremely Dota-hostile. Dota 1 had its flaws, but they were basically pissing all over it.

Tournaments where LoL was played were paid to ban any kind of LoL competitors (generally aimed directly at Dota 2).

Etc., etc.


As one of the people who lived through/was affected by this, I can't ever in good faith support or work for Riot because I just can't shake the "this is the kind of person I would never want to work with" feeling Pendragon earned himself. Since he's one of the primary founders, that feeling is inextricably emotionally tangled up with how I feel about the company as a whole.

Here's a video that goes in depth if y'all are wondering what this is about: https://www.youtube.com/watch?v=JBI9NlPqRi0

Thankfully it doesn't matter anyway, because Dota 2 is simply a better game ;)


ALL LIES - Pendragon replaced the whole site.

https://web.archive.org/web/20100712013033/http://www.dota-a...

The wayback machine is great. I heard these rummors years ago and they never stop. Look up the site from whatever date you want. Mescon closed allstars.com on July 22, 2010 citing dropping statistics and his love of League of Legends. https://en.wikipedia.org/wiki/Defense_of_the_Ancients

DoTA -Allstars is a variant of DoTA and had been passed down from one person to the next in development and is stil developed by IceFrog at Valve.


Dude, you even have the guts to use caps. I was there, I had an account with basically the same name (http://da-archive.com/index.php?showuser=725213). Then one day my account went poof, with not much notice. Not a problem for a free service, but a lot of people volunteered to get the forum database and migrate it.

Guess what... he released it when LoL was entrenched, a few years later. That's how you can see my profile, on a tribute site where someone imported the database dump.

But at that point the community had already left and the valuable Dota web property was used to ramp up LoL. LoL would have made it without it, but these tactics where shady.


Blizzard Shut eventually shut down the website. It was actually there in the way back machine and then Riot bought the website then sold it to Blizzard. Blizzard then shut down the website.


Not lies the thing he took down is the forum. https://www.reddit.com/r/DOTA/comments/12zjm6/access_to_the_...


So the forum went down but not the website. AND the website didn't redirect to League of Legends and it is actually the wrong name?

Altered Truths?


Minor correction: DotA-Allstars is no longer actively maintained, as of a few Dota 2 patches ago.

http://dota2.gamepedia.com/Game_Versions


How they listen to their community? It took literally years for a sandbox mode and replays to be implemented, both of which the community carried on about for ages. For a game that wants to grow in professional competitive circles, those features are pretty damn fundamental and it blows my mind that they took this long to exist.

I'd also argue that they're not too keen to try new things, given that even the devs themselves intentionally pigeonhole champions into a strict set of roles [1], something that has resulted in a relatively stale meta (another frequent complaint about the game from some circles). In their defence, this sort of locked-down style of meta evidently works for a large number of players, so I understand why they don't rock the boat on that regard.

[1]: http://na.leagueoflegends.com/en/news/game-updates/gameplay/...


Dota has always been much more interesting to me. It's like a sandbox full of overpowered stuff that they leave for the community to figure out how to best exploit. And lol is like yep this patch you will use these champions and you will play them in this manner. And if you don't you will be punished heavily by other players for not playing "correctly".


I say it without any understatement that Icefrog is probably the best game-balancing developer ever.


Riot try hard to be the new Blizzard but it won't work, they have just one game which is very popular but it's nothing compare to Starcraft / Warcraft universe in term of quality. I really don't like MOBA ( HoTS included ) it's the type of game that killed RTS / MMO.


Are you aware that Riot Games is wholly owned by Tencent? Not disagreeing with you but they're part of a much bigger picture. Tencent even owns 12% or something of Blizzard.


> Riot try hard to be the new Blizzard

In what way?


I'm not so sure. They've banned players for not playing the game how they've decided that you need to play the game.


Is Riot still using an Adobe Air client as a launcher for League of Legends?


They have a new client that doesn't used Adobe Air anymore.

When asked what technologies they use in the new client:

"HTML/JS/CSS for the UI, C++ for the core functionality. We're planning on publishing a deep dive blog on this during alpha, so make sure to keep your eyes out for it!" [1]

edit: "ggregoire" posted a better answer below [2].

[1] http://na.leagueoflegends.com/na/site/2016-season-update/cli... (See the comment posted by Riot employee "CapnBranFlakes")

[2] https://news.ycombinator.com/reply?id=13438077


They have written and released a new client at the end of 2016. They use HTML, JavaScript and C++.

More info: https://engineering.riotgames.com/news/architecture-league-c...


I don't think so. They just released a new client (might still be in beta, I have not logged in for months).


I don't think there is even a comparison between Riot/LoL vs. Valve/Dota2 when it comes to esports prize pools (Dota2 3x's LoL?)... Blizz is throwing a lot of money around too but it feels desperate.

Perhaps the deficit demonstrates Riot's skill in maintaining their community?


Re, the community:

Early on riot was horrible at community management. They fired Bobaganoosh, eliminated all RP aspects of League by cutting out descriptions, stories, and the JoJ! A lot of people started to flee, and when Riot realized it, they promoted Nikita from intern to the posterchild female that gamer guys oogled. Around that time, before I quit playing I angrily sent an email how Riot was killing their community and needed to do some sort of "Summoner Highlight" segment to promote their fans that care. Nikasaur picked up on that idea or already had it and started showcasing summoners, which was cool.

I'm glad they've moved on and up from that. Jax dodge best dodge.


This Moba and TowerDefence genres that started as maps and mods of RTS games (Age of Empire 1/2 and WarCraft3).

I personally find this grinding gameplay style boring. Like Farmville or playing at a casino or lottery. Pointless and boring repetitive. I prefer real games.

Sadly, triple-A RTS games are no more, no new release for 10 years (beside SC2, which I dislike). Halo Wars 1 and C&C4 marked the end, and the low point of RTS by causualisation to fit the consoles. Whereas modern games like Watch Dogs 2 on consoles have a more complex control schema and RTS elements with it's drone and hacking.

One day I want a new AoE and C&C with modern graphics as PC first triple-A game.


You're essentially arguing nothing more than personal preference; I don't think this holds much weight beyond that. You could essentially make the exact same statements about chess. "Every game starts exactly the same, the pieces never vary (without modding), and there hasn't been a new release for centuries. Yawn." Not everyone likes chess either, granted, but it's hard to deny that the variations that can arise from a simple set of rules can continue to compelling experiences for players.


Your line of reasoning makes zero sense. In a single comment you manage to claim MOBA type games are "Pointless and boring repetitive." but then celebrate RTS-style games which have similar mechanics to MOBAs.

> I prefer real games.

FWIW MOBA's and TD style games are real games.


To each his own. I find DOTA (a MOBA) extremely entertaining. Far from repetitive. There are so many heroes with so many different dynamics that can arise from one game to the next.

I don't really consider it a grind at all. MMPORGs are where the true grinding occurs.


Dawn of War: Warhammer, Age of Wonders 3, Paradox games, Civilization...

It may not be quite like it used to, but strategy as a broader genre is still going strong.


Homeworld: Deserts of Kharak also came out in 2016 and was a great RTS.


TBH blz neglects war3 because they are riding the wow cash cow.

War3 has always had a healthy community. In China war3 community was the pincle of any gaming community in history.

Blz stops releasing balancing patch after 1.23, not sure exactly. Then the games all become identical. The players dwindles. Most go to war3 DotA. Even then blz had a chance to capture the next big thing in their ecosystem. They neglected it.

War3 has been a total disappointment for me personally. War3 game is way more entertaining imho. Blz really advanced the state of art of RTS by mixing traditional RTS with RPG elements (I bet it's not blz invented). The graphics shows a good presentation appealing to showing to large crowd.

Sadly they squandered the golden opportunity...


What do you mean 'real games'? Mobas have far less in common with Farmville or casinos than MMOs; did you mean to bash those?


Few things consistently blow my mind as insane graphics demos

https://www.shadertoy.com/view/4dfGzS (or basically anything on that site)

How is that 400 lines of code.

Or this one which even generates the sound on the GPU

https://www.shadertoy.com/view/4ts3z2

With the wide adoption of WebGL, it's a good time to get involved in graphics. Furthermore, GPUs are taking over esp. with the advent of machine learning (nvidia stock grew ~3x, amd ~5x last year). The stuff nvidia has been recently doing is kinda crazy. I wouldn't be surprised if in 15 years, instead of AWS, we are using geforce cloud or smth, just because nvidia will have an easier time building a cloud offering than amazon will have building a gpu.

These are some good resources to get started with graphics/games

# WebGL Programming Guide: Interactive 3D Graphics Programming with WebGL

https://www.amazon.com/WebGL-Programming-Guide-Interactive-G...

Historically, C++ has definitely been THE language for doing graphics but if you are starting these these, you would have to have really compelling reasons to start with C++ and not JavaScript and WebGL. And that's coming from someone who actually likes C++ and used to write it professionally.

# Book of Shaders

https://thebookofshaders.com/

# Game Programming Patterns

http://gameprogrammingpatterns.com/contents.html

https://www.amazon.com/Game-Programming-Patterns-Robert-Nyst...

HN's own @munificent wrote a book discussing the most important design patterns in game design. Good book applicable beyond games.

# Game engine architecture

https://www.amazon.com/Engine-Architecture-Second-Jason-Greg...

# Computer graphics: Principles and Practice

https://www.amazon.com/Computer-Graphics-Principles-Practice...

This is more of college textbook if you'd prefer that but the WebGL one is more accessible and less dry.

# Physically Based Rendering & Real-Time Rendering

These discuss some state of the art techniques in computer graphics. I'm not going to claim to have really read them but from what I've seen they are very solid.

https://www.amazon.com/Computer-Graphics-Principles-Practice...

https://www.amazon.com/Physically-Based-Rendering-Third-Impl...


Pardon me asking, Is there a way to save comments for later? This is gold, and thank you for the resources. I have been very interested in graphics since I took Computer Graphics in College (It felt like an applied linear algebra course, but I loved it. It was subsequently the only course I felt like I was challenged beyond my abilities -- I had to take the course twice to get the credit, but I loved that class)

Also just kind of asking for curiosity, do you think a language like go or rust will become popular for developing game engines? I realize game programmers are anti-GC but what if GC technology advances that the performance drop is negligible I wonder.


Lol, I'm flattered that you think it's worthy of saving. If you upvote it will show up in your profile in upvoted comments. Also, if you click on the date in the header of the comment, a favorite button should appear. When you favorite a comment it will show up in your profile in favorite comments.

> Also just kind of asking for curiosity, do you think a language like go or rust will become popular for developing game engines? I realize game programmers are anti-GC but what if GC technology advances that the performance drop is negligible I wonder.

I think it will but on some level, the needs of a game engine are different from the needs of say a DNS server. Jonathan Blow, the developer behind Braid (http://braid-game.com/) and Witness (http://store.steampowered.com/app/210970/) has been working on a language called Jai https://github.com/BSVino/JaiPrimer/blob/master/JaiPrimer.md even though he's aware of Rust and Go. He talks about some of his reasons in this video https://www.youtube.com/watch?v=TH9VCN6UkyQ

One of the things he mentions is that the game industry doesn't care about security that much (which I didn't realize until then but it makes sense) compared with a DNS server or something so his ideal language might have different design considerations than Rust.


> Is there a way to save comments for later?

Click on its timestamp to go to its page, then click 'favorite'. Favorite stories and comments are visible from your profile page. Note that these are public, so users can browse each others' favorites.


> do you think a language like go or rust will become popular for developing game engines?

That depends on the type of engine :)

Many games will be perfectly fine in a GC language. (People do write JS games all the time :). But as you approach the limits o

f a devices performance, GC has an overhead that is visible.

You can work around it - there are patterns that essentially work around the collector by recycling objects - but it's quite a bit of engineering effort, and it's a very different style.

But the big issue in GC'ed environments is that you give up control over heap growth. Working with fixed memory budgets becomes a very difficult thing to achieve. And there are few things game developers hate more than unpredictability :)

If you want to look at ongoing efforts, Amethyst is trying in Rust: https://github.com/amethyst/amethyst


Tap the time (x mins/hours ago) of the comment you want to favourite. That should take you to a page where you can favourite it


> Is there a way to save comments for later?

I usually just upvote. You can view your list of upvoted posts/comments in your profile page.


That first shader is sampling from three textures, so the image is not entirely generated by an algorithm - see iChannel0, iChannel1 and iChannel2 at the bottom of the page. (With iChannel3 being the music.)

The shaders on ShaderToy aren't quite the same as straight OpenGL fragment shaders - there is quite a bit of boilerplate code built into the site that allows ShaderToy shaders to have access to stuff like mouse coordinates and audio signal info. (Expand the 'Shader inputs' area above the code block - none of those are available in OpenGL.)

But OpenGL also has its own library[1] of functions: `texture2D`, `smoothstep`, `mix` and all the built-in vector math - and you can see all of these in action in the shader you linked. The ShaderToy boilerplate - in partnership with these libraries - is the reason the code is so concise.

[1] http://www.shaderific.com/glsl-functions/


You are right, I didn't pick the best example. But I believe everything is procedurally generated on the GPU in this demo https://www.youtube.com/watch?v=pnn6QC8a5g8. Note that all of this had to be fit into a binary of 4k or smaller.


Oh it's a fine example - I'm sorry - it didn't occur to me that my reply would sound critical! I just wanted to add some explanation, for anyone who was curious. The original post was good!


for the maximum wow effect, I suggest one of the latest shader by iq : https://www.shadertoy.com/view/4ttSWf

This is almost Pixar level graphics running realtime in your browser.


That guy's whole production is insane https://shadertoy.com/user/iq


I don't want to dis shaders on shadertoy, they are amazing toys (which is why it's called shadertoy). And, that shader you linked to is amazing as well. But, for example on my 2015 MBP it runs at 8fps in a tiny sub portion of a window. If I go fullscreen in runs in 0.3fps. Yet this same machine can run The Witness at 60fps or GTA5 at 30fps and see the entire world.

My point is the shaders on shadertoy are exercises in doing something for fun with limits (one shader and a few inputs) and not about speed or optimization or the anything to do with the way any game engine would go about to get performance.


I'd like to just point out that iq used to work for Pixar[0] :)

[0] http://www.iquilezles.org/personal/curri/curri.htm


iq has a ton more examples of these on his site (including tiny executables which generate such images and animations):

http://www.iquilezles.org/www/articles/raymarchingdf/raymarc...

http://www.iquilezles.org/prods/index.htm


> you would have to have really compelling reasons to start with C++ and not JavaScript and WebGL. And that's coming from someone who actually likes C++ and used to write it professionally.

As someone working in game programming a long time and now also spending more time in machine learning, I must disagree. I suppose I can see your implied point about getting started quickly or something like that, but there's really few compelling reasons to do graphics programming in JavaScript professionally. As a hobby or for a web-based project like a tutorial site, sure, JavaScript and WebGL make perfect sense. For most professional uses though, I can't agree.

Writing a decent performing and well-architected graphics engine is much more than just using an API like OpenGL, WebGL, or any of the successors or predecessors. Further, writing a graphics engine is not about creating an efficient island, but rather a piece of a larger eco-system. Consider that quite often some of the biggest hinderances to graphics performance are creating the data to actually be rendered (ex: via the game update), sending the data to the GPU efficiently, and still getting all kinds of other program logic to run before you even have a frame or want to display a frame. It would be a long post to go into all the details, so forgive me for oversimplifying. Among many things vital to graphics programming that C and C++ provide that JavaScript doesn't or either fails to do well:

- Control of memory allocations and memory shape/characteristics

- Maximizing cache lines (due to architecture, memory footprint, etc.)

- Multi-threading, concurrency, parallel processing

- Data pipelining

- Predictable execution

- Fast, efficient, correct math (or possibility thereof)

- Compilation tweaking/assembler output tweaking

- Efficient IO

- Fast compression/decompression algorithms

- Integration with existing toolchains for graphics including middleware, apps, and shader languages

JavaScript has made great strides in some of these areas and certainly things like web asm help. Nevertheless, most JavaScript runtimes people are using are wholly unsuitable for professional graphics programming. This is akin to people who used to say that you can write a professional game in BASIC or later, Visual Basic. Yes, it's true you can, but should you do it or start there? Probably not if your goal is to learn professional graphics programming. Have people taken such routes and become awesome programmers? Sure, but there are just as many people who never learn, grow, and develop nasty habits that are harder to unlearn than learning the difficult stuff.

If your goal is having fun and learning a few things before moving on to C++, dabble in some JS graphics programming, but since you called our professional programming as no longer being compelling to start, I have to point out that this is both wrong and bad advice to someone new. If you are struggling with the concepts, you will struggle in any language. If you personally need instant gratification and a self-esteem boost, from this point of view JS might not be bad for learning, but it won't teach you a lot of vital things and will encourage some horrific practices. The presence of GC and the lack of a proper parallel and concurrent programming model poison the experience quite a bit.

Ironically, other languages that are more friendly to parallelism and concurrency tend to be better than C, C++, and JS. A lot of the realities of graphics programming are simply caused by historical reasons, market dominance of things like x86 and companies such as nVidia, and existing knowledge, code, and toolchains. Functional languages for instance in many ways have the potential to be better suited to take advantage of the direction we're headed in with regard to numbers of cores, Moore's Law (or diminishing of), GPU design, memory architecture, and so on, but this is just hypothetical mostly. Given JavaScript is hardly known for its ability to deal with concurrency and parallelism in most contexts (no, nodejs doesn't count), again I have to find the above dubious considering you mention the future WRT nVidia.

Of course in the end, you can use things like transpiling, engines that may or might compile to JS as a runtime target, and so on and getting a running product that might be decent in the eye of the beholder. Personally, I've dabbled in JS enough to write a high-performance Voxel engine many years ago when I thought about making a game in JS as well as a skeleton of a 3D adventure game engine for a contract. I was productive enough but ran up against walls that weren't worth working around or just made things feel so kneecapped that I wondered why I was even using JS at all in its current state. The old adage holds that in the end, you can write anything in any language, but there is indeed value of selecting the best tool for the job. Even just making something run and at a reduced frame rate typically is something fundamentally different than being THE language for graphics programming.

In truth, when I first saw JS in the 90s, I thought there was no way it would reasonably do anything in 3D. Things are getting better, but I think you are dramatically underselling what people use and exists today in a professional environment. Your comment about 400 lines of code being that impressive and small seems to also hint you haven't dabbled that much in the area professionally. While your links are just fine and the above shader toy link is indeed impressive in the context of now, personally I was much more blown away when I dabbled in the demo scene and saw what people were doing with an Atari ST, Amiga, and PCs with no GPUs and on systems with less power than today's fitness trackers.

Anyway, I can't think of many compelling reasons to start in JS when IMO, it's better to learn to do things the proper way even if they can be a bit rough and punishing. JS will surely be more productive at the beginning, but also skip teaching you vital things you need to know as well as some of the fundamental primitives of graphics programming. This is the real world and no one in a professional environment cares if you are awesome in JS but don't understand the tools and best practices people actually use industry-wide. Moreover, you won't get far if you can't be productive from your first day because you tried to take the easy way out. If anything, just comparing the amount of resources for JS vs. C/C++, especially from professional vendors like nVidia, Microsoft, AMD, and so on makes me think at best, JS as a starting language for graphics programming only holds for web programmers. If anything this seems to makes things an extra layer of difficult.


Oh yeah I totally meant to get started. There's no way we'll see AAA games written in JS anytime soon. I just remember how long it takes me to setup my environment when I want to do some graphics programming.

However WebGL will outlive JS, when webassembly is introduced.


Fair enough. Definitely there need to be better resources for getting started in 3D programming, particularly in C/C++, but the barriers to entry are also related to what makes things powerful at a AAA level.

In some ways, just grabbing an engine like Unreal or Unity is a decent alternative to something like JS to learn (some even let you use JS or use other languages that also have traps). Big game engines leave a lot to be desired and at times abstracts too much or makes things like handling shader code annoying. Still, most larger game engines like these two are the closest thing to having LOGO for 3D games programming.

You can at least get stuff on the screen relatively quickly, learn a few things, and then start replacing it from there. I personally learned quite a bit way back when just decompiling or reverse engineering stuff from people much smarter than me.

Sometimes I feel like there's a lack of things like what the C64 provided for younger kids and adults today. I suppose as expectations have risen, so has complexity of getting going.


> Sometimes I feel like there's a lack of things like what the C64 provided for younger kids and adults today. I suppose as expectations have risen, so has complexity of getting going.

Although I understand the gist of this statement, I wish I had all the amazing (and cheap!) powerful stuff we have around now to play with when I was young. Also the effect of easy access to information on the internet now cannot be overstated. You can just pull up a youtube video on any subject you might be interested in immediately. It's amazing.

I remember manually typing out pages of C64 code from a magazine to generate a fractal. After typing for literally hours, the actual single fractal picture took hours to generate... Still satisfying in the end to witness it being generated pixel by pixel, but it was surely a lot of work and needed a lot of patience for a kid. Plus if I had mistyped any of that code, it would have been a big disappointment for sure. Kids nowadays have no idea how tough using computers was back then.


Yes, very true, obviously I just mean conceptually poking around. In many ways we definitely have it better now. I am infinitely more productive today. Simultaneously have gone further from teaching the low-level stuff properly.

I spent hours, days, and weeks of my life on things related to graphics/games programming such as:

- Building mouse drivers from scratch or implementing them from alternative vendors

- Implementing/Working with DOS protected mode

- Manually compressing memory/implementing swapping

- Implementing blitting from scratch

- Implementing z-buffers from scratch

- Reverse engineering consoles to steal processing power from idiotic sources just to render a tiny bit more data or later, a few more polygons

- Spending a huge chunk of cash to throw in a math co-processor into my machine at home

- Debugging code for hours only to realize things like the problems are caused by seemingly unrelated problems such as tape media is at fault, the floppy is corrupt, or the file system doesn't work the way the vendor said it does in the specs

- Rendering a scene and then going home, only to come in the next day and see it is still not done

- Converting from 72 billion formats and interpreting, finding, and/or correcting corrupt data from each one

- Rewriting entire pieces of code bases to squeeze out several more bytes of EMS and XMS

- Implementing 2 or more graphics APIs for the same game. Thank you 3dfx, S3, and many others that pained me, not to mention at a higher-level, OpenGL, DirectX, and so on.

- Doing all my work on 1 platform, then loading it on another. Thank you SGI for taking years off my life.

- Writing matrix operations in pure assembler for the simplest of operations

- Having multiple workstations for reasons such as "this one has the Matrox card in it."

The list goes on. Yeah, I don't miss those days. But I learned a lot, we all did. And the barriers to entry definitely reduced the signal to noise IMO.


There always has been and always will be problems, there are just different problems now...

We can't even imagine what kinds of crazy stuff the next generation will come up with, with all the resources they have available now. The barriers to entry are still there, but the goalposts have moved significantly.


You sound like you've had some interesting experiences in the trenches, do you have a blog or something where you share your thoughts about the craft?


Funny that, I've used that exact expression before, with Matrox framegrabbers ;-)


> # Game Programming Patterns

This is also available on the authors website: http://gameprogrammingpatterns.com/contents.html


Added.


Another one that blows my mind, for a completely different reason, is https://www.shadertoy.com/view/MddGzf . That's a simple breakout clone that stores all game data in a separate render buffer. I love that the author managed to implement a game loop in a system that was never designed to support it.


I'm going to shamelessly push

http://webglfundamentals.org


> ...I wouldn't be surprised if in 15 years, instead of AWS, we are using geforce cloud...

NVidia's already there with the hardware:

http://www.nvidia.com/object/nvidia-grid.html


And they are building that thing that will let you game in the cloud and stream it to your computer (is there a name for this type of product). There were startups that tried that before that generally failed but fundamentally if you manufacture the platform, sky is the limit. This will let them build out an infrastructure while still selling to the other cloud providers but eventually, they can just start keeping the secret sauce for themselves and their products.


LiquidSky is doing it now, and I'm using it as my sole gaming PC. It's amazing.


Thanks for the mention of this, I'm quite interested, looking at their FAQ right now, curious to see how they handle latency. Do you notice any lag? Also, what FPS do you achieve?


My ping in Overwatch is 1ms, with 40ms latency to the server from my computer at home. Your bandwidth will determine what your FPS will be, of course!


OK thanks again for the info, now very much worth a serious look.


Marking this for later. I did some graphics in the 00s.

Your JS plus WebGL comments are compelling.

Thanks for a golden comment.


I would say C more than C++, with the latter only emerging into popularity due to major game engines within the last couple of decades.


Now mostly retired, but I've been doing game dev for a couple of decades. I would say based on my career and that of my peers, it is more correct to say C or even assembler is the traditional graphics programming language with regard to games. It just depends on your definition. For that matter, if we consider things like CAD, 3D modeling/animation (using APIs/scripting), movie production, etc. to be graphics programming, again there are some differing results as to which language you use.

It also really depends on what time period we're counting as the "start" and if we value older games or periods of higher but simpler productions vs. now. For instance, I wrote quite a lot of code against NES, SNES, Genesis, Atari, Arcade machines, C64, and so on in assembler. 68000-based systems alone are such a huge chunk of sheer volume of games and most of us wrote quite a bit in pure assembler with regard to graphics.

On other systems that were faster or for different game requirements, we definitely used a ton of C, only moving to C++ later. In the case of C++, it's almost hard to even call things C++ at times. To be honest, most decent game engines I've worked on essentially use C++ to practically rewrite the language and go to great lengths to avoid some of the primary selling points of C++. It's sort of pick and choose some good things about C++ or at least powerful things while avoiding some of the burdens of C with regard to games. Obviously general C++ programming is different, so keep in mind I'm only referring to professional games programming. As things have progressed, people are indeed using more of what the newer C++ standards offer, but most of the same things still hold true. Where one has a tough argument with regard to graphics is the fact that so much now happens on the GPU, which one can argue is its own thing given stuff like shader languages.


"I would say Latin more than English, with the latter only emerging into popularity due to major nations within the last couple of centuries"


Hmmm. The first official C++ standard was published in 1998, so 'the last couple of decades' covers pretty much the entirety of languages standardised life.


I'm always impressed by how well hugely popular games like League and CSGO run on bottom-tier machines. Maybe it really isn't all that impressive and its just the number of poorly optimized bloatfests out there that skews my perception


It's actually key to obtaining a supermassive audience. People will roll their eyes at me for this, but one of the major reasons that FarmVille was able to reach 80M monthly actives was due to aggressive performance optimization at the bottom end and progressively turning off graphics features based on frame rate.


Nope, as a gamedev I can say that it definitely is impressive.

As with all optimization it is hard: as you try to squeeze more out of the machine your code gets less and less elegant.


I agree as well. Most of my fastest, "best" code is awful to look at because it has to be. It's full of crazy comments and hacks that were necessary for the hardware, language, and time usually. I think as processing power has increased, the low-level code is actually much less ugly. This is in no small part due to astronomical leaps in game design, engine design, and development time and other resources.

Still, in my experience any codebase that pushes a large amount of technical boundaries tends to be full of huge "WTF is this" moments that require explanation. It is an achievement if you can create a decently powerful codebase that can survive rapid changes and additions. It's much more common, but I've seen and worked on AAA codebases that would break if you blew on them.


It's interesting to me how a few of the effects are still baked into the textures, which means they still can't let the user rotate their camera. Most people feel there is an advantage to playing on the bottom side due to camera perspectives, and allowing users to rotate their cameras could nullify this disadvantage.


They could just bake two versions for the two possible views and let you select between them. Or even just always put the enemy team on top.


Title is a nice nod to the classic _A Trip Down the Graphics Pipeline_ by the great Jim Blinn.


The author answered a few question in this /r/gamedev thread: https://www.reddit.com/r/gamedev/comments/5otq0r/a_trip_down...


Along the lines of this, can anyone recommend a blog post, or an article that demonstrates the mathematics that goes into game design? I want to show my 8 year old who wants to build games one day why math is important. Maybe something that shows how matrices are used to show placement, or vectors to drive movement?



Not exactly, but you might like https://www.reddit.com/r/videogamescience/


Teach them to program first I think.


See also the fantastic graphics studies produced by Adrian Courreges.

http://www.adriancourreges.com/blog/2016/09/09/doom-2016-gra...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: