Sorry this one took extra time to come out - I actually had it finished on Monday but I wasn't happy with it so I spent the next few days remaking most of it. I hope I managed to meet everyone's expectations!
hey,I am trying to make a small framework for gamedev.I am unable to figure out how to abstract away the platform-specefic implementation for window creation and the likes.Can you make a video on it?
@@zealous_carrot8744 Currently I'm making a small game in C and making tutorials about each part of that. Once the game itself is done I'll be porting it to Linux and as part of that I'll probably abstract the platform specific code into a reusable library, so that tutorial is coming but it's quite a ways off. In the meantime, a tip about how to do it: design the API you want first, then create the code to fit it.
I've been using gdb, however it's been failing to perform stack traces when a multi threaded program crashes, so often I just use good old printf debugging. I'll end up trying some other debuggers when the interest strikes.
Do you mean, rather than capturing mouse move events from windows which give you the pixel position of the mouse, instead handling the signals from the mouse driver directly? I've never looked into it before but it sounds like an interesting idea, especially to achieve higher precision. I'll put it on my radar :)
@@UltimaN3rd yes, higher precision and presumably lower latency. Also bypasses stupid settings for gaming like mouse acceleration. Checkout WM_INPUT docs.microsoft.com/en-us/windows/win32/dxtecharts/taking-advantage-of-high-dpi-mouse-movement?redirectedfrom=MSDN#wm_input docs.microsoft.com/en-us/windows/win32/inputdev/about-raw-input It's definitely a preferred way for games to do it this way. And it would be cool to se a similar tutorial like yours to go over an actual real concept which is used in modern games.
@@OxxidCZ Yes I see, that would certainly be the way to do it in any game that doesn't directly map the mouse to pixels. I think the way I showed in the video is fine for most 2d games but any 3d game with the mouse mapped to the camera or suchlike would definitely benefit from raw input. Thank you for bringing that to my attention; in the future when I'm doing 3d tutorials I'll be sure to implement this type of input.