• 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.
Sign in to follow this  
Followers 0
Vignesh Technologist

pls help me with few directx doubts... Am a beginner

8 posts in this topic

Hello, i am a beginner in game programming and i am learning direct x 10 from the book 'intro. To 3d game programming with direct x 10' . I have lots of doubts.Please help me 1. Most of the time i am confused with view matrix and projection matrix.
ie i am lost in 3d space. I placed a triangle pyramid at the centre with co-ordinates
-1 0 1 , 0 1 1 , 1 0 1,
-1 0 4 , 0 1 4 , 1 0 4

and used index buffer to specify indices .... And i am sure that it is correct... Now i am problem with view and projection matrix

D3DXMatrixPerspectiveForLH(&proj, 0.5f * D3DX_PI , aratio , 1, 1000);

D3DXMatrixLookAtLH(&View , &pos , &target , &up);

where pos = 0 4 -1 target = 0 1 1

now what i see is a screen shows is a single color which i set for second vortex. I didn't see any 3d object.... I am sure that the problem is with placing virtual camera . Please help me with this problem on how to place the camera and what should me its projection matrix .....

2. How to program a 3d navigable interface just like in first person games and one additional thing is that if i want to go up i should be able to go in that direction....
At lease i myself move around that 3d space and look around for that object that i have placed there.

3. To display text I used GDI textout fn but it is not displayed.. So how to use gdi with direct 3D
(I know Win32 api for a good extent)
0

Share this post


Link to post
Share on other sites
[quote name='rockvignesh25' timestamp='1355895587' post='5012342']
please bear me with spellings ... I am lazy in typing
[/quote]

Don't take my word from it, but i've heard that Directx 10 is kinda, well... not used much. Directx 9 or 11 are the most used ones. Why you choose Directx 10?
0

Share this post


Link to post
Share on other sites
[quote]
Don't take my word from it, but i've heard that Directx 10 is kinda, well... not used much. Directx 9 or 11 are the most used ones. Why you choose Directx 10?
[/quote]

I believe that DX9 is supported still simply because older cards still cling to it but aren't up to DX10, DX10 is for newer cards on XP, DX11 ships with Win7 only.

DX10's advantage over DX9 is more shader flexibility. And a little performance. But that's about it. I really cannot claim to know more on the subject difference between the two.
0

Share this post


Link to post
Share on other sites
[quote name='Morley' timestamp='1355936141' post='5012488']
I believe that DX9 is supported still simply because older cards still cling to it but aren't up to DX10, DX10 is for newer cards on XP, DX11 ships with Win7 only.
[/quote]
Morley, DirectX 10 doesn't work with XP. It was one of the big reasons PC gamers jumped on Vista: the first Windows OS to actually support DX10 code. Anything on XP has to resort to DX9.0c features.

DirectX 11 is able to down-level to DX10 feature levels, and runs on Vista, which is why 11 is more prevalent than 10: if you're targeting DX10, you can use DX11, because you've already excluded XP users.

Rockvignesh25: have you defined your viewport? That helps the rendering pipeline determine where matrix-transformed pixels actually appear relative to the display buffer's borders.
1

Share this post


Link to post
Share on other sites
[quote name='BCullis' timestamp='1355937284' post='5012500']
[quote name='Morley' timestamp='1355936141' post='5012488']
I believe that DX9 is supported still simply because older cards still cling to it but aren't up to DX10, DX10 is for newer cards on XP, DX11 ships with Win7 only.
[/quote]
Morley, DirectX 10 doesn't work with XP. It was one of the big reasons PC gamers jumped on Vista: the first Windows OS to actually support DX10 code. Anything on XP has to resort to DX9.0c features.

DirectX 11 is able to down-level to DX10 feature levels, and runs on Vista, which is why 11 is more prevalent than 10: if you're targeting DX10, you can use DX11, because you've already excluded XP users.

Rockvignesh25: have you defined your viewport? That helps the rendering pipeline determine where matrix-transformed pixels actually appear relative to the display buffer's borders.
[/quote]

vp.topleftx = 0
vp.toplefty = 0
vp.width = 1600 // my screen resolution
vp.height = 900
vp.mindepth = O.O
vp.maxdepth = 1.0
0

Share this post


Link to post
Share on other sites
pls anybody teach me abt placing this so called 'virtual camera' and also about its projection matrix in detail

i choose direct x 10 because i have bought the book for it .... I have also found that 11 and 10 are almost same (from program code point of view) and i thought it would be easy for me to get used with it.
-1

Share this post


Link to post
Share on other sites
the "virtual camera" is just the easiest way to think about, and group, properties related to calculating your view and projection matrices.
At its core, the common "camera" class has a world-space position, relative to a world-space origin. This position is used to create the "lookat" matrix, or your view matrix, which has the effect of rotating and translating vertex data (defined in world space) so that it is rendered relative to where you've placed the virtual camera, giving the effect of viewing the scene from the camera's location.

The perspective projection matrix creates the depth effect of 3d by making further objects appear smaller and creating the parallax scrolling effect of distant objects moving across your view slower than near objects. It is also responsible for translating data in view-space to screen-space. It uses field-of-view (FOV) angle, aspect ratio of the screen (or render window), and near- and far-plane distance values to calculate a 3d frustum volume representing everything the camera can see in view-space.

The key to their interaction is [b]multiplication order[/b]. The standard path is to multiply scene objects (specifically their vertices) by their world matrix (not necessary in your case, you've explicitly placed the triangle, but something you could use to move said triangle around if you wanted), then by the view matrix (orients the scene to where your camera is looking) and finally by the perspective matrix (to convert to screen-space). My first guess is you've got the multiplication order backwards. (This is much easier to detect when you have controls in place to move the camera around.)
0

Share this post


Link to post
Share on other sites
[quote name='Morley' timestamp='1355936141' post='5012488']
[quote]
Don't take my word from it, but i've heard that Directx 10 is kinda, well... not used much. Directx 9 or 11 are the most used ones. Why you choose Directx 10?
[/quote]

I believe that DX9 is supported still simply because older cards still cling to it but aren't up to DX10, DX10 is for newer cards on XP, DX11 ships with Win7 only.

DX10's advantage over DX9 is more shader flexibility. And a little performance. But that's about it. I really cannot claim to know more on the subject difference between the two.
[/quote]
DX9 is still supported because the PS3 and X360 only support DX9+ level features(PS3 doesn't support D3D at all btw), it has nothing to do with older cards. DX 10 and 11 ship from Vista not what you said and since DX11 support feature levels there is no reason other then the consoles to support a DX9 path. We dropped PC DX9 support with DiRT: Showdown, but where thinking of doing this on DiRT 3 already.

[quote name='rockvignesh25' timestamp='1355980661' post='5012711']
pls anybody teach me abt placing this so called 'virtual camera' and also about its projection matrix in detail

i choose direct x 10 because i have bought the book for it .... I have also found that 11 and 10 are almost same (from program code point of view) and i thought it would be easy for me to get used with it.
[/quote]
Then start coding for 11, nowadays learning DX10 has no uses what so ever, jobs ask for DX11 or OpenGL 4 now. Also DX 11 fixed a few things that DX 10 got wrong. Edited by NightCreature83
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0