Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 23 Jan 2012
Offline Last Active Aug 03 2015 05:31 PM

Topics I've Started

48 Hour Challenge Result

09 June 2013 - 05:49 PM

I have been doing a major rewrite of the game engine I have been working on for two years. It is tedious and most of the time it is just plain boring. I decided to create a small side project just to make things interesting for a bit. I remembered hearing about a 48 hour game coding challenge and decided to try it out for myself. Although I gave myself 48 hours, I only put in about 6 hours of actual work.


It is a simple text based game called Galaxy Quest. There is room for a ton of improvement, but I decided to stop coding at the end of the time limit. I thought I would share the end result with those of you who may be interested.


The moral of this story: When things begin to seem mundane, do something simple and silly to make it fun again!


Attached File  Galaxy Quest.zip   102.31KB   117 downloads


Edit: Although I have come close, I have not beat this game yet. If you are interested in trying, a good hint is to avoid fighting until you have a few upgrades.

VS2012 & Git Problem

22 April 2013 - 05:26 PM

I have been wanting to start using Git version control for a while and now that Visual Studio 2012 supports it natively, I decided to give it a shot. Everything seemed to work pretty good until I tried to create a new branch to try a few ideas out. The branch itself is created just fine, but when I try to switch over to that branch from within Visual Studio, I get an error message:




I have tried for a few days to find the solution to this on my own but have come up with nothing. I am hoping one of you can help me. Thanks in advance.

Multithreading and ID3D11DeviceContext::Map

16 April 2013 - 11:07 AM

Over the last two months I have been converting my engine from 64-bit single threaded to 32-bit multithreaded. The decision for multithreading is for various performance reasons. The decision for 32-bit is because I use Chromium Embedded Framework to power HTML (and CSS, Flash, Java, etc...) based user interfaces. I had originally wrapped CEF in a separate 32-bit process and used shared memory so that it could communicate with my 64-bit engine. I believe that this was the cause of false positives from my anti-virus software so I decided that going 32-bit to use CEF directly was a justifiable option.


CEF creates multiple threads internally. One of these threads calls an OnPaint() function when it is necessary to update the user interface image data. Inside OnPaint(), I call m_pImmediateContext->Map() with D3D11_MAP_WRITE_DISCARD in order to update the user interface texture. This, obviously, is giving me problems...


D3D11: CORRUPTION: ID3D11DeviceContext::Map: Two threads were found to be executing functions associated with the same Device at the same time. This will cause corruption of memory. Appropriate thread synchronization needs to occur external to the Direct3D API. 66768 and 67180 are the implicated thread ids. [ MISCELLANEOUS CORRUPTION #28: CORRUPTED_MULTITHREADING ]


My first thought was to simply lock the immediate context before calling Map(). However, my user interface is rendered on it's own dedicated deferred context (concurrently with all other deferred contexts). Specifically, a command list is generated (on the user interface deferred context) for rendering the user interface overlay to the screen on start up. That command list is reused for the life of the program (since the sequence of commands for rendering the user interface does not change), leaving the user interface's deferred context unused, yet available. In theory, if I can use this unused context to update the texture, I should be able to avoid having lock the immediate context. It would require quite a bit of rewriting just to be able to test this theory, so I decided to ask before hand to avoid doing so in vain.


Can ID3D11DeviceContext::Map() be called on a deferred context and provide immediate access to subresource data?


I apologize for taking so long to get to the question. I just wanted explain my intent and what led me to this question.

Antivirus false positive

02 April 2013 - 03:47 PM

I am making a 64-bit game engine. I use http://code.google.com/p/chromiumembedded/, which is 32-bit, to render my user interfaces. In order to make this work I had to wrap CEF in a separate 32-bit process that runs in the background while the 64-bit engine process is running. The two processes communicate with each other using named shared memory.


Today, a friend of mine agreed to help me test out gameplay in a multiplayer scenario. I made a release build (first time trying engine out in non-debug) for this test and ran it to make sure everything was okay before uploading it for him to download. When I ran it my anti-virus protection was triggered. It was complaining about the 32-bit user interface process. Obviously, this is unacceptable.


The only thing I do that could possibly trigger anti-virus (at least I think) is access named shared memory. The rest of the code simply starts CEF, stops CEF, read input commands from shared memory, and writes a rendered image to shared memory.


Has anyone else run into this problem? Is there a way to prevent anti-virus from false flagging my program?

VS2012 Graphics Debugger

01 April 2013 - 05:43 PM

I have ran into a major problem while  rewriting my rendering code to take advantage of the mutithreading features of D3D11. I fired up the graphics debugger to see what is going on. Everything works fine with it except for the graphics pipeline stages viewer. When I click on it, the loading indicator shows up and never goes away. Has anyone else run into this problem?