Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


Member Since 30 Jan 2011
Offline Last Active Sep 30 2014 08:55 PM

Topics I've Started

Windows 8 Game Development

18 July 2013 - 12:17 AM

Hey guys,


It's been a while since I've been doing game dev but I've decided to get back into it. I've mostly been doing webapps, and mobile apps but have done some game dev in the past. 


I am looking at creating a 2D side scrolling game for Windows 8 and was wondering what engine would be best to do it in? I'm leaning towards either MonoGame or Unity. Any other suggestions are welcome


I'm pretty comfortable in developing in any language but may need to ramp up a lot with C/C++. 




[Direct3D] Cube Mirror

27 March 2011 - 11:06 PM

Hey guys,

I was wondering if anyone could help with getting a cube mirror to render. Right now, I can only get a cube to show up and when I try adding the mirror to each of the faces, it doesnt work the way I want it to.

Here's the code that I'm using to make the cube:

int GameMain::InitSquare() {
    // create the vertices using the CUSTOMVERTEX struct
    CUSTOMVERTEX vertices[] =
        { -3.0f, -3.0f, 3.0f, 0.0f, 0.0f, 1.0f, },    // side 1
        { 3.0f, -3.0f, 3.0f, 0.0f, 0.0f, 1.0f, },
        { -3.0f, 3.0f, 3.0f, 0.0f, 0.0f, 1.0f, },
        { 3.0f, 3.0f, 3.0f, 0.0f, 0.0f, 1.0f, },

        { -3.0f, -3.0f, -3.0f, 0.0f, 0.0f, -1.0f, },    // side 2
        { -3.0f, 3.0f, -3.0f, 0.0f, 0.0f, -1.0f, },
        { 3.0f, -3.0f, -3.0f, 0.0f, 0.0f, -1.0f, },
        { 3.0f, 3.0f, -3.0f, 0.0f, 0.0f, -1.0f, },

        { -3.0f, 3.0f, -3.0f, 0.0f, 1.0f, 0.0f, },    // side 3
        { -3.0f, 3.0f, 3.0f, 0.0f, 1.0f, 0.0f, },
        { 3.0f, 3.0f, -3.0f, 0.0f, 1.0f, 0.0f, },
        { 3.0f, 3.0f, 3.0f, 0.0f, 1.0f, 0.0f, },

        { -3.0f, -3.0f, -3.0f, 0.0f, -1.0f, 0.0f, },    // side 4
        { 3.0f, -3.0f, -3.0f, 0.0f, -1.0f, 0.0f, },
        { -3.0f, -3.0f, 3.0f, 0.0f, -1.0f, 0.0f, },
        { 3.0f, -3.0f, 3.0f, 0.0f, -1.0f, 0.0f, },

        { 3.0f, -3.0f, -3.0f, 1.0f, 0.0f, 0.0f, },    // side 5
        { 3.0f, 3.0f, -3.0f, 1.0f, 0.0f, 0.0f, },
        { 3.0f, -3.0f, 3.0f, 1.0f, 0.0f, 0.0f, },
        { 3.0f, 3.0f, 3.0f, 1.0f, 0.0f, 0.0f, },

        { -3.0f, -3.0f, -3.0f, -1.0f, 0.0f, 0.0f, },    // side 6
        { -3.0f, -3.0f, 3.0f, -1.0f, 0.0f, 0.0f, },
        { -3.0f, 3.0f, -3.0f, -1.0f, 0.0f, 0.0f, },
        { -3.0f, 3.0f, 3.0f, -1.0f, 0.0f, 0.0f, },

    // create a vertex buffer interface called v_buffer

    VOID* pVoid;    // a void pointer

    // lock v_buffer and load the vertices into it
    v_buffer->Lock(0, 0, (void**)&pVoid, 0);
    memcpy(pVoid, vertices, sizeof(vertices));

    // create the indices using an int array
    short indices[] =
        0, 1, 2,    // side 1
        2, 1, 3,
        4, 5, 6,    // side 2
        6, 5, 7,
        8, 9, 10,    // side 3
        10, 9, 11,
        12, 13, 14,    // side 4
        14, 13, 15,
        16, 17, 18,    // side 5
        18, 17, 19,
        20, 21, 22,    // side 6
        22, 21, 23,

    // create an index buffer interface called i_buffer

    // lock i_buffer and load the indices into it
    i_buffer->Lock(0, 0, (void**)&pVoid, 0);
    memcpy(pVoid, indices, sizeof(indices));

	return S_OK;

Also, for each face, would it require a seperate render function? So I'd essential have 6 different MirrorRender functions as opposed to just 1 and all 6 use it?

Thanks in adavance

Getting started with DirectX9 (C++ Shell)

31 January 2011 - 09:51 PM

Hey guys,

I'm currently in a game programming course at my college and was wondering if anyone one could help me out with a few questions.

Right now our teacher wants us to create a Win32/DirectX environment using C++. I'm having a really tough time doing that because I learned
how to do Win32 API using C and not C++. If we use any C code or C coding practices, we'll get a mark of 0. I know how to do the DirectX stuff too
it's just getting it all started that's killing me!

Are there any tutorials you guys have that can help me out? I understand how Win32 works, I just don't understand how to get it to work in C++.

Please help if you have any links or a "shell" that I could use just for the window it'd be great!

Thank you so much in advance!