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

pcbrainbuster

Members
  • Content count

    202
  • Joined

  • Last visited

Community Reputation

100 Neutral

About pcbrainbuster

  • Rank
    Member
  1. Woot!!! Success :D. All my problems are resolved. The screen now shows the colour I expected it to and now I can render using the hardware device! As far as forgetting the Present function... what can I say? DirectX 10 makes anything that was obvious in DirectX 9 obsolete so... not my fault :P. Thanks to everyone that helped!
  2. Oh that was supposed to be BackBufferT->Release()... thanks for pointing that out but it didn't seem to change anything :S... Am I doing something that's considering wrong? because nothing is showing up...
  3. My render function is being called (RenderD3D())...
  4. Well I guess I've concluded that my graphics card isn't good enough to provide hardware acceleration. But I still have another problem now... for some reason that following code jst displays a white screen even though it should have some colour now. #include <windows.h> #include <d3d10.h> #include <d3dx10.h> #pragma comment (lib, "d3d10.lib") #pragma comment (lib, "d3dx10.lib") #define Screen_Width 640 #define Screen_Height 480 HINSTANCE hInstance = NULL; HWND hWnd = NULL; ID3D10Device* D3D = NULL; IDXGISwapChain* SwapChain = NULL; ID3D10RenderTargetView* RenderTargetView = NULL; LRESULT CALLBACK MainWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); VOID InitD3D(); VOID RenderD3D(); VOID CleanDX(); INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, INT nCmdShow) { MSG Msg; WNDCLASSEX WndClass; ZeroMemory(&WndClass, sizeof(WNDCLASSEX)); WndClass.cbSize = sizeof(WNDCLASSEX); WndClass.hbrBackground = GetSysColorBrush(COLOR_WINDOW); WndClass.hCursor = LoadCursor(NULL, IDC_ARROW); WndClass.hIcon = LoadIcon(NULL, IDI_APPLICATION); WndClass.hIconSm = LoadIcon(NULL, IDI_APPLICATION); WndClass.hInstance = hInstance; WndClass.lpfnWndProc = MainWndProc; WndClass.lpszClassName = "MainWND-Class"; WndClass.style = CS_HREDRAW | CS_VREDRAW; RegisterClassEx(&WndClass); hWnd = CreateWindowEx(NULL, WndClass.lpszClassName, "Test", WS_VISIBLE | WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, Screen_Width, Screen_Height, NULL, NULL, hInstance, NULL); UpdateWindow(hWnd); InitD3D(); while(GetMessage(&Msg, NULL, NULL, NULL) > 0) { TranslateMessage(&Msg); DispatchMessage(&Msg); RenderD3D(); } CleanDX(); return 0; } LRESULT CALLBACK MainWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { switch(Msg) { case WM_DESTROY: PostQuitMessage(WM_QUIT); break; default: DefWindowProc(hWnd, Msg, wParam, lParam); } return TRUE; } VOID InitD3D() { DXGI_SWAP_CHAIN_DESC SC_Desc; ID3D10Texture2D* BackBufferT; D3D10_VIEWPORT VP; ZeroMemory(&SC_Desc, sizeof(SC_Desc)); SC_Desc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; SC_Desc.BufferDesc.Height = Screen_Height; SC_Desc.BufferDesc.RefreshRate.Denominator = 1; SC_Desc.BufferDesc.RefreshRate.Numerator = 60; SC_Desc.BufferDesc.Scaling = DXGI_MODE_SCALING_UNSPECIFIED; SC_Desc.BufferDesc.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED; SC_Desc.BufferDesc.Width = Screen_Width; SC_Desc.BufferCount = 1; SC_Desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; SC_Desc.Flags = 0; SC_Desc.OutputWindow = hWnd; SC_Desc.SampleDesc.Count = 1; SC_Desc.SampleDesc.Quality = 0; SC_Desc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD; SC_Desc.Windowed = TRUE; D3D10CreateDeviceAndSwapChain(NULL, D3D10_DRIVER_TYPE_REFERENCE, NULL, NULL, D3D10_SDK_VERSION, &SC_Desc, &SwapChain, &D3D); SwapChain->GetBuffer(0, __uuidof(ID3D10Texture2D), (LPVOID*)&BackBufferT); D3D->CreateRenderTargetView(BackBufferT, NULL, &RenderTargetView); SwapChain->Release(); D3D->OMSetRenderTargets(1, &RenderTargetView, NULL); VP.TopLeftX = 0; VP.TopLeftY = 0; VP.Width = Screen_Width; VP.Height = Screen_Height; VP.MinDepth = 0; VP.MaxDepth = 1; D3D->RSSetViewports(1, &VP); } VOID RenderD3D() { D3D->ClearRenderTargetView(RenderTargetView, D3DXCOLOR(0, 0.5f, 0, 0)); } VOID CleanDX() { } Sigh... any ideas?
  5. It only failed under hardware mode if that's of any constellation...
  6. Alright then my card should support DirectX 10?... Man this is frustrating.... What the hell could be the cause.
  7. I got the same error for both functions for some reason :S... Alright I just went through the SDK's DirectX 10 sample programs and found that only the "EmptyProject10" file loads without asking me if I want to use a reference device... but it moved around really slowly when I dragged it which leads me to believe that it may have automatically decided to load a reference deice for me.
  8. Well I got an DXGI_ERROR_UNSUPPORTED... here's the code I used: HRESULT HR = D3D10CreateDeviceAndSwapChain(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, NULL, D3D10_SDK_VERSION, &SC_Desc, &SwapChain, &D3D); MessageBox(NULL, DXGetErrorString(HR), NULL, NULL); Any ideas on what that error code means?
  9. Well... I alredy know about the HRESULT HR = (function here) thing... but how do I actually check after that? I mean what do I do with the retrieved value?
  10. Yeah, I'm using Vista. How do I check the return code? I only know about the "FAILED" and "SUCCEEDED" macros...
  11. My graphics card is "Mobile Intel(R) 965 Express Chipset Family"... not to high-tech is it.
  12. Thanks for the posts. I checked to see if D3D10CreateDeviceAndSwapChain was the cause and it does seem to be. I used this line of code: if(FAILED(D3D10CreateDeviceAndSwapChain(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, NULL, D3D10_SDK_VERSION, &SC_Desc, &SwapChain, &D3D)) == TRUE) MessageBox(NULL, NULL, NULL, NULL); ... the message box did actually come up which tells me that something there went wrong, but what? How can I tell? Thanks.
  13. Well when the program starts I get an error message that just states that my program has stopped working. That's all.
  14. Hiya guys been a while, EDIT - Please scroll down... the nature of the problem has infact changed. Thank you. I just recently began to learn DirectX 10 after a long while without programming... and well it feels great. The problem is that I am... "stuck". Here's my current code: #include <windows.h> #include <d3d10.h> #include <d3dx10.h> #pragma comment (lib, "d3d10.lib") #pragma comment (lib, "d3dx10.lib") #define Screen_Width 640 #define Screen_Height 480 HINSTANCE hInstance = NULL; HWND hWnd = NULL; ID3D10Device* D3D = NULL; IDXGISwapChain* SwapChain = NULL; LRESULT CALLBACK MainWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); VOID InitD3D(); VOID RenderD3D(); VOID CleanDX(); INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, INT nCmdShow) { MSG Msg; WNDCLASSEX WndClass; ZeroMemory(&WndClass, sizeof(WNDCLASSEX)); WndClass.cbSize = sizeof(WNDCLASSEX); WndClass.hbrBackground = GetSysColorBrush(COLOR_WINDOW); WndClass.hCursor = LoadCursor(NULL, IDC_ARROW); WndClass.hIcon = LoadIcon(NULL, IDI_APPLICATION); WndClass.hIconSm = LoadIcon(NULL, IDI_APPLICATION); WndClass.hInstance = hInstance; WndClass.lpfnWndProc = MainWndProc; WndClass.lpszClassName = "MainWND-Class"; WndClass.style = CS_HREDRAW | CS_VREDRAW; RegisterClassEx(&WndClass); hWnd = CreateWindowEx(NULL, WndClass.lpszClassName, "Test", WS_VISIBLE | WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, Screen_Width, Screen_Height, NULL, NULL, hInstance, NULL); UpdateWindow(hWnd); InitD3D(); while(GetMessage(&Msg, NULL, NULL, NULL) > 0) { TranslateMessage(&Msg); DispatchMessage(&Msg); RenderD3D(); } CleanDX(); return 0; } LRESULT CALLBACK MainWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { switch(Msg) { case WM_DESTROY: PostQuitMessage(WM_QUIT); break; default: DefWindowProc(hWnd, Msg, wParam, lParam); } return TRUE; } VOID InitD3D() { DXGI_SWAP_CHAIN_DESC SC_Desc; ID3D10RenderTargetView* RenderTargetView; ID3D10Texture2D* BackBufferT; ZeroMemory(&SC_Desc, sizeof(SC_Desc)); SC_Desc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; SC_Desc.BufferDesc.Height = Screen_Height; SC_Desc.BufferDesc.RefreshRate.Denominator = 1; SC_Desc.BufferDesc.RefreshRate.Numerator = 60; SC_Desc.BufferDesc.Scaling = DXGI_MODE_SCALING_UNSPECIFIED; SC_Desc.BufferDesc.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED; SC_Desc.BufferDesc.Width = Screen_Width; SC_Desc.BufferCount = 1; SC_Desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; SC_Desc.Flags = 0; SC_Desc.OutputWindow = hWnd; SC_Desc.SampleDesc.Count = 1; SC_Desc.SampleDesc.Quality = 0; SC_Desc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD; SC_Desc.Windowed = TRUE; D3D10CreateDeviceAndSwapChain(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, NULL, D3D10_SDK_VERSION, &SC_Desc, &SwapChain, &D3D); SwapChain->GetBuffer(0, __uuidof(ID3D10Texture2D), (LPVOID*)&BackBufferT); D3D->CreateRenderTargetView(BackBufferT, NULL, &RenderTargetView); BackBufferT->Release(); } VOID RenderD3D() { } VOID CleanDX() { } As you can see its not complete. The problem is that when I compile the program I get an error, but when I set the device type to D3D10_DRIVER_TYPE_REFERENCE my program compiles without a problem. What I don't understand is why that little change fixes everything... I mean you need to use the reference device type only if the hardware has some sort of bug or if your graphics card simply doesn't support DirectX 10. I'm sure that my graphics card does indeed support DirectX 10 because when I open up the DirectX Diagnostic Tool ("dxdiag" in "run") it reports "DirectX 10" and the DirectX version. Do any of you guys know what's causing this problem? Thank you. [Edited by - pcbrainbuster on July 22, 2009 6:03:34 PM]
  15. Hello guys, I once used to have a program that could convert ALL sorts of different 3D program extensions(eg x, 3ds max, may...), but mycomputer messed up and I forgot the name. Could someone please tell me if they know what program I am talking about. I also recall the first letter being p... I think. Thanks alot.