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

he3117

Members
  • Content count

    11
  • Joined

  • Last visited

Community Reputation

374 Neutral

About he3117

  • Rank
    Member
  1. Solved. I forgot to put the vehicle in rest state before adding it to scene.
  2. When my vehicle is in air there is no problem but when wheel touch the ground my game crash. and I'm getting this error:   First-chance exception at 0x00672cb7 in Game.exe: 0xC0000005: Access violation reading location 0x374a2c5c. Unhandled exception at 0x00672cb7 in Game.exe: 0xC0000005: Access violation reading location 0x374a2c5c.   this is my call stack:      Game.exe!physx::PxVehicleUpdate::updateDrive4W()  Line 2408 + 0x6 bytes    C++      Game.exe!physx::PxVehicleUpdate::update()  Line 3599 + 0x24 bytes    C++      Game.exe!physx::PxVehicleUpdates()  Line 3638 + 0x20 bytes    C++   I think there is some thing wrong in ray casts but I don't know what is it.   any idea how can I solve this problem?
  3. Hi I want to add physx to my engine but I'm getting a very strange errors: I found a single line in my code that cause these errors but the code is true here my code for starting physx: CPhysxPhysic::CPhysxPhysic(void) { m_Physics=NULL; m_Foundation=NULL; //static PxDefaultErrorCallback gDefaultErrorCallback; //static PxDefaultAllocator gDefaultAllocatorCallback; printf("initializing PhysX\n"); printf("creating Foundation\n"); // create foundation object with default error and allocator callbacks. m_Foundation = PxCreateFoundation(PX_PHYSICS_VERSION,gDefaultAllocatorCallback,gDefaultErrorCallback); printf("creating Physics\n"); // create Physics object with the created foundation and with a 'default' scale tolerance. m_Physics = PxCreatePhysics(PX_PHYSICS_VERSION,*m_Foundation,PxTolerancesScale()); m_Cooking = PxCreateCooking(PX_PHYSICS_VERSION, *m_Foundation, PxCookingParams()); if (!m_Cooking) printf("PxCreateCooking failed!\n"); if (!PxInitExtensions(*m_Physics))//This line is the problem!!! printf("PxInitExtensions failed!\n"); m_ProfileZoneManager = &PxProfileZoneManager::createProfileZoneManager(m_Foundation); if(!m_ProfileZoneManager) printf("PxProfileZoneManager::createProfileZoneManager failed!\n"); #ifdef PX_WINDOWS pxtask::CudaContextManagerDesc cudaContextManagerDesc; m_CudaContextManager = pxtask::createCudaContextManager(*m_Foundation, cudaContextManagerDesc, m_ProfileZoneManager); if( m_CudaContextManager ) { if( !m_CudaContextManager->contextIsValid() ) { m_CudaContextManager->release(); m_CudaContextManager = NULL; } } #endif PxInitVehicleSDK(*m_Physics); PxVehicleSetBasisVectors(PxVec3(0,1,0),PxVec3(0,0,1)); // static PxDefaultSimulationFilterShader gDefaultFilterShader; PxSceneDesc sceneDesc(m_Physics->getTolerancesScale()); sceneDesc.gravity = PxVec3(0.0f, -9.81f, 0.0f); // customizeSceneDesc(sceneDesc); if(!sceneDesc.cpuDispatcher) { m_CpuDispatcher = PxDefaultCpuDispatcherCreate(2); if(!m_CpuDispatcher) printf("PxDefaultCpuDispatcherCreate failed!\n"); sceneDesc.cpuDispatcher = m_CpuDispatcher; } if(!sceneDesc.filterShader) sceneDesc.filterShader = PxDefaultSimulationFilterShader; #ifdef PX_WINDOWS if(!sceneDesc.gpuDispatcher && m_CudaContextManager) { sceneDesc.gpuDispatcher = m_CudaContextManager->getGpuDispatcher(); } #endif m_Scene = m_Physics->createScene(sceneDesc); if (!m_Scene) printf("createScene failed!\n"); printf("PhysX initialized\n"); } If I remove this line I an compile the code: if (!PxInitExtensions(*m_Physics))//This line is the problem!!! printf("PxInitExtensions failed!\n");   Why I got multiply defined symbols?and how should I solve it?   EDIT:I solve it my self(after 3 days of testing I finally found the answer 5 minutes after asking here :D).I included <PxPhysicsAPI.h> before any other header file and it solved my problem.  
  4. May be you forgot to delete the bone name.
  5. Hi I want to start writing forward rendering pipeline for my deferred engine and I'm looking for efficient way to pass light information to shader. I have an idea about it.I don't want to pass light info as constant or array so I'm thinking about sending them as textures. for point lights I need:   struct PointLight {    COLOR LightColor;    Vector3 LightPosition;    float LightRadius; }   It seems I can store this structure in 2 pixel of a texture: RGB=LightColor; alpha=LightRadius;   RGB=xyz of light position   struct SpotLight {    COLOR LightColor;    Vector3 LightPosition;    float LightRadius;    float CosAngel; } RGB=LightColor; alpha=LightRadius;   RGB=xyz of light position alpha=CosAngel;   so with a texture 128*2 I can pass 128 point light to the shader. But what is the best way to fill this texture?Should I make a vertex buffer with light info and pass it to a shader to writing in texture or use LockRect and fill the texture on CPU?   also I can pack all light info in one texture and use another texture to pass ligh Ids to shader
  6. maybe m_pRenderTargetView and swap chain are the same before the shutdown.
  7. I'm working with DX9 and my answer may not help you so much but check the return value of ClearDepthStencilView. In dx9 this function can fail if you don't have stencil information in depth buffer.
  8. Hi I had exactly the same problem.I tracked the normal transform and I found the problem. for me changing :   output.Normal =mul(input.Normal,World); to output.Normal =mul(World,input.Normal);   solved it or you can transpose the world matrix before multiply it.
  9. [quote name='eppo' timestamp='1354743288' post='5007530'] Sounds like you're not clearing (setting all values to a clip-far value) your shadow map before rendering. [/quote] Finally I found it. The problem was Zbuffer.It couldn't clear the Zbuffer. From MSDN: IDirect3DDevice9::Clear will fail if you: 1-Try to clear either the depth buffer or the stencil buffer of a render target that does not have an attached depth buffer. 2-Try to clear the stencil buffer when the depth buffer does not contain stencil data. Mine was case 2.
  10. I clear it correctly.There should be some thing wrong with matrix but I can't find it.Because PIX doesnt show any error.[img]http://public.gamedev.net//public/style_emoticons/default/ohmy.png[/img]
  11. Hi I'm working on shadow mapping for my Game engine and I have a big problem.It makes me crazy and I can't find it for last week of debugging. [img]http://public.gamedev.net//public/style_emoticons/default/sad.png[/img] The problem is my shadow maps work when objects are fix.But after moving the light or other objects it doesn't work any more.When I want to debug it by PIX it shows the correct image in PIX.[img]http://public.gamedev.net//public/style_emoticons/default/huh.png[/img] Also after resetting the device(for device lost)It shows the correct image before moving the light or other objects.After a while this shadow complettly disappears. It seems vertex shader for deph pass uses incorrect matrix but I can't find the problem.[img]http://public.gamedev.net//public/style_emoticons/default/dry.png[/img] P.S:I'm using deferred shading. [source lang="cpp"]float4x4 WorldViewProjection; struct VertexShaderInput { float4 Position : POSITION0; }; struct VertexShaderOutput { float4 Position : POSITION0; float2 Depth : TEXCOORD0; }; VertexShaderOutput VertexShaderFunction(VertexShaderInput input) { VertexShaderOutput output; //float4 worldPosition = mul(World,input.Position); //float4x4 worldview = mul(World, View); //worldview = mul(worldview, Projection); //output.Position = mul(input.Position,worldview); output.Position = mul( WorldViewProjection,input.Position); //output.Depth = worldPosition-SpotlightPosition; output.Depth.x = output.Position.z; output.Depth.y = output.Position.w; return output; } struct PixelShaderOutput { float4 Depth : COLOR0; }; PixelShaderOutput PixelShaderFunction(VertexShaderOutput input): COLOR0 { PixelShaderOutput output; //float4 l=input.Depth-SpotlightPosition; //input.Depth/=input.Depth.w; //output.Depth =float4(0,0,0,0); //output Depth output.Depth =input.Depth.x/input.Depth.y; //output Depth return output; } technique buildPass { pass Pass1 { VertexShader = compile vs_2_0 VertexShaderFunction(); PixelShader = compile ps_2_0 PixelShaderFunction(); } } [/source] First image is the image befor rotating the car. [attachment=12619:first.JPG] second image is what I see after rotating the car. [attachment=12620:second.JPG] Third pic is what I see in PIX [attachment=12621:pic_from_pix.jpg]