Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Im currently working on a 2D Game where the users can interact with specific nodes and are able to edit certain bits of information and I also plan for the users to be able to click buttons to set specific information.

My problem is that I do not know how to write code to create a side menu/UI system where information can be passed to it and displayed and also be edited by the system.

If anyone has any tutorials or material that they would be able to point me towards that they think would be helpful with this would be very appreciated as I do not know where to begin with this. Note that at the moment I am willing to swap from DirectX to OpenGL if that would be easier though I would prefer to stick to DirectX if possible


share|improve this question
up vote 3 down vote accepted

It really depends what you want to do and with what technology:

  • If it's a Win8 Metro game you could use XAML.
  • You can also use a DirectX 2D overlay. This example shows how to make UI with it and handle interaction with it.
  • If you want to enable interaction with 3D objects in your game (on click), this tutorial from Microsoft should help.

These are all Win8 app resources, but this should give you an idea for what to search for if you're targeting Win32.

share|improve this answer
its not going to be a Metro game so I wont be using XAML, I will have a look at then examples you have posted to see if they are useful. – Elliott Feb 28 '13 at 12:31
would it be possible to have the DirectX 2D overlay ontop of a directX 2d Viewport? – Elliott Feb 28 '13 at 16:24
Absolutly. It's even preferable to separate game HUD(overlay) and rendering game content which can be either 2D or 3D. You have to make seperate context, device and factory. Sorry it's Win8 example again but it shows rendering overlay on top of DirectX 2D so might help you Example from Microsoft – Lufi Feb 28 '13 at 23:32
Im planning on having a render screen for the game and then overlay the menu with a separate directX menu, thanks for your response I will check it out, and im sure that I will be able to get useful info from it even if its a win8 – Elliott Mar 1 '13 at 11:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.