10 ms·
Black Triangles (2014)
- deleted 3y ago[deleted]
- 082349872349872 3y agocompare https://en.wikipedia.org/wiki/Jo-ha-kyū https://en.wikipedia.org/wiki/Jo-ha-kyū
- ianbutler 3y agoI appreciate the concept, I had my own black triangle recently when I finished writing my own implementation of an adaptive radix tree that is highly concurrent and keeps hot paths in an LRU and loads everything else from disk. Now when I circle back to my full text search extension for Postgres I can do so knowing I can replace my naive inverted index with something that gives like a 10% performance gain but more importantly significantly reduced and CONSTANT memory profile. On it's own however, it doesn't seem to do much and unless you're in the space you won't appreciate why this is an interesting implementation.
- jacquesm 3y agoI like such projects. They're the programming equivalent of making jewelry. Is your code public?
- ianbutler 3y agoThanks for your interest! It was definitely rewarding though I’m sure I can optimize a few things still. The code is public: https://github.com/iantbutler01/dart https://github.com/iantbutler01/dart
- jacquesm 3y agoNeat, thank you. I will give it a read later tonight.
- jacquesm 3y agoSo, I had a look at it, very nice and tight code, relatively easy to follow even for someone who doesn't really know rust (I think I picked up more rust from your code than I did from any other source about rust). I especially like the very clean and simple interface that abstracts away all of the complexity underneath. Thank you for putting this out there, rust needs more projects like this, quiet and effective, showing rather than telling.
- ianbutler 3y agoThank you so much! :)
- burrish 3y agoMy black triangle was making Suzane (blender monkey) appear on the screen.
- andai 3y agoOpenGL? I did the monkey too! But I did a simple software rasterizer... (No OpenGL, draw bitmap directly.) I only got as far as point cloud (the wireframe without the wires, heh). Want to continue the project and add lighting and texturing eventually. My "big insight" (shower thought) that gave me the confidence to do 3D is that you don't need linear algebra. You can do it all with trig! A 3D rotation is just three 2D rotations! It won't be very performant, obviously, but I'll take "my toy renderer runs slowly" over "it doesn't exist because I am struggling with linear algebra for the 7th time". It's a lot more fun doing things the easy way! Even perspective is one line of code.
- burrish 3y ago>It won't be very performant, obviously, but I'll take "my toy renderer runs slowly" over "it doesn't exist because I am struggling with linear algebra for the 7th time". Haha I could not agree more
- jacquesm 3y agoIt helps to know that under the hood almost every serious game is a complete more-or-less real time operating system with its own IO, scheduler, memory management and various sub-processes relating to output generation and so on. It was only after I wrote a couple of games that I realized that extracting this OS component would be worth the effort and after that making new games went substantially quicker.
- deleted 3y ago[deleted]
- ReactiveJelly 3y agoI don't consider it an OS if it needs an OS to run. Something like a "Ship can carry a boat, boat can't carry a ship" rule.
- jacquesm 3y agoI'm fine with that. I did eventually 'unplug' that game os to the point that it would run standalone on bare metal by adding a couple of hardware drivers. The point was: to make a game function you have to perform the bulk of the functions that an operating system performs and the similarities are greater than the differences.
- gwbas1c 3y agoWell, Windows / Mac / Linux needs the Bios (or whatever we call it today) to run. If you can't call those "OS"s, than what really is an OS? I guess it's turtles all the way down. > almost every serious game is a complete more-or-less real time operating system Games tend to have very different requirements and different demands from the OS; they tend to regulate the OS to being (mostly) a hardware abstraction layer. In the late 1990s and early 2000s, it was a lot harder to run games on Windows NT versus Windows 9x because DOS was a lot better at getting out of the way of games.
- jacquesm 3y agoAnd I wrote that stuff in the 80's, when your typical 'OS' on a computer was much closer to what a BIOS is than an actual operating system. Usually the games were far more sophisticated in terms of what their internal services provided than the equivalent OS services. The most the BIOS usually did for you was to boot your game code, change graphics modes, handle the keyboard and read and write raw media. Everything else you had to do for yourself. Today there are far more levels of abstraction, especially when you use the various 3D engines or other large frameworks. But essentially those have taken over the role of a lot of that OS-like code.
- orenlindsey 3y agoThe black triangles are also a lot more fulfilling than other problems. When you get the foundation of your project finished, it feels so good. And you know that you can start doing the fun stuff with relative ease now that the hard part is over.
- wiz21c 3y agoI get a white or black or any monochrome triangle whenever I try a new graphics stack. Every. Single. Time.
- segfaultbuserr 3y ago> 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" example became (in)famous for its need to implement a skeleton of a full 3D engine in thousands of lines of code before you can render a triangle on the screen. https://vulkan-tutorial.com/Drawing_a_triangle/Setup/Base_code https://vulkan-tutorial.com/Drawing_a_triangle/Setup/Base_co...
- y-curious 3y agoThanks for sharing this, I was thoroughly tickled. The optimistic tone of the tutorial stands in stark contrast of the convoluted path to drawing an object.
- fingerlocks 3y agoIf you RTA, that’s a perfect example of drawing a black triangle versus “A Black Triangle Moment”. That tutorial is a general overview of all the possible boilerplate you would expect to see in a template project, and just happens to end in a triangle being drawn on the screen. You could skip a lot of those steps. Is that 5 page section on constructing validation layers and fine tuning the debugger really necessary if your end goal was a triangle? You can draw a triangle in Metal in thousands of lines of code too. And it’s common to have several hundred lines of pipeline descriptors, buffer management, and debug tooling before you even started encoding into your shaders. But it’s not necessary for _just a triangle_.
- throwaway7679 3y agoThat 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.
- 3y ago
- therealcamino 3y ago[flagged]
- mensetmanusman 3y ago[flagged]
- therealcamino 3y agoNobody owns it, obviously. It can be helpful however to be aware of the associations your terminology already has. From a practical perspective, it interferes with getting your point across to overload a symbol that already has strong associations. From a social perspective, it's considerate not to use symbols that have strong negative associations for others (which is not a view shared by the "fuck your feelings" crowd, although I've noticed that they're not all that consistent in that view, and it tends to depend on whose feelings are getting fucked.)
- johnnyanmac 3y agoOn the other hand, if you go into history deep enough you'll find symbolism for any and everything being a hate symbol. The okay hand emoji Of all things had a controversy so nothing is safe. Triangles are the most basic shape available so you'll find any and all kinds of symbols to represent good and bad things. I don't think it's very productive to worry about how it was used 70 years ago unless you're talking to a very old person.
- therealcamino 3y agoIt was used during the 80s. Like I said, I'm not telling anyone what to do. Everyone can feel free to call anything whatever they want, to use or reuse symbols as they see fit. The signifier is not the signified. Just wanted people to know. Because like I said, if your goal is to communicate, you might want to know if you're using something that has another, emotionally-loaded interpretation.
- deleted 3y ago[deleted]
- nerdponx 3y agoIt's good to have a name for this. I feel like my entire career has been "black triangle" problems, and it's been a struggle to get recognized for that effort at times.
- LASR 3y agoI've built a reputation for leading skunkworks projects in my org. The trick I've discovered is that maximizing self-interest eg: maximizing your recognization of efforts (and for everyone else working on the project) is the best way to deliver long-term actual customer value. So you put out some hype in the org first, build your black triangles internally, and then when you connect customer value, then connect the hype with results.
- cybrexalpha 3y agoSo this is a 10-year old repost (2014), of an original article 10-years older than that (2004), describing and event that happened ten years before that (1994)?
- sitkack 3y agoI am looking forward to seeing this post in 2034!
- avg_dev 3y agotbh, i personally think the article is timeless and beautiful
- cybrexalpha 3y agoOh it wasn't a criticism, it's a lovely article.
- deleted 3y ago[deleted]
- andai 3y agoSpent the last 4 days trying to get the raylib example game to run on my Android. Yesterday I changed course and got rawdrawandroid running instead. That was my black triangle (actually it was green heh), proof that my goal was actually possible. If rawdraw can build and run, so can raylib! I got raylib working shortly afterwards. It's funny I always thought C gamedev would be hard, I just didn't think the hard part would be the "hello world"... I'm looking forward to actually building the game now! (My experience is more like "the triangle that should take a day", but I still thought it was relevant as a kind of major milestone that puts you in a qualitatively new reality where now you have an actual working thing you can fiddle with.)
- 0xfffafaCrash 3y agoOne 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 in favor of shiny demo projects that demo well but can never go much further. Black triangle projects require time investments that at least big companies only rarely bet on despite being in possibly the best position to do so. I think a part of it is that humans, or at least those that make their way into management, are in large part very visual creatures. If you can’t show them progress in a traditional visual way you sort of have to figure out some contortion to show some visual thing to use as a proxy of progress to keep the faith. Sometimes it can be achieved through selling some abstract progress metrics about work remaining (most often entirely detached from reality) but that only works so long. More often you end up knowingly spending a large percentage of resources on vacuous side projects solely because they demo well to management in the short term — it’s a distraction but a way to keep the faith and the resources. I find it funny how much time and energy we’re willing to waste to play the game — paying the souped up visual taxes for decision makers, while doing the real work independently, often in the dark because we know management will react short sightedly to the black triangles.
- deleted 3y ago[deleted]
- ryandrake 3y agoI've worked in places where management understood the idea of laying a foundation, and building up the abstractions and information architecture, and understood that the result of the first 50% of the project could be a single text log showing all the data paths working, but those companies are rare. Most places are like you said: they won't believe any work is happening until they are bamboozled by a visual demo of the software--and they think it's "close to done" when the visual demo matches what they think the software should eventually look like. That's why so many places ship unfinished demo-ware: Engineering shows off the proof of concept that only scales to 10 customers and doesn't actually write to the database, and then management demands they ship it because it looks done and the deadline is coming up. I wish I could figure out, as a candidate, a good question to ask in order to suss out which kind of company is interviewing me.
- intrasight 3y agoI refer to it as getting an ant tunnel through the mountain
- bluedino 3y agoA long, long time ago: Me: Look at this dot! Mom: You put a dot on the screen? Me: Yes! Now hit the keys! You can move it!
- peter_d_sherman 3y ago>"It wasn’t just that we’d managed to get a [black] 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." Related concepts: Egg of Columbus: https://en.wikipedia.org/wiki/Egg_of_Columbus https://en.wikipedia.org/wiki/Egg_of_Columbus Hindsight Bias: https://en.wikipedia.org/wiki/Hindsight_bias https://en.wikipedia.org/wiki/Hindsight_bias
- gchamonlive 3y agoThis reminds me of yak shaving https://news.ycombinator.com/item?id=29879009 https://news.ycombinator.com/item?id=29879009
- pm 3y agoI 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-fi/fantasy/horror novels for some years now, and he has his own series. PS. I was going to say this article was from way further back than 2014, but on reading the post it appears it was his own repost.
- dejobaan 3y agoI 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.
- pm 3y agoI'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.
- dekhn 3y agoI 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).