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

Multiple Objects in buffer

5 posts in this topic

Im not sure the Topic Title is abstract or on the money but it's the closest I can come to articulating my problem

 

lets say I have a quad in the background and then I decide to load a cube atop of it.

 

The problem I have been having is that whatever order I load the buffers for said object, lets

 

say:

 

   loadContent.Quad();

   loadContent.Cube();

 

Since the Cube was called last it will be the only thing that will be rendered. This is all being done in perspectiveLH projection

 

Should I give them each their own Shaders and Buffers? That it seems would be the brute force approach. Maybe im missing something.

 

I tired to include them both in one draw call then I present the swap Chain, that didn't work.

 

So then I tried to draw object to the backBuffer then the next and then present, still with the same lingering problem.

 

I am positive this pertains to Z-Buffering. I set up a depth-Stencil-View.

 

Any help would be appreciated

 

 

 

I am using C++ and D3D11

 

-Marcus Hansen

0

Share this post


Link to post
Share on other sites

It's never a good idea to start optimizing so soon for the very simple fact that you don't really know how many other effects there will be by the time the game is programmed (you think you know, but you don't, really).

 

Always keep a brute-force renderer (VB per each object) up-to-date and when the feature-set of the engine is finally finished, only then go about putting them to a single VB/IB, or grouping render calls by texture/shader/whatever.

 

There could be million reasons why you don't see the second object:

- incorrect matrices

- incorrect position of the object

- incorrect lighting

- the object is hidden by some other object

- object is outside view frustum

- object is rendered to a different RT

- .....

0

Share this post


Link to post
Share on other sites

Thanks for the reply,

 

I think your correct, optimizations are to early a consideration for now.

 

The idea of Brute force approach with the VB/IB was something I was trying to avoid

 

but since I am working with so little I doubt it will make a difference.

 

Once again thank you for answering my question

0

Share this post


Link to post
Share on other sites

You know, it may seem like it is a good idea to introduce an optimization or two, thinking you may actually save the time later.

 

 

But the first time I actually wrote the optimization render methods, it took me less than an afternoon to write one method that renders everything from a single static VB/IB and another method that renders eveything from a dynamic VB recreated based on current view frustum.

 

The point is, you won't save the time, since every time you'll make some adjustments to a scene, you have to deal with the early optimization too, thus prolonging the debugging, which is going to happen perhaps even hundred times before you actually get to doing the optimizations.

 

And, most important of all, if this VB/IB access is not actually a bottleneck, you just lost yourself a lot of time for no particular gain...

 

Of course, there's no better way to remember it than banging your head on the wall afterwards smile.png

0

Share this post


Link to post
Share on other sites

Learning a Graphics API is no easy feat whether it be OpenGL or DirectX.

 

The number one Headache is simply remembering the API function calls

 

and knowing what combination of parameters to send to the individual functions

 

to obtain what your after. I'm sure a lot of that calms down a bit once you get more comfortable

 

with the API your using and graphics in general.

 

Thank Goodness for intellisense smile.png  

 

Also I just recently made the jump from pure Java and playing with OpenGL ES 1.0

 

to C++, it seems syntactically their similar. But your no longer given the abstraction

 

and automatic Garbage Collection provided by the JVM( that could be Good thing)

 

 

Sorry I seem to have embarked on a tangent, thanks for the advice!

 

Ill try to stick with the multiple VB/IB's brute force approach until I become more

 

comfortable with DirectX

 

-Marcus Hansen

0

Share this post


Link to post
Share on other sites

The number one Headache is simply remembering the API function calls

Why would you even want to remember them ? When programming, just keep the DX Docs open and do a search every time you use some fn.

 

It is actually dangerous to just remember the parameters. You always want to check the other behaviour of the fn that is mentioned in the docs.

 

 

The time you save by remembering the parameters is nothing compared to the time you loose when stuff stops working and it's only after you finally consult the dx docs [with the error you were given] you figure out the problem.

 

 

If you really work all the time just at the rendering layer, then you will, eventually, remember the parameters and everything else. But the renderer is usually, just about 10-15% of the total effort. So, once you are done with the low-level rendering stuff, you spent majority time at gameplay/ai/toolset anyway.

 

There was a time, I remembered majority of dx functions with their parameters. But fast forward 8-12 months, which I spent just with the gameplay, AI, tools and I forgot most of them. Which is a good thing.

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