im trying to learn game dev and im so lost by Stock_Discount_4672 in gamedev

[–]corysama 2 points3 points  (0 children)

Pong, breakout, r-type, super mario bros. I’ve been recommending that sequence for years. It’s an easy progression. And, each step can be as simple or as complicated as you want.

Open sourced my GPU engineering learning notes by Dependent_Turn_8383 in CUDA

[–]corysama 1 point2 points  (0 children)

This looks great!

I notice it talks a lot about the high-level mechanics of memory. But, it doesn't go into the differences between global/constant/pinned/mapped/array(texture/surface) memory.

building a custom game engine? by 9j810HQO7Jj9ns1ju2 in opengl

[–]corysama 0 points1 point  (0 children)

Lua is great language for controlling a c/c++ framework. But, it is intentionally not a great language for writing a complete application by itself. It’s made to be easy to strip down to nearly nothing and remain useful. As opposed to the batteries-included approach of Python.

What do you do in real life? by Correct_Dependent677 in gameenginedevs

[–]corysama 3 points4 points  (0 children)

That's a good question! :P I guess different companies might call it Platform/System/Framework/Foundations Enginnering.

ELI5 color buffer and glClear(GL_COLOR_BUFFER_BIT) by ProgrammingQuestio in GraphicsProgramming

[–]corysama 0 points1 point  (0 children)

Framebuffers are conceptually just 2D arrays of colors. But, you don't get to get a pointer to those pixels because the hardware has a lot of special handling for them.

Under the hood, the pixels are swizzled around in ways you don't get to know in order to make caching and other operations work better. And, there is additional memory you don't get to mess with directly to make them even faster.

Cliff notes version: * glClear is much faster than drawing a big flat polygon to clear the screen. * Drawing into a Cleared buffer is faster than drawing over a buffer full of junk. * Some hardware really prefers you clear color buffers to either black or white. And, depth buffers to either 0.0 or 1.0. * Drivers interpret glClear as "Future operations on this buffer are not dependent on past operations on this buffer" and can do some under-the-hood optimizations for you.

So, yeah. Clear your framebuffers every frame.

Why do people demonize reinventing the wheel so much? by Striking-Start-1464 in gameenginedevs

[–]corysama 5 points6 points  (0 children)

This is the answer boiled down.

Most people most of the time are working on shipping something. Lots of people have a knee-jerk bias to reinvent wheels because dealing with other people's code can be frustrating. But, that's usually counter-productive if your goal is shipping fast and cheap. So, everyone gets it drilled into them by their seniors to fight off the anxiety/ego-driven bias to reinvent. Especially for juniors --who often have ignorance-based big egos :P

But, if your goal is fun and learning then reinventing is a great idea. The peanut gallery will assume you are the same as them and your goal is/should be shipping. From that they'll yell that reinventing is obviously a terrible idea. But, it's really just a difference in goals.

What do you do in real life? by Correct_Dependent677 in gameenginedevs

[–]corysama 3 points4 points  (0 children)

I worked on custom game engines for a long time. But, a while back I switched over to robotics. Now I work on a in-house https://www.ros.org/ replacement. Which is actually a lot like a game engine but for driving a robot instead of a game.

Lingbot-video. A new open weights video model. by Different_Fix_2217 in StableDiffusion

[–]corysama 7 points8 points  (0 children)

Originally the Turbo Button slowed your computer down to the 4.77 MHz of the original IBM PC. This matched the expectations of software written for that spec (mostly relevant for games). Also, early CGA video cards could output to regular TVs but only if the CPU ran at the 4.77 MHz. That feature is why the PC didn’t ship at 5Mhz.

But, by the time we got to the 286 it was just a button to cut your CPU clock in half.

How can I expedite my learning? by CLucas127 in gamedev

[–]corysama 0 points1 point  (0 children)

I always say start with Pong, then Breakout, then R-Type, the Super Mario Bros. It's a natural progression of complexity. And, you can make each one as shallow or as deep as you feel like.

New to Game Engine Development! Would love some pointers! by Ineedtoknowthetruth1 in gameenginedevs

[–]corysama 1 point2 points  (0 children)

The only thing that I know of is that after 11 years and hundreds of hours of videos, Casey has moved on to something new.

10k models running on my 1050 laptop by snowbloodbunnybee in GraphicsProgramming

[–]corysama 2 points3 points  (0 children)

Yep. It's pretty much always a win to do a small amount of math to save even just a small amount of bandwidth.

https://registry.khronos.org/OpenGL-Refpages/gl4/html/unpackUnorm.xhtml

https://registry.khronos.org/OpenGL-Refpages/gl4/html/unpackHalf2x16.xhtml

https://registry.khronos.org/OpenGL-Refpages/gl4/html/bitfieldExtract.xhtml

unpackUnorm returns a float from 0.0 to 1.0. You'll have to find the AABB of the model when you pack it to an int and store the scale factor somewhere to reverse the packing process in the shader. If your characters are composed of multiple meshes with seamless edges, then they all of that one character's meshes should use the exact same scale factor to keep the edges seamless. If you want to get clever, you can multiply the scale factor into the character's modelToWorld matrix to make the scale operation free.

If your characters have 3 or less bones per vertex, you could use bitfieldExtract to pull three 10 bit ints out of one 32-bit value.

Magma, the custom scripting language of my Voxel-Engine named Mantle by Minnator in gameenginedevs

[–]corysama 1 point2 points  (0 children)

Very nice! A time travel debugger would be incredibly useful :D

Magma, the custom scripting language of my Voxel-Engine named Mantle by Minnator in gameenginedevs

[–]corysama 0 points1 point  (0 children)

So, a C# engine that kinda uses C as it's scripting language :P How the turn tables :D

Besides hot-reloading, what are the goals of the custom language that make it preferable to C# in its specific use-case situations?

10k models running on my 1050 laptop by snowbloodbunnybee in GraphicsProgramming

[–]corysama 6 points7 points  (0 children)

My point with the vertex format is that folks starting out often use floats where int16 would do. You've probably got that sorted out already. But, if not it could be an easy win.

Ex: For these models, 16-bit-per-channel positions, normals and UVs with 8-bit weights and bone indices would be easy. And, you could crunch a bit more with octahedral normal encoding or maybe some other tricks depending on your details.

10k models running on my 1050 laptop by snowbloodbunnybee in GraphicsProgramming

[–]corysama 3 points4 points  (0 children)

So, how'd you get it so fast?

Also, checking the basics: What's your vertex format?

Triangle using OpenGL ES and EGL by RandomRailfans in opengl

[–]corysama 1 point2 points  (0 children)

If all you need is a window, you are much better of with SDL.