• 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.
  • entries
    316
  • comments
    485
  • views
    321134

Using Hieroglyph 3 (and D3D11) with MFC

Sign in to follow this  
Followers 0
Jason Z

1489 views

I spent some of the Christmas vacation building a sample program for Hieroglyph 3 that shows how to use it within an MFC application. Several users of the library were asking for information about how to implement such an application, and I have worked with MFC a little before, so I dove into the task. I am also looking forward to developing some tools for my Kinect applications as well as Hieroglyph in general, so this is time well spent.

If you haven't used MFC before, or only use it occasionally, do yourself a favor and get a good book on it. Many people will tell you that MFC is too old and clunky to be useful, and they just might be right. There are lots of things that are not obvious in how they work until you are familiar with them. However, it has been around forever, there is lots of applications that have been built on it, and there are quite nice developer IDEs built right into Visual Studio for you to build dialogs with. Plus it doesn't cost anything, and there are lots of people that are familiar with it to boot.

I personally have the quite old Programming Windows with MFC book - but don't be fooled, even though it is old it is still very relevant. Understanding the basics of an application, a frame window, a document, and a view within the context of an SDI application can take a very long time if you are only using the raw documentation, and it is always handy to have a quick reference for the things you have forgotten...

Anyways, the basic concept for integrating a rendering library with MFC is to build a subclass of CView that will present a rendered scene to an HWND based window. The document is more or less just a scene in my sample application that consists of a single object. So a CView is responsible to take the document and render it into a window... This is precisely the same thing that a normal full screen application does, but you just have to package the various actions into an MFC class to allow it to work within the framework.

By creating such a class, the developer can then use it multiple times within an application to produce multiple rendered images of a given document. This is one of the things that MFC is really good at - once you have made the separation between data (as a document) and viewing (as a CView subclass) then there is lots of help to make multiple windows showing your data. The Hieroglyph 3 sample, appropriately named MFCwithD3D11, provides three resizable rendering windows in this fashion:

MFCwithD3D11.png



I haven't added mouse / keyboard interactivity to the views just yet, but that will be coming in the future. I would also like to add in some dialogs for configuring the various options of the rendered output, but that will take a bit more time to figure out what would make for a good example. If anyone out there has any interest in specific examples or features that they would like to see, please let me know and I'll add them into the queue :)

0
Sign in to follow this  
Followers 0


2 Comments


You could add dialogs to toggle between Solid/Wireframe, Textured/Untextured, Render Device (e.g. Ref, WARP, H/W) etc.
0

Share this comment


Link to comment
Those are good suggestions - and they cover two different general areas: per object properties (fill mode, texturing, etc...) and global properties (device type). The per-object properties would be challenging to get into a static dialog, since the material properties can allow for varying numbers and types of parameters depending on what it is implementing. However, it could be possible to dynamically generate a dialog with the various properties visible in them.

I have also thought about generating a tree view to visualize the current scene. That would allow for a way to directly see what is going on in the scene, and then I could populate that tree view with the appropriate sub-parameters used in rendering as you mentioned. That would be interesting and quite useful, so I'll check into that. Thanks for the suggestions!
0

Share this comment


Link to comment

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