Luaan
  • Member for 7 years, 11 months
  • Last seen more than a month ago
Why am I not getting stuck in the loop
0 votes

Think about how a foreach works: foreach (var number in Enumerable.Range(1, 1000000)) { if (number > 10) break; } The control over the iteration is on the caller - if you stop the iteration (...

View answer
How can I round out the corners of a quad in OpenGL?
2 votes

The main problem with drawing round 2D objects using 3D geometry is that there's no real fixed mapping between the pixels on the screen and the 3D world-space. Making sure they look at all resolutions ...

View answer
How might I eliminate asymmetrical gameplay caused by turn order?
2 votes

I very much prefer the "simultaneous turn-based" approach used by e.g. Sword of the Stars, but if you want to keep a more traditional turn-based structure, one option is to update the map between each ...

View answer
Why is it so bad to optimize too early?
25 votes

"Do not optimise early" doesn't mean "pick the worst possible way to do things". You still need to consider performance implications (unless you're just prototyping). The point is not to cripple other,...

View answer
How do C++ games handle memory allocation failure?
2 votes

Well, mainly, the same way we did it before exceptions existed - the old "check the return value approach". If an allocator doesn't use exceptions, it will usually return null when an allocation fails....

View answer
Why do modern games use a render-to-texture approach for mirrors?
30 votes

No, you are wrong - that's not how Duke Nukem 3D's mirrors worked at all. DN3D used a portal engine. A joint between any two sectors was arbitrary to an extent, and when the rendering engine came to ...

View answer
Couldn't all games avoid post-start loading?
2 votes

Ultimately, it's limited resources. Open-world games and especially MMOs are heavily crafted toward predictability - you always know what data you need to load well in advance. You can see this in ...

View answer
Do I really need to use a graphics API?
4 votes

The other answers answer your main question quite nicely: technically, it's possible, but in practice, if your goal is to broaden your customer base, you're actually doing the opposite. While wasting ...

View answer
Rendering terrain only with GPU
Accepted answer
0 votes

This is usually a bad idea if you want the terrain to be interactive. And even if you don't, rendering the noise to a texture first will save you a lot of noise sampling. Collisions and other stuff is ...

View answer
Games development with a game loop that's abstracted away
0 votes

Loops are simple constructs, and they're generally easy to implement. They work on a simple synchronous environments of things happening in some definite frames. All this nicely explains while a game ...

View answer
Why game loop should be running on a separate thread?
Accepted answer
3 votes

One important point - when you're using eg. DirectX, you really, really don't care about the main thread. Let it be as free as possible, it doesn't do anything. All the inputs and outputs are ...

View answer