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

Carradine

Members
  • Content count

    184
  • Joined

  • Last visited

Community Reputation

303 Neutral

About Carradine

  • Rank
    Member
  1.   I have absolutely no problem putting the citations into the game for the excerpts of the text that I use if that was the issue.     But I suppose I will play it safe, and just do my own research as you suggested if even posting citations after the text still may cause an issue.  It is a little extra work but I can do that.  I greatly appreciate all your responses, there was a bit more to doing this than I originally thought!   Just one more question just to be safe:   In the worst case scenario that for some reason I got called out for violating some copyright in my game by posting text from another website.  Could I just immediately remove the text in question to avoid any other legal issues?  Or is there a "It's too late, I caught you" clause?
  2. Hmm, a very interesting point.  Yea I was planning to have educational descriptions in my game just as interesting "flavor text" so players could actually "learn" something if they wanted to.  I may have to do my own independent research to the point where I am not citing any specific texts for this to work.  My plan was just to throw some quick information in about objects in the game for a quick read.  I guess this may prove to be a much more delicate matter than I originally believed.  My reason for this was so I could focus on game development instead of doing exhaustive research for a non-critical portion of my game.   I may have to abandon this whole idea for now.
  3. Ah thanks, I knew of that page but I was unsure of how much information was legally needed, but then I was the "cite this page" link on the side of the article.  And that was the answer I was looking for, sorry, I guess I wasn't looking hard enough :)
  4. Hello, I am currently developing a game that has many real object in it, and in the description of these objects I would like to show a little "educational" excerpt of text in order to add some "flavor text" to the objects in the game.  I usually just take a few sentences or a paragraph of text from a Wikipedia page and put it into the game.   Is there a specific way I need to cite the text?  After doing a bit of reading it looked like I could just reference the article like using "Parenthetical Reference" like so:   Most sandstone is composed of quartz and/or feldspar because these are the most common minerals in the Earth's crust.  ("Sandstone," Wikipedia: The Free Encyclopedia )   Later I wish to start doing my own research on the subjects, but for now I just want to get a quick bit of information into the game.   This this type of reference acceptable for citing text in wikipedia?  Do I need to provide more information?  Do I have to search for publish dates, or Authors each time I want to do this and add them in?    
  5.   Were you able to thread functions that use the D3D Device as well?  Like threading a LoadMeshFromX() function that uses the D3D Device parameter?  I attempted to thread my mesh loading but it seems it is a bit more complex getting the D3D Device into a thread.  It locks up my game when it gets used.  Apparently I may need to be using "Critical Sections" but my knowledge on such things are limited.   
  6. Thanks, I have actually been attempting that approach.  Synchronizing with a D3D Device seems to be a bit more tricky than I was expecting however, but at some point I plan to implement this further.   For now I found two simple ways to fix my loading lag issues.  One was the fact that I was using a lot of text-based .X files and reading those files.  I now compress them into compressed binary files, which actually has been lowering the file size to more than 1/10 its size!  This has had a huge impact, as well as using InMemory() load functions to top it off.   I also "Sectioned" out my loading code so not all the processing of loading a mesh is done in one frame, instead it is spread out into many frames (loading 1 texture per frame etc. )   Some simple implementations of course.  But that with threading, or splitting up the loading of the file will be something I look forward to finally implementing.   
  7. So I am thinking of a slightly different direction to improve the performance of resource loading in my game.  Simply put, some assets in the game "lock up" the game for up to several seconds while they load in the mesh/textures and set them up to render, as is usual.   Since the way I have the game set up most of the time I do not need the resource loaded "immediately".  So, would I be able to put all my mesh/texture resource loading code into a thread and let it process on the background until it is ready?   Will the game run smoothly for the most part while resources are being loaded? Will file access while loading resources in a thread also work in the background and not "lock up" the main game thread?  Or do I need to look into something more involved like Overlapped I/O or asynchronous loading?
  8.   Ok thanks, good to know!  That helps a lot.
  9.   Hehe yes I know, however I don't want/need to update right now.   So it seems that using .x files for now do not have as large of an impact as I thought they may have.  Aside from what you suggested about loading data directly into memory with the InMemory() functions, it does not really seem that the time it would take to upgrade my code would not really be worth it at this time if I understand you correctly.  And I do not wish to get into concepts like loading directly into the vertex buffers until I wish to really to some serious upgrading of my mesh and animation system. 
  10. I am currently in the process of doing some large updates to my game, and my next possibly large task is to overhaul my mesh object and animation loading system, and I am really in need of some advice and information on how to go about this next step as I have some specific reasons I want to do this.   The main reason I am posting this is because I really need to have some specific questions answered which will greatly help me in figuring out how I can go about this before I jump into a code overhaul that may be futile if it does not give me what I want.  My specific questions are listed at the end of the post.   Simply put, I want to upgrade the code I use to load objects into the game.  The main reasons I want to do this is:   - I am currently using only outdated ".x" file formats and would possibly want to use other formats, as I have heard that .x files may actually be not very optimal for loading purpuses.   -  I wish to attempt to make the load time for objects quicker, including the possiblility of asyncronous loading/multithreading options (if possible) by allowing other types of files which may be more efficient than .x files.   My game is coded in C++, using DirectX9.  My main loading functions are LoadMeshFromX() functions calls, which are functions that no longer exist past DirectX 9 if I ever wish to upgrade.   My current research leads me to think that my best bet is to convert to the "ASSIMP" library.  It seems like It is a popular library to load objects. I am NOT looking to upgrade my actual in-game mesh/animation systems.  I still wish to store all loaded information back into the DirectX9 framework.   If anyone can answer or guide me in answering these questions I have It would be greatly appreciated!   Questions I would like to know the answer to:   - The overall main purpose of this is to attempt to make my load times for objects faster, if even just a small amount.  Is loading other types of exported formats (like .OBJ files) more efficient/faster than the outdated .X file format?   - Would convering to a new library like "ASSIMP" even be useful, since I can can convert most art assets into .x mesh/animations files from virtually any art program.  Are .x files that much different from more popular export types like .OBJ files?  Are .X files slower to load or do not hold as much useful information as other export types?   - Is the "ASSIMP" library the best option?  Are there other suggestions of code/libraries to use?   - My game is already set up to wait to load in objects while the game is running and only display them when they are loaded and complete.    Does anyone have any expereinces, or know of any other good online articles that may describe asyncronous/multithread loading of objects?   Thanks for any advice you can give me on this!  
  11.   I am a bit confused about something however.  Is this the code I use within my HLSL code for calculating the shadows with the depth map?  Or is this outside of the HLSL code as well?     I assume dx/dy/dz is cameraPos - vertexPos so this would be done in the shader, correct?     Since these are render states outside of the shader, how do they apply to my final shader caculation to finally apply the shadow?  What are they doing to the rendering of the primitives?   I think I am just confused what implementations I am supposed to be doing inside and outside the shader for the calculations.
  12. Interesting, thanks for the informative information!  I did see that a lot of examples set the render states outside of the shader, but just assumed that there was always an HLSL version which always seems to be more optimal. 
  13. So I decided to go a different route which was much simpler and seems to fix most of the issues, which was use the "normal offset" method, and it removed all of the jagged edges off of my terrain shadows, I simply had to add the line  IN.position = IN.position + (IN.vnormal * normalOffset); Into my vertex shader for the shadow map render, and tweak the offset value for each cascade shadow map, and I have non-jagged self-shadowed terrain!   Of course there is a great deal more work to be done here, but this was a large step forward.
  14. I have been searching the web for days for an answer to this, but I apparently cannot find what I need to, or I am overlooking the answer and not knowing it.   I have the issue of projective-aliasing happening with the terrain in my game, and apparently I need to use a slope-scale bias as well to calculate the shadow.   I know that the algorithm is: m*SLOPESCALE + DEPTHBIAS \Where m = max( | ?z/?x | , | ?z/?y | )   But apparently I am uncertain how to implement this inside of an HLSL shader.  I already use a depth bias, I just need to compute the slope-scale bias as well.   Here is my code:   To render the shadow map: technique Technique0Shadow { pass Pass0 { Lighting = False; CullMode = NONE; VertexShader = compile vs_2_0 VS_Shadow(); PixelShader  = compile ps_2_0 PS_Shadow(); } } shadowType VS_Shadow( vertex IN ) { shadowType OUT; OUT.position = mul( worldViewProj, float4(IN.position, 1) ); OUT.fDepth.z = OUT.position.z; return OUT; } pixel PS_Shadow( shadowType IN ) {     pixel OUT; OUT.color = float4(IN.fDepth.z,IN.fDepth.z,IN.fDepth.z,1.0f);     return OUT; } And here is the HLSL code for rendering the shadow onto the terrain ( edited for simplicity )   Vertex Shader: fragment TerrainVS_Shadow( vertex IN ) {     fragment OUT;         OUT.color = float4(IN.color.r,IN.color.g,IN.color.b,IN.color.a); OUT.hposition = mul( worldViewProj, float4(IN.position, 1) ); OUT.vProjCoord = mul( float4(IN.position, 1), g_matTexture ); OUT.vProjCoord2 = mul( float4(IN.position, 1), g_matTexture2 ); float4 posWorld = mul(float4(IN.position, 1), worldMat); OUT.distCalc = posWorld; return OUT; }   pixel shader, the depth bias is 0.0005f; pixel TerrainPS_Shadow( fragment IN ) {     pixel OUT;      if ( IN.vProjCoord.x/IN.vProjCoord.w < 1.0f && IN.vProjCoord.x/IN.vProjCoord.w > 0.0f && IN.vProjCoord.y/IN.vProjCoord.w < 1.0f && IN.vProjCoord.y/IN.vProjCoord.w > 0.0f ) { fShadowTerm = tex2Dproj( ShadowSampler, IN.vProjCoord ) < (IN.vProjCoord.z - 0.005f) ? 0.4f : 1.0f; } OUT.color = float4(0,0,0,fShadowTerm  );     return OUT; } My question is, how do I implement the slope-scale bias into my code as well?  How do I add the equation: m*SLOPESCALE + DEPTHBIAS as the overall bias so I can eliminate my projective-aliasing?   Thanks for any info you can give!      
  15. I am having an issue beginning to implement cascading shadow maps.  I already have shadows already rendering, however when I try to render multiple shadow maps with the same code, I am unable to "capture" the current shadow map texture to use for the render loop.   For example I am trying to render 2 shadow maps using two different ortho views:   for( int lpShadow = 0; lpShadow < 2; lpShadow++ ) {     if( lpShadow == 0 )    {         D3DXMatrixOrthoRH( &shadowProj, (float)(d3ddm.Width)/10,(float)(d3ddm.Height)/10, -60.0f, 60.0f );     }     else if( lpShadow == 1 )     {         D3DXMatrixOrthoRH( &shadowProj, (float)(d3ddm.Width)/40,(float)(d3ddm.Height)/40, -10.0f, 10.0f );     }     D3DXMATRIX matLightViewProj = shadowWorld * shadowView * shadowProj;     g_pEffect->SetMatrix( "g_matLightViewProj", &matLightViewProj );     // Grab the old render target and depth buffer     g_pd3dDevice->GetRenderTarget( 0, &g_pOldColorRT );     g_pd3dDevice->GetDepthStencilSurface( &g_pOldDepthRT );          // Render the scene depth to the shadow map     g_pd3dDevice->SetRenderTarget( 0, g_pShadowSurf );     g_pd3dDevice->SetDepthStencilSurface( g_pShadowDepth );          // Clear the viewport     g_pd3dDevice->Clear( 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xFFFFFFFF, 1.0f, 0 );     //Main rendering code loop here....     /////////     /////////     // Restore the render target and depth buffer     g_pd3dDevice->SetRenderTarget( 0, g_pOldColorRT );     g_pd3dDevice->SetDepthStencilSurface( g_pOldDepthRT );     SAFE_RELEASE( g_pOldColorRT );     SAFE_RELEASE( g_pOldDepthRT );     //Then finally put the texture into the shader     g_pEffect->SetTexture( "tShadowMap2", g_pShadowMap ); } I initialize the textures and surfaces like so if( FAILED( g_pd3dDevice->CreateTexture( VGlobal::SHADOW_MAP_SIZE, VGlobal::SHADOW_MAP_SIZE, 1, D3DUSAGE_RENDERTARGET, D3DFMT_R32F, D3DPOOL_DEFAULT, &g_pShadowMap, NULL ) ) ) { MessageBox( hWnd, "Unable to create shadow map!", ERROR, MB_OK | MB_ICONERROR ); return E_FAIL; } // Grab the texture's surface g_pShadowMap->GetSurfaceLevel( 0, &g_pShadowSurf ); My issue is I am failing to understand how to loop through my Shadow Map rendering loop above, and extract the texture out of g_pShadowMap for each loop that I want to render.  I simply want to make it its own texture resource, use it in the shader for the current loop, then discard it at the end of the render process.  Right now it only uses the last surface as all of its shadow map textures which is quite obvious.   I have tried using StretchRect(), CopySurfaceToSurface(), many other types of copy commands, but I cannot seem to grasp how to simply copy a texture resource out of the shadow map render target, and make it a separate texture out of g_pShadowMap.   I have also tried to use multiple render targets for each loop, however I do not seem to understand or grasp how this is possible.  I also tried to make g_pShadowMap an array, but simply assigning the second element to the render target does not seem to work.   Thanks for any help!