Live data from Hacker News

Black Triangles (2014)

rampantgames.com

61–70 of 79 posts

Re: Black Triangles (2014)

#61

Earlier quoted context omitted.

That tutorial sets up a complete rendering system, and demonstrates that it works by drawing a triangle... the exact thing described in the black triangle story. Drawing a triangle is not the end goal. That's nonsense.

Yeah we’re saying the same thing. It’s not a “Hello Triangle” tutorial.

It kind of sounds like we're saying opposite things.

You're talking about the minimum necessary for just drawing a triangle, as if that's what "hello triangle" means. That's nothing. That's pointless.

The construction of hello triangle program marks the end of setup, and the beginning of actual work.

Skipping parts because they're boilerplate, or don't directly serve to draw the triangle, defeats the purpose. That's like typing the words "hello world" into notepad because it's faster than setting up an IDE.

Re: Black Triangles (2014)

#62
post #25

Earlier quoted context omitted.

Have you written a serious game engine? Parent is right, a bunch of them basically are a real-time OS sitting on a small amount of the underlying OS ( if one exists). When you have to write your own malloc() and fopen(), and your own thread scheduling, that counts as Operating System. This is becoming less true today, as the hardware gets better and bigger and faster and resources are less constrained, but it wasn’t…

> Parent is right, a bunch of them basically are a real-time OS sitting on a small amount of the underlying OS (if one exists). When you have to write your own malloc() and fopen(), and your own thread scheduling, I don't doubt that game developers do this, but I've never really heard a satisfying reason why, besides vague hand-waving about "needing more performance". I'm not a game developer though, so maybe it's tr…

I haven't worked on games in about 10 years, but I wrote core tech for AAA games during the 2000's. Stuff like async I/O, reflection, memory allocation, low level networking, and especially containers were all written in-house. Quite a bit of it was utilitarian, but I agree, a lot was a case of NIH syndrome. Some studios had these insane container libraries that just archived whatever weird data structure someone had as a toy project in university. Math libraries were the same. Scripting languages were all half-baked toy projects by the lead engineer etc.

For consoles, it wasn't that the STL was slow, it was that not all of it was fast, and some parts really were just trash written by whatever the compiler vendor had put together. RTTI was also generally not allowed as it was "slow", and virtual functions weren't allowed at one place because the vtable took up "a ton of extra space". So some of it was cultural, some of it was advice that was ok-ish maybe 15 years before the project began, and a lot of it was just not understanding what was happening under the hood.

Re: Black Triangles (2014)

#63
I used to write opengl screensavers for xscreensaver (glplanet and pulsar) and I have to admit, sometimes when working with opengl it would take me more than a day to just get a triangle (or sphere, my preferred primitive) to show up on the screen. Anything from an errant transform, to a mistaken feature bit (lighting, whatever) turned on/off could make a huge difference. Once I could draw a quad I had everything required for pulsar, and once I could draw a sphere I had everything I needed for glplanet (although I later learned, I did get the projection math wrong the first time).

Re: Black Triangles (2014)

#64
post #54

One thing that’s interesting today is how in the corporate world, even in big tech companies where one might naively think black triangles with explanations might be appreciated by more technically literate managers, working on these sorts of building blocks for big wins will often actually result in projects and teams getting axed. I’ve seen serious attempts at innovation get thrown out the window a number of times…

> One of the engine programmers tried to explain, but she shook her head and went back to her office. ...Maybe they shouldn't be making their way into managing engineering then? To be fair, the lady in question, Jen, did come around in the next paragraph. However, it still highlights the extremely annoying problem of doing non-visual work under visual(-only) people -- one then has to actively create visuals. This quo…

> ...Maybe they shouldn't be making their way into managing engineering then?

...What part of being a financial controller and acting HR is "managing engineering"?

Re: Black Triangles (2014)

#65

Earlier quoted context omitted.

Yeah we’re saying the same thing. It’s not a “Hello Triangle” tutorial.

It kind of sounds like we're saying opposite things. You're talking about the minimum necessary for just drawing a triangle, as if that's what "hello triangle" means. That's nothing. That's pointless. The construction of hello triangle program marks the end of setup, and the beginning of actual work. Skipping parts because they're boilerplate, or don't directly serve to draw the triangle, defeats the purpose. That's…

The first OpenGL tutorial from 30 years ago was called “Hello Triangle”. It was uselessly simple, just like the iconic “Hello World”.

The point is that the tutorial is not in the same spirit as the classic Hellos. You can draw a triangle without all that scaffolding.

Re: Black Triangles (2014)

#66
post #25

Earlier quoted context omitted.

Have you written a serious game engine? Parent is right, a bunch of them basically are a real-time OS sitting on a small amount of the underlying OS ( if one exists). When you have to write your own malloc() and fopen(), and your own thread scheduling, that counts as Operating System. This is becoming less true today, as the hardware gets better and bigger and faster and resources are less constrained, but it wasn’t…

> Parent is right, a bunch of them basically are a real-time OS sitting on a small amount of the underlying OS (if one exists). When you have to write your own malloc() and fopen(), and your own thread scheduling, I don't doubt that game developers do this, but I've never really heard a satisfying reason why, besides vague hand-waving about "needing more performance". I'm not a game developer though, so maybe it's tr…

The problem with STL is that there isn't one of it but every compiler/C++ library/platform has its own and some are better than others. Writing your own containers at least means you take one uncertain dependency out of the scene for something that'd be all over the engine everywhere (so it isn't easy to replace later).

Though personally i'd make my own containers because i heavily dislike the API design C++ library has and i am glad every single engine i've worked on had their own (well, except in a single case where while the engine did use its own containers it was basically 99.9% the same API design as the C++ library :-P).

Re: Black Triangles (2014)

#67
post #25

Earlier quoted context omitted.

Have you written a serious game engine? Parent is right, a bunch of them basically are a real-time OS sitting on a small amount of the underlying OS ( if one exists). When you have to write your own malloc() and fopen(), and your own thread scheduling, that counts as Operating System. This is becoming less true today, as the hardware gets better and bigger and faster and resources are less constrained, but it wasn’t…

> Parent is right, a bunch of them basically are a real-time OS sitting on a small amount of the underlying OS (if one exists). When you have to write your own malloc() and fopen(), and your own thread scheduling, I don't doubt that game developers do this, but I've never really heard a satisfying reason why, besides vague hand-waving about "needing more performance". I'm not a game developer though, so maybe it's tr…

[deleted]

Re: Black Triangles (2014)

#68
post #57

I had the pleasure of working with Jay doing the character illustrations on his indie space shooter, a couple of years before I started coding professionally. This was the article that always stayed with me, especially at times when progress was difficult (which became especially poignant 18 months ago with my ADHD diagnosis). These days he works for a VR company, but his main creative activity has been writing sci-f…

I remember that one—was always sad that Rampant didn't go on to make more games, but it seems like Jay went on to do some cool stuff in other areas.

I'm sure he did more than just one game, but the revenue wasn't enough and he had a family to feed. We connected on GarageGames back in the day, which saw some reasonable success. I think it's easier these days to make a living as an indie game developer, but it's still very much a hit-driven business.

Re: Black Triangles (2014)

#69

Earlier quoted context omitted.

Yeah we’re saying the same thing. It’s not a “Hello Triangle” tutorial.

It kind of sounds like we're saying opposite things. You're talking about the minimum necessary for just drawing a triangle, as if that's what "hello triangle" means. That's nothing. That's pointless. The construction of hello triangle program marks the end of setup, and the beginning of actual work. Skipping parts because they're boilerplate, or don't directly serve to draw the triangle, defeats the purpose. That's…

(New to comment thread) The article is about setting up all the core infrastructure to start bringing content into the engine, validated by the triangle.

Even tho the Vulkan tutorial might seem like work, it’s not actually preparing you to build anything significant on top of it. This just an overview of the API, not much of a building block.

Re: Black Triangles (2014)

#70

> It wasn’t just that we’d managed to get a triangle onto the screen. That could be done in about a day. It was the journey the triangle had taken to get up on the screen. If anyone wants to experience something like that today, just follow an introductory tutorial on Vulkan programming. Vulkan is a programming model that gives so much low-level control directly to programmers. As a result, this "Hello Triangle" exam…

It's fun to see the evolution in e.g. these examples of image loading for Dear Imgui:

https://github.com/ocornut/imgui/wiki/Image-Loading-and-Disp...

DirectX9 will even load the image for you, DirectX11 okay we get a few more structures to fill out, DirectX12 is where it goes off the rails and we are filling out a bunch of UNKNOWN DONT_CARE JUST_DO_IT. Then of course Vulkan is the one that gets the big fat "this probably won't actually work for you" warning.

I understand whats happening, but you know sometimes I just want to display a fucking image.

Post reply on HN