• Content count

  • Joined

  • Last visited

Community Reputation

127 Neutral

About ForbiddenX

  • Rank
  1. Windows 8 Game Development

    Thanks! I'll definitely take a look at marmalade as well! The perks are very interesting ;)
  2. Windows 8 Game Development

    Awesome, thanks for the explanation.    I may choose to go with MonoGame as it seems like it would give me better practice and a better understanding of making my own engine. I don't mind spending the time trying to write my own since it'll be good practice!   Are there any suggestions between other than MonoGame or Unity? 
  3. Windows 8 Game Development

    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++.    Thanks!  
  4. [Direct3D] Cube Mirror

    Pretty much what I want it to do is to reflect the objects around it but I'm not sure why it's not. I'm also trying to add textures and I don't really know why it's blowing up on me [code] g_pDevice->SetStreamSource(0, v_buffer, 0, sizeof(CUSTOMVERTEX)); g_pDevice->SetFVF(CUSTOMFVF); g_pDevice->SetIndices(i_buffer); //endrender g_pDevice->SetMaterial(&teapot.material); g_pDevice->SetTexture(0, square.texture); g_pDevice->DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0, 0, 24, 0, 12); [/code] This is what I'm using to render the cube but it just appears to be white. This is what I'm doing to create the material: [code] D3DCOLORVALUE white= { 1, 1, 1, 0 }; D3DCOLORVALUE black = { 0, 0, 0, 0 }; teapot.material.Diffuse = white; teapot.material.Ambient = white; teapot.material.Specular = white; teapot.material.Emissive = black; teapot.material.Power = 2.0f;[/code] As for the mirror the examples ive been was just 1 face. So like a normal mirror, but since I'm rendering a cube mirror all with different objects on each side will I need to have 6 different reflections and will I have to treat each face as an individual face. So like I can't just set the whole cube to be a mirror I'd have to make each face one.
  5. 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: [code] 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 g_pDevice->CreateVertexBuffer(24*sizeof(CUSTOMVERTEX), 0, CUSTOMFVF, D3DPOOL_MANAGED, &v_buffer, NULL); 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)); v_buffer->Unlock(); // 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 g_pDevice->CreateIndexBuffer(36*sizeof(short), 0, D3DFMT_INDEX16, D3DPOOL_MANAGED, &i_buffer, NULL); // lock i_buffer and load the indices into it i_buffer->Lock(0, 0, (void**)&pVoid, 0); memcpy(pVoid, indices, sizeof(indices)); i_buffer->Unlock(); return S_OK; }[/code] 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
  6. Thanks for the replies guys and sorry for the really late reply I've been crunching away at the next step of my project. I did exactly what you guys told me and I wrapped the functions into method calls and got full marks! Thanks a lot
  7. 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!