• 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.

Magnar Harestad

  • Content count

  • Joined

  • Last visited

Community Reputation

99 Neutral

About Magnar Harestad

  • Rank
  1. This is the shader code. And, to be honest, this is straight off from the tutorial. [font="Consolas"][size="2"][font="Consolas"][size="2"]struct VOut[/size][/font][/size][/font] [font="Consolas"][size="2"][font="Consolas"][size="2"]{[/size][/font][/size][/font] [font="Consolas"][size="2"][font="Consolas"][size="2"]float4 position : SV_POSITION;[/size][/font][/size][/font] [font="Consolas"][size="2"][font="Consolas"][size="2"]float4 color : COLOR;[/size][/font][/size][/font] [font="Consolas"][size="2"][font="Consolas"][size="2"]};[/size][/font][/size][/font] [font="Consolas"][size="2"][font="Consolas"][size="2"]VOut VShader(float4 position : POSITION, float4 color : COLOR)[/size][/font][/size][/font] [font="Consolas"][size="2"][font="Consolas"][size="2"]{[/size][/font][/size][/font] [font="Consolas"][size="2"][font="Consolas"][size="2"]VOut output;[/size][/font][/size][/font] [font="Consolas"][size="2"][font="Consolas"][size="2"]output.position = position;[/size][/font][/size][/font] [font="Consolas"][size="2"][font="Consolas"][size="2"]output.color = color;[/size][/font][/size][/font] [font="Consolas"][size="2"][font="Consolas"][size="2"]return output;[/size][/font][/size][/font] [font="Consolas"][size="2"][font="Consolas"][size="2"]}[/size][/font][/size][/font] [font="Consolas"][size="2"][font="Consolas"][size="2"]?[/size][/font][/size][/font] [font="Consolas"][size="2"][font="Consolas"][size="2"]float4 PShader(float4 position : SV_POSITION, float4 color : COLOR) : SV_TARGET[/size][/font][/size][/font] [font="Consolas"][size="2"][font="Consolas"][size="2"]{[/size][/font][/size][/font] [font="Consolas"][size="2"][font="Consolas"][size="2"]return color;[/size][/font][/size][/font] [font="Consolas"][size="2"][font="Consolas"][size="2"]}[/size][/font][/size][/font]
  2. [quote name='Bacterius' timestamp='1335512761' post='4935317'] You should be putting a breakpoint in your application's entry and stepping until you encounter the crash (or just spam printf's everywhere), it's probably not DirectX that's failing here but StdAfx.h, since you said previous examples work. [/quote] I also had to put in #include <StdAfx.h> on the other examples (the white screen and the blue screen), and both of those examples worked. So I kind of think that the StdAfx.h is just needed for Visual Studio itself to easier rebuild the headers etc. And that part works fine. The problems seems to me to be either the load of the shaders.hlsl file doesn't work as intended, or there is something else that does work with the shader function invoked. Very strange, though?
  3. Hi again, It seems to be a issue on the shader load. On the last line of the code in the text-cut below is where the debugger crashes. [font="Consolas"][size="2"][color="#008000"][font="Consolas"][size="2"][color="#008000"][font="Consolas"][size="2"][color="#008000"]// this function loads and prepares the shaders[/color][/size][/font][/color][/size][/font][/color][/size][/font] [font="Consolas"][size="2"][color="#0000ff"][font="Consolas"][size="2"][color="#0000ff"][font="Consolas"][size="2"][color="#0000ff"]void[/color][/size][/font][/color][/size][/font][/color][/size][/font][font="Consolas"][size="2"][font="Consolas"][size="2"] InitPipeline()[/size][/font][/size][/font] [font="Consolas"][size="2"][font="Consolas"][size="2"]{[/size][/font][/size][/font] [font="Consolas"][size="2"][color="#008000"][font="Consolas"][size="2"][color="#008000"][font="Consolas"][size="2"][color="#008000"]// load and compile the two shaders[/color][/size][/font][/color][/size][/font][/color][/size][/font] [font="Consolas"][size="2"][font="Consolas"][size="2"]ID3D10Blob *VS, *PS;[/size][/font][/size][/font] [font="Consolas"][size="2"][font="Consolas"][size="2"]D3DX11CompileFromFile(L[/size][/font][/size][/font] [font="Consolas"][size="2"][color="#a31515"][font="Consolas"][size="2"][color="#a31515"][font="Consolas"][size="2"][color="#a31515"]"shaders.hlsl"[/color][/size][/font][/color][/size][/font][/color][/size][/font][font="Consolas"][size="2"][font="Consolas"][size="2"], 0, 0, [/size][/font][/size][/font][font="Consolas"][size="2"][color="#a31515"][font="Consolas"][size="2"][color="#a31515"][font="Consolas"][size="2"][color="#a31515"]"VShader"[/color][/size][/font][/color][/size][/font][/color][/size][/font][font="Consolas"][size="2"][font="Consolas"][size="2"], [/size][/font][/size][/font][font="Consolas"][size="2"][color="#a31515"][font="Consolas"][size="2"][color="#a31515"][font="Consolas"][size="2"][color="#a31515"]"vs_5_0"[/color][/size][/font][/color][/size][/font][/color][/size][/font][font="Consolas"][size="2"][font="Consolas"][size="2"], 0, 0, 0, &VS, 0, 0);[/size][/font][/size][/font] [font="Consolas"][size="2"][font="Consolas"][size="2"]D3DX11CompileFromFile(L[/size][/font][/size][/font] [font="Consolas"][size="2"][color="#a31515"][font="Consolas"][size="2"][color="#a31515"][font="Consolas"][size="2"][color="#a31515"]"shaders.hlsl"[/color][/size][/font][/color][/size][/font][/color][/size][/font][font="Consolas"][size="2"][font="Consolas"][size="2"], 0, 0, [/size][/font][/size][/font][font="Consolas"][size="2"][color="#a31515"][font="Consolas"][size="2"][color="#a31515"][font="Consolas"][size="2"][color="#a31515"]"PShader"[/color][/size][/font][/color][/size][/font][/color][/size][/font][font="Consolas"][size="2"][font="Consolas"][size="2"], [/size][/font][/size][/font][font="Consolas"][size="2"][color="#a31515"][font="Consolas"][size="2"][color="#a31515"][font="Consolas"][size="2"][color="#a31515"]"ps_5_0"[/color][/size][/font][/color][/size][/font][/color][/size][/font][font="Consolas"][size="2"][font="Consolas"][size="2"], 0, 0, 0, &PS, 0, 0);[/size][/font][/size][/font] [font="Consolas"][size="2"][color="#008000"][font="Consolas"][size="2"][color="#008000"][font="Consolas"][size="2"][color="#008000"]// encapsulate both shaders into shader objects[/color][/size][/font][/color][/size][/font][/color][/size][/font] [font="Consolas"][size="2"][font="Consolas"][size="2"]dev->CreateVertexShader(VS->GetBufferPointer(), VS->GetBufferSize(), NULL, &pVS);[/size][/font][/size][/font] [font="Consolas"][size="2"][font="Consolas"][size="2"]The Debugger error is:[/size][/font][/size][/font] [font="Consolas"][size="2"][font="Consolas"][size="2"]Unhandled exception at 0x771115de in DirectX_Test.exe 0xc0000005: Access violation reading location 0x00000000.[/size][/font][/size][/font] [font="Consolas"][size="2"][font="Consolas"][size="2"]The shaders.hlsl file is part of the project together with the cpp file. And the shaders file includes the code that is on the tutorial webpage. [/size][/font][/size][/font] [font="Consolas"][size="2"][font="Consolas"][size="2"]Why is it crashing on the dev->CreateVertexShader line?[/size][/font][/size][/font]
  4. I might add to say that all examples before the triangle is to be drawn works fine. So the first example of the "white screen" works. Also the "blue screen" example works. But not the example where it draws the triangle.
  5. Hi, I've tried to use the code example from DirectX Tutorial.com to create a basic triangle in a DirectX win32 application. Project built in Visual Studio, library paths fixed etc. Tried to change driver specification from HARDWARE to REFENCE, didn't solve crash issue. Tutorial code I tried to use was: [url="http://www.directxtutorial.com/Tutorial11/B-A/BA5.aspx#still"]http://www.directxtu.../BA5.aspx#still[/url] Picture of crash: [url="http://www.harestad.info/pictures/DirectX3d_Crash.jpg"]http://www.harestad....ctX3d_Crash.jpg[/url] I also had to add #include <StdAfx.h> at start of project, otherwise the build would not work in Visual Studio. Which wasn't mentioned in the code example on the tutorial place. When I add it, build goes ok, but a Error comes that says it cannot find it. 1 IntelliSense: cannot open source file "StdAfx.h" c:\users\administratör\documents\visual studio 2010\projects\directx_test\directx_test\directx_test.cpp 2 2 DirectX_Test [font=Consolas][size=1][font=Consolas][size=1]1>------ Build started: Project: DirectX_Test, Configuration: Debug Win32 ------[/size][/font][/size][/font] [font=Consolas][size=1][font=Consolas][size=1]1> DirectX_Test.cpp[/size][/font][/size][/font] [font=Consolas][size=1][font=Consolas][size=1]1> DirectX_Test.vcxproj -> C:\Users\Administratör\documents\visual studio 2010\Projects\DirectX_Test\Debug\DirectX_Test.exe[/size][/font][/size][/font] [font=Consolas][size=1][font=Consolas][size=1]========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========[/size][/font][/size][/font] Anyone able to figure out why my application after build doesn't work? And why I need to put that include of StdAfx.h - that Visual Studio cannot even find? Cheers Magnar
  6. Guys, how did you make the examples work from that tutorial site? All that happens when I build that project is that the build goes OK - but when I run the file the application itself crashes. Regardless if I use reference or hardware mode on the driver settings... Any ideas why it crashes? The white window with the DirectX application do turn up on the screen - but it crashes direct after. Magnar