by jesse__ · 1y ago · 0 comments
Uhh .. wut?
The game appears to be similar to a point-and-click adventure game, which were popular in the 80s, and ran just fine.
In 1988, a CRAY Y-MP supercomputer had "64 megawords of memory". I have no idea how large a word was on those machines, but by todays standards, that means 128MB. Let's go with that. The Y-MP was the size of two massive fridges.
Now, the Macbook air OP owns, which is smaller than a toaster, has 128 TIMES as much memory in it as a supercomputer did back in 1988. Similar story for processing power, storage, etc. Point and click adventure games haven't changed all that much, and even back then didn't require a supercomputer to run.
> But for diagnosis? Yeah, “it’s the hardware” is the right answer.
Given the above, how you came up with this is beyond me.
It can be very dependent on hardware generation, too. One of my past projects was a very simple, photosphere-based learning environment. Photosphere rendering is incredibly simple. But on Intel processors with Iris Xe integrated GPUs used by one particular year of iMacs (I don't remember which, it only impacted 2 users and it was several years ago), I couldn't use the standard cube sampler because it was just broken. I had to split my photospheres into 6 cube faces and render 6 quads separately to be able to use the not-broken 2d sampler. The issue didn't appear on any other generation of Iris Xe on macOS and it didn't appear on any generation of Iris Xe on any other OS. It was very specifically the combination of macOS and that generation of GPU.
Yes, video drivers are, generally, buggy and unreliable. The hardware they're hooked up to is fucking amazing.
Also, I can 99.9999% guarantee that this guys' problem is not a driver bug, so trying to nerd-snipe me with "but driverzzz broroooooo" is pedantic and annoying. The guy is drawing like 100 quads; it should run at a bazillion frames a second on literally a toaster.
I'm curious about this. I always had the impression, mostly from reading Shamus Young, that there's no such thing as drawing something other than a triangle.
Blender guides tell you to divide your model into quadrilaterals. Though I did find one reddit post saying "I imported this model from a console game and it's all triangles. I thought models were supposed to use quads." The answer was "that model is finished, so it's in triangles because that's what you actually draw".
What's going on? Is there such a thing as drawing polygons with more than three sides? Why is the current advice "use quads" to the point that people don't even realize they're drawing triangles?
GPUs rasterize triangles because they are a primitive type with very convenient properties: rasterization requires only a few basic math operations per pixel and triangles can never overlap themselves in projections, which quads can.
It's generally tempting to assume the mesh data that is edited in a DCC tool (Maya etc.) as the same as what is rendered. This couldn't be further from the truth because they need to be in completely different representations. For example, vertices on UV map seams need to be duplicated for rendering, but that would make editing the mesh extremely unwieldy. So the datastructures are totally different.
The advice about using quads I'm not sure is really a tautology. I tend to work with quads until one of the quads is non-planar then I cut it so that when I bring it into a game engine the import/bake step doesn't triangulate the mesh in a way I didn't want it to.
Now, software modelling packages can represent geometry in any way they want, as long as that software package can somehow eventually transform that representation into triangles for the GPU to rasterize to pixels (barring custom software rasterizers).
My comment referred to quads, but at the end of the day, a quad is 2 triangles. Same goes for arbitrary polygons. The GPU speaks triangles.
that all being said. it is very easy to write bad code for games or use old features etc., we're all guessing unless some of you put a profiler and debugger to it... if so , show the money.
I guess I just wasn't willing to assume OP was basically incompetent and hadn't already done a basic algorithm review if their post about not being able to debug this issue made it this far.
A game like this should be running for like 1000+fps and this point should be emphasized in case the maker of this game is clueless when it comes to this kind of stuff, as his blog suggests (sharing an executable with users and asking for a recording is not how you would debug this perf issue) And it's totally fine if they are clueless, we all start somewhere. What sucks is derailing comments like yours that do the opposite and pretend that there is a conversation to be had here other than the implementation is probably terrible, which is, again, completely fine if it is, and we can talk about it and help them with it or point them in the direction of good resources about this stuff.
sorry for the rant, I just see these "akshually theoretically it could be due to blablabla" type comments on HN so much lately and I hate them
Which is software, not hardware. Just not the software written by this dev.
this is also a reason why there are so many gfx driver patches which fix specific games...
its usually not the hardware but driver issues.
also, its infeasible for a solo dev to test on a plethora of platforms and device/driver combos, so any feedback from random internettians about performance can be really helpful to prevent breakage on platforms not available to the dev to test on.