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

Soul Reaver

Members
  • Content count

    50
  • Joined

  • Last visited

Community Reputation

108 Neutral

About Soul Reaver

  • Rank
    Member
  1. So, this thread is old but I've encountered this problem again. I had to rewrite parts of my audio engine and the same exact issue appeared with mono vorbis files. But I could fix it by aligning the data to 2 bytes. My struct to save pcm data now looks like this: [source lang="cpp"] struct PCM_BUFFER { bool submitted; UINT size, flags; __declspec( align(2) ) BYTE data[BUFFER_SIZE]; }; [/source] Just wanted to share this with you in case you have the same problem.
  2. Seems like I have to abandon bump mapping then. Thanks for your help anyway.
  3. [quote name='MJP' timestamp='1315947490' post='4861253'] The first thing I would do would be to make sure that the cubemap is getting filled properly. I'm guessing PIX doesn't work with DX8? If not, you could just save out the cubemap as a .DDS and then look at it with DXTex to make sure it looks like what you're expecting. [/quote] I tried that and it looks like the cubemap is being filled like expected. Are there any render or sampler states which could cause my problem? Maybe the engine screws that up without me knowing about it.
  4. Unfortunately that's not possible. I didn't develop the engine and it isn't open source, so changing the engine would mean rewriting the whole game as this engine offers much high level functionality.
  5. Hi, currently I'm trying to implement bump mapping in a topdown game of mine. Unfortunately the engine of this game is based on DirectX 8.1 so I'm forced to use ps.1.4 & vs.1.1 as shader model. As you may or may not know ps.1.4 doesn't have functions like sqrt() or pow() so it's a real pain in the ass to implement the specular component of the blinn phong lighting model. To avoid these restrictions I decided to use a renormalization cubemap which is then used to renormalize the half vector which is passed from the vertex shader to the pixel shader. The problem is that sampling the cubemap returns always black, thus (0, 0, 0, a). I create my cubemap on the fly as follows: [source lang=cpp] // Create the cube map and fill it pDevice->CreateCubeTexture(512, 0, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &m_pNormalizationCubemap); D3DXFillCubeTexture(m_pNormalizationCubemap, FillCubeMap, NULL); // Fill callback void FillCubeMap(D3DXVECTOR4 *pOut, D3DXVECTOR3 *pTexCoord, D3DXVECTOR3 *pTexelSize, LPVOID pData) { // For testing purposes I set every texel to red pOut->x = 1.0f; //pTexCoord->x * 0.5f + 0.5f; pOut->y = 0.0f; //pTexCoord->y * 0.5f + 0.5f; pOut->z = 0.0f //pTexCoord->z * 0.5f + 0.5f; pOut->w = 0; } [/source] Both functions return S_OK, I bind this texture to texture stage 2 with IDirect3DDevice8::SetTexture() which also returns S_OK and let the pixel shader sample it as follows: [source] texld r2, t2 mov r0, r2 [/source] The primitives should now be rendered in bright red but instead everything is black, which means that the sampling returned black. But why? I really have no idea what I'm doing wrong.
  6. Thank you very much, even though I have read [url="http://msdn.microsoft.com/en-us/library/bb219690%28v=vs.85%29.aspx"]this article[/url] already some time ago I just forgot it. Thanks again, now everything works as expected.
  7. [quote name='Nanoha' timestamp='1312410224' post='4844236'] Did you try adding 32 instead of 31? Also a picture might describe the problem better. [/quote] Then the cells would be of size 33 and the texture would get distorted. A picture would only show tiles with gaps of 1px between them.
  8. Hi, currently I'm wondering about a strange issue I recently encountered. I'm trying to render a field of 32 * 32 cells for a topdown game. So the generation of the vertices looks something like this: [source lang="cpp"] for(int x = 0; x < map_width; x++) { for(int y = 0; y < map_height; y++) { add_vertex(x * 32, y * 32); add_vertex(x * 32 + 31, y * 32); add_vertex(y * 32 + 31, y * 32 + 31); add_vertex(x * 32, y * 32 + 31); } } [/source] When I render these vertices there a gaps between the individual cells even though they are all of the dimension 32 * 32. What's really strange is that those gaps don't exist if I render in wireframe mode. Consequently, there are no gaps if I first render the scene normally and then in wireframe mode. So, what is happening here? Why is the "outline" not rendered in solid fillmode? Any idea what I can do? Enlarging the cells isn't an option because the 32 * 32 texture will get distorted.
  9. MinGW has its own D3D headers and libraries if I recall correctly. It's certainly possible to compile a D3D application with MinGW.
  10. Or you just could set the projection matrix accordingly for drawing your GUI stuff. Edit: Oh sorry I'm a fool, I overlooked that you wanted to render a 3D object
  11. Thanks, you were absolutely right. I just didn't realize that I can't use the same effect for multiple streams.
  12. Okay, after some experimenting I was able to isolate the problem a bit more: So I have two submix voices, which represent the groups for sound effects and background music, which send their output directly to the mastering voice. The EQ effect is applied to both submix voices with the same parameters. If there are multiple source voices which send their data to the same submix voice and there are no source voices which send their data to the other submix voice everything is fine. Also everything works perfectly if I deactivate the effect for one of the submix voices even if both submix voices send data to the mastering voice. So my guess is that these crackling sounds occur if the mastering voice receives data from multiple submix voices, which have the EQ effect enabled. But why? Has anybody an idea why this happens? Shall I put together a minmal example to show what I mean?
  13. Hi, currently I'm wondering about an issue I ran into recently: In order to get an overall dull sound in certain situations, I decided to use the built-in equalizer effect of XAPOFX. I declared the FXEQ_PARAMETERS-structure as follows: [source lang="cpp"] FXEQ_PARAMETERS params; params.FrequencyCenter0 = FXEQ_DEFAULT_FREQUENCY_CENTER_0; params.Bandwidth0 = FXEQ_DEFAULT_BANDWIDTH; params.Gain0 = 1.0f; params.FrequencyCenter1 = FXEQ_DEFAULT_FREQUENCY_CENTER_1; params.Bandwidth1 = FXEQ_DEFAULT_BANDWIDTH; params.Gain1 = 1.0f; params.FrequencyCenter2 = FXEQ_DEFAULT_FREQUENCY_CENTER_2; params.Bandwidth2 = FXEQ_DEFAULT_BANDWIDTH; params.Gain2 = 0.2f; params.FrequencyCenter3 = FXEQ_DEFAULT_FREQUENCY_CENTER_3; params.Bandwidth3 = FXEQ_DEFAULT_BANDWIDTH; params.Gain3 = 0.2f; [/source] So as you can see I use default values mostly. The result is, as expected, a dull sound. But consider the following: I have two source voices (one represents background music, the other one a short sound effect) and each of these voices has its own submix voice, which uses the EQ effect described above. As long as the effect is deactivated everything is fine but otherwise there is a strange crackling sound, which only occurs if both voices are playing and the effect is enabled. So what am I doing wrong? Do I have to account of something I missed when using the equalizer effect? Thanks in advance.
  14. [quote name='coderWalker' timestamp='1308318309' post='4824449'] I keep getting a stack overflow error when running the below code. Can anyone tell me why this is? Thanks [code]//Create the array char testWorld[25*16][25*16][25*16]; //Populate the array for (int z=0; z<25*16; z++) { for (int y=0; y<25*16; y++) { for (int x=0; x<25*16; x++) { testWorld[x][y][z] = testWorld[x+16][y][z]; } } } //Move the array fps->start(); for (int z=0; z<25*16; z++) { for (int y=0; y<25*16; y++) { for (int x=0; x<24*16; x++) { testWorld[x][y][z] = testWorld[x+16][y][z]; } } } cout << fps->get_ticks();[/code] [/quote] Your array is just to big for the Stack. You'll need to allocate it dynamically.
  15. Oh man, just when I was checking the pointers of the pAudioData pointers I realized that those contain only zeros. For some reason the ov_read()-function copies only zeros into the buffer while not generating any error. I really should have checked that at first. *facepalm* Btw: The pointers are in fact odd, but it doesn't seem to bother XAudio2 in contrary to empty buffers. Thanks for your help, I think I can fix this finally.