• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

ekba89

Members
  • Content count

    142
  • Joined

  • Last visited

Community Reputation

788 Good

About ekba89

  • Rank
    Member
  1. I started to think that there is something wrong with that instead of me doing something wrong. We can possibly get the same behavior by using fxc with custom build step but it would be really convenient if it works.
  2. Hey. I am using Visual Studio 2013 and when I try to get assembly output by setting it in Properties in VS it gives me error: Element <AssemblerOutput> has an invalid value of "AssemblyCode". If I add /Fc [filepath] to the additional options in Properties then it outputs fine. I couldn't find anything online about this. Is there a solution for it?   Thanks
  3. I think the reason is you are not adding D3D11_CPU_ACCESS_WRITE flag to your constant buffer. Since you are writing data from CPU you need to use that flag.
  4. Yes. And if you start with the tutorial in that web page it starts with a tutorial to how to link it properly. Also I forgot to mention but Frank Luna's books are great for Direct X reference, it tells you most of the stuff that you need to know with detail. http://www.d3dcoder.net/ this is his web page and you can buy the book depending on the version of Direct X you want to learn. I am assuming you are going for Direct X 11.
  5. Hey.   1- I haven't tried Code::Blocks so I can't say anything about that but I am using Visual Studio and I am pretty happy with it. Also you might need Windows SDK or Direct X sdk. Windows SDK is newer but you need Windows 7 or 8. 2- If you really want to learn what is going on with Direct X I recommend you to create your own small applications. Since most of the game engines hide the complexities from the user it is hard to learn really what is going on by learning a game engine. 3-http://www.rastertek.com/
  6. What you can do is create a wrapper class for the D3D10_RASTERIZER_DESC which sets everything to its default value. Then you can change only the values you want. So you don't have to type that all the time. In my case I created a wrapper class with D3D11_RASTERIZER_DESC(I'm using DirectX 11) as its private member. But you can also create a struct or class that inherits from D3D10_RASTERIZER_DESC.
  7. It makes sense that different shaders have different constant buffers. One trick that you can do if you are trying to get some global variables is you can create a header file. // MyGlobalShaderHeader.hlsli cbuffer globalEveryFrame : register(b0) { matrix viewMatrix; float4 elapsedTime; // size needs to be multiple of 16 anyways } And lets say you are using this for vertex shader. Then you can set it once in the beginning of rendering deviceContext->VSSetConstantBuffers(0, 1, &myBuffer); Now you can use it for all the vertex shaders that include that header. Only thing you need to be careful about is you have to make sure that you don't change register 0 between shaders that need those global variables.   So if you are trying to create a global buffer you can use that trick. But if those variables are shader specific I think it is better idea to have different constant buffers for different shaders. It is much more manageable that way. So every material can know which buffers they are responsible from.   One side not though as I wrote in the comment above constant buffers are automatically become multiple of 16 bytes. So lets say you put 1 float2 and 1 float it occupies float4 space. So when you are setting your bytewidth it needs to be multiple of 16 bytes otherwise you will get an error.
  8. Yeah that fixed my problem thanks for the help.
  9. Thanks for the answer. Yeah I need linear filtering so I will try changing my texture to r32g32b32a32.
  10. I have a height map in my vertex shader that I use to move the vertex to right height. I use r32g32b32 texture. But when I create graphics device with debug flag I get the error below. Even though it shows me error everything works fine I mean I get the right height for the terrain. So do I need to change the format of my texture or is there a way to sample r32g32b32 textures on vertex shader? D3D11 ERROR: ID3D11DeviceContext::DrawIndexed: The Shader Resource View in slot 1 of the Vertex Shader unit is using the Format (R32G32B32_FLOAT). This format does not support 'Sample', 'SampleLevel', 'SampleBias' or 'SampleGrad', at least one of which may being used on the Resource by the shader. The exception is if the corresponding Sampler object is configured for point filtering (in which case this error can be ignored). This also only applies if the shader actually uses the view (e.g. it is not skipped due to shader code branching). [ EXECUTION ERROR #371: DEVICE_DRAW_RESOURCE_FORMAT_SAMPLE_UNSUPPORTED]
  11. Your vector should be like [ 1.0 ] [ 2.0 ] [ 0.0 ] [ 1.0 ] since you are using row major and your vector should be on the left side of your matrix when you are multiplying. (V x M).   Yes but you should take scaling into consideration so you need to normalize each axis.   Your result vector's x component is effected by first column of the matrix, y is effected by second column and so on. And as a result you get another row vector. I suggest you to read some tutorials about matrices if you are having trouble with multiplication before starting to get deeper since you will need a good understanding for the basics.  
  12.   You might have different render states for different models. So you have to change them depending on what you are trying to do. But for the normal 3D rendering default settings should suffice. If all your models are using default render states you just need to set them once in the beginning of your application. But as I said SpriteBatch changes it before it does its 2D rendering. So if you are using SpriteBatch and some 3D models you need to reset your render states every time before you render your 3D models.
  13. It looks like you have problem with your depth stencil state. If you are using SpriteFonts they might change your render states so you need to reset them before 3D rendering. Try to put the code below just before your rendering. GraphicsDevice.BlendState = BlendState.Opaque; GraphicsDevice.DepthStencilState = DepthStencilState.Default;
  14. I think you can do it using USAGE_DEFAULT and using UpdateSubresource function and you should remove CPU_ACCESS_WRITE to use USAGE_DEFAULT.
  15. For the dynamic textures you can't do more than 1 mip levels. If you enable the debug mode it says this.   D3D11 ERROR: ID3D11Device::CreateTexture2D: A D3D11_USAGE_DYNAMIC Resource must have MipLevels equal to 1. [ STATE_CREATION ERROR #102: CREATETEXTURE2D_INVALIDMIPLEVELS]