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

Archived

This topic is now archived and is closed to further replies.

Evil Steve

CreateDevice() Returns D3DERR_NOTAVAILABLE

9 posts in this topic

I'm trying this little D3D9 test app. It runs fine on my GeForce4, on my server with only onboard gfx, and on my dads PC (Win98, TNT2). However, it refuses to run on my mates computer (TNT2, WinXP). When it gets to CreateDevice(), it returns D3DERR_NOTAVAILABLE ("This device does not support the queried technique"). But i don't know what parameter its objecting to. Here's how i set up the presentation params:
ZeroMemory(&m_thePresentParams,sizeof(m_thePresentParams));
m_thePresentParams.BackBufferWidth = m_vModes[m_nSelectedMode].nWidth;
m_thePresentParams.BackBufferHeight = m_vModes[m_nSelectedMode].nHeight;
m_thePresentParams.BackBufferCount = 2;
m_thePresentParams.MultiSampleType = D3DMULTISAMPLE_NONE;
m_thePresentParams.MultiSampleQuality = 0;
m_thePresentParams.SwapEffect = D3DSWAPEFFECT_DISCARD;
m_thePresentParams.hDeviceWindow = m_hWnd;
m_thePresentParams.Windowed = TRUE;
m_thePresentParams.BackBufferFormat = D3DFMT_UNKNOWN;
m_thePresentParams.EnableAutoDepthStencil = FALSE;
m_thePresentParams.AutoDepthStencilFormat = D3DFMT_UNKNOWN;
m_thePresentParams.Flags = 0;
m_thePresentParams.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT;
m_thePresentParams.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
And i create the device like so:
hResult = m_pD3D->CreateDevice(D3DADAPTER_DEFAULT,D3DDEVTYPE_HAL,m_hWnd,D3DCREATE_SOFTWARE_VERTEXPROCESSING,&m_thePresentParams,&m_pDevice);
And at the call to CreateDevice(), hResult == D3DERR_NOTAVAILABLE. I've made sure my mate has DX9 installed, and has the latest drivers. Anyone know whats going on here? [edited by - Evil Steve on August 19, 2003 11:53:30 AM]
0

Share this post


Link to post
Share on other sites
DX9 requires DX7+ drivers. Most probably, the drivers you have are pre DX7 drivers, so DX9 is not available, and you''ll have to use DX8.1- on these devices/drivers.
Are you using the latest drivers?
0

Share this post


Link to post
Share on other sites
If is running en WinXP the Drivers are Direct3D 8.x, becose XP got TNT2 Drivers and DX8. But I am not sure if you can use 2 BackBuffers in Windowed Mode.

This is from de MSDN-DirectX Reference

"The method fails if one back buffer cannot be created. The value of BackBufferCount influences what set of swap effects are allowed. Specifically, any D3DSWAPEFFECT_COPY swap effect requires that there be exactly one back buffer."


Sorry for my English.

0

Share this post


Link to post
Share on other sites
Coder: I got him to downlaod the latest drivers (released 13th Aug 2003), and If DX9 was unavailiable (as it was when he first etsted my app), it''d say that the file d3d9.dll could not be found.

SergioJdelos: It works on all the other cards, and i have the swap effect set to D3DSWAPEFFECT_DISCARD. Also, it fails in fullscreen mode (same error), so i don''t think thats the problem.

Thanks for the replies,
Steve
0

Share this post


Link to post
Share on other sites
Alright, i've found the problem, but not the solution. That code i pasted is wrong (its from a newer version of the test app). My mates card doesn't seem to like having a Z-Buffer.
This works:
m_thePresentParams.AutoDepthStencilFormat = D3DFMT_UNKNOWN;
m_thePresentParams.EnableAutoDepthStencil = FALSE;

But this doesn't:
m_thePresentParams.AutoDepthStencilFormat = D3DFMT_D24S8
m_thePresentParams.EnableAutoDepthStencil = TRUE;

I got him to run the DX Caps viewer, and it says that his card supports D3DFMT_D24S8 for fullscreen and windowed mode.

Anyone know what on earth is going on here???

Cheers,
Steve

[edited by - Evil Steve on August 19, 2003 1:20:38 PM]
0

Share this post


Link to post
Share on other sites
That is 32Bit. 24 bits depth, 8 bits stencil.

Edit: CheckDepthStencilMatch(3DADAPTER_DEFAULT,D3DDEVTYPE_HAL,D3DFMT_X8R8G8B8,D3DFMT_X8R8G8B8,D3DFMT_D24S8) Succeeds also.


[edited by - Evil Steve on August 19, 2003 2:08:49 PM]
0

Share this post


Link to post
Share on other sites
I mean In TNT, and i belive geforce256 too, you must set 32Bits for Screen to use 32Bits in Depth/Stencil Buffers, that is 32Bits for colors, 24 for Depth Buffer and 8 For stencil(D3DFMT_X8R8G8B8 for Screen,D3DFMT_X8R8G8B8 for BackBuffer and D3DFMT_D24S8 for Depth/Stencil is OK).
If you check if the adapter work in 32Bits will return Succeeds becose the HW Support It, but you must Set the Display Settings to 32Bits(Color and Depth/stencil) to use it. In OpenGL is the same.
If you use 16 desk color in D3D you will not have Stencil and 24Bits Depth Buffer, and in OpenGL will run emulated in software.

If is not that i don´t know.

Again sorry for my english.
0

Share this post


Link to post
Share on other sites
Ah, right. Well, its already running in 32-bit (for both fullscreen and windowed). The video setting that it loads are 800x600x32 at the moment.
0

Share this post


Link to post
Share on other sites
quote:
Original post by Evil Steve
Coder: I got him to downlaod the latest drivers (released 13th Aug 2003), and If DX9 was unavailiable (as it was when he first etsted my app), it''d say that the file d3d9.dll could not be found.

No. If the DX9 runtime''s installed, but the driver doesn''t support d3d9 (i.e. a pre-dx7 driver) the d3d9.dll file will be found, and the d3d9 object will be created, but you''ll get a D3DERR_NOTAVAILABLE error on CreateDevice (tried it myself).

Anyway, I don''t know anything to help you with your problem. Maybe try one of the SDK samples on his PC, and check which DepthStencil format it used?

0

Share this post


Link to post
Share on other sites