Jump to content
  • Advertisement

Jiraya

Member
  • Content count

    12
  • Joined

  • Last visited

Community Reputation

108 Neutral

About Jiraya

  • Rank
    Member

Personal Information

  • Interests
    Art
    Design
    Programming
  1. Thanks everyone, you were really helpful. Also, if anyone stumbles in this topic in the future, I've found a link with some good resources about memory and cache: https://gist.github.com/ocornut/cb980ea183e848685a36
  2. You guys are right. It's not the stack, but it's not the heap either. Also, I should apologize for the mistake, since in the book the author doesn't mention anywhere that it's on the stack, so it's a mistake on my part. About the "data segment", if these globals contain any member pointer variables, and I allocate memory dynamically on these "startUp()" calls, I suppose this newly allocated memory will reside in the heap then. Since they're basically on different memory regions, will dereferencing the pointer be slower?
  3. I'm reading the book "Game Engine Architecture" where the author suggests declaring singletons as global variables, and later initialize each of them inside main() in the correct order. Example from the book: RenderManager gRenderManager; PhysicsManager gPhysicsManager; AnimationManager gAnimationManager; TextureManager gTextureManager; VideoManager gVideoManager; MemoryManager gMemoryManager; FileSystemManager gFileSystemManager; // ... int main( int argc, const char * argv ) { // Start up engine systems in the correct order. gMemoryManager.startUp(); gFileSystemManager.startUp(); gVideoManager.startUp(); gTextureManager.startUp(); gRenderManager.startUp(); gAnimationManager.startUp(); gPhysicsManager.startUp(); // ... // Run the game. gSimulationManager.run(); // Shut everything down, in reverse order. // ... gPhysicsManager.shutDown(); gAnimationManager.shutDown(); gRenderManager.shutDown(); gFileSystemManager.shutDown(); gMemoryManager.shutDown(); return 0; } Isn't it risky to create all these singletons on the stack? I mean, depending on the situation won't I get a stack overflow or something like that? I apologize if it's a silly question, I'm just a little confused about the topic of where and when to allocate memory.
  4. For a 2D game, does using a float2 for position increases performance in any way? I know that in the end the vertex shader will have to return a float4 anyway, but does using a float2 decreases the amount of data that will have to be sent from the CPU to the GPU?
  5. Old or new, it seems Microsoft does exactly the same thing: https://github.com/Microsoft/WPFDXInterop/search?utf8=✓&q=d3d9&type= Apparently, this is done because WPF is implemented in D3D9 (probably for hardware compatibility purposes). I guess it works, but not without its problems: https://github.com/Microsoft/WPFDXInterop/issues
  6. Hi Marcus, thanks for the reply! But isn't this pure Win32 API style? I meant using C# and Windows Forms. I've found a tutorial here in gamedev that shows a way how to do it. But I'm not sure if it would work in D3D11. I've posted the link in the first post.
  7. WPF seems interesting, but apparently you're forced to use D3D9 for displaying a Direct3D Surface/Frame? http://jmorrill.hjtcentral.com/Home/tabid/428/EntryId/437/Direct3D-10-11-Direct2D-in-WPF.aspx https://social.msdn.microsoft.com/Forums/en-US/9e203954-03e3-4efc-972c-548eaa6ae815/wpf-using-directx-11?forum=wpf
  8. I am aiming to learn Windows Forms with the purpose of creating some game-related tools, but since I know absolutely nothing about Windows Forms yet, I wonder: Is it possible to render a Direct3D 11 viewport inside a Windows Form Application? I see a lot of game editors that have a region of the window reserved for displaying and manipulating a 3D or 2D scene. That's what I am aiming for. Otherwise, would you suggest another library to create a GUI for game-related tools? EDIT: I've found a tutorial here in gamedev that shows a solution: Though it's for D3D9, I'm not sure if it would work for D3D11?
  9. Oops, you're right. Thanks for pointing that out
  10. I don't have a company myself, but I think this course is somewhat useful: https://www.lynda.com/Business-Skills-tutorials/Start-Your-Own-Game-Company-John-Romero/435009-2.html It's by John Romero, and he gives some insights he'd learned. I know little about trademarks, but I'm curious as well. I don't think you need a legal entity for an international release on Steam, but if you were to trademark the IP (which is a good idea if you believe in your game's potential), I think it would be a good idea to do so as a legal entity: https://www.zarmoney.com/blog/its-not-personal-its-business.-how-to-separate-your-personal-assets-from-your-businesses-liabilities But I'm a newbie, so don't take my word for it. Keep asking around
  11. Thanks Hodgman! For some reason I thought games compiled shaders at the user's machine before execution. I'm glad this is simpler than I thought.
  12. From what the MSDN states, there are two ways of compiling HLSL shaders: either at runtime or "offline" -- using a tool like fxc.exe, for instance My question is, are there any risks in using pre-compiled shaders in the final game? I mean, is there any situation in which the pre-compiled shaders might not work? Or ideally shaders should always be compiled when lauching the game?
  13. Hello everyone, I'm learning DirectX 11 and I see tutorials that make use of WVP matrices in order to transform an object from local/model coordinates to world coordinates, then to camera space, and finally to projection/clip space. But all of these tutorials are aimed at 3D game development, and thus I am curious to know: do I need any of these transforms at all in 2D games? Because there are only 2 axis, right? Aren't  most objects in 2D games  made out of primitives/quads, so there is no need to "import" models from different formats that belong to different coodinate systems?   I apologize if this is a silly question, and sorry for bad english.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!