Jump to content

  • Log In with Google      Sign In   
  • Create Account


Tispe

Member Since 02 Oct 2010
Offline Last Active Yesterday, 05:57 PM
-----

Topics I've Started

10-bit Monitors

Yesterday, 02:59 PM

Hello

 

There are new monitors on the market that support 10-bits per channel. But in CAPS I can only find support for D3DFMT_X8R8G8B8 and D3DFMT_R5G6B5.

 

I do not have a 10bit monitor, but if I had one would a 10bit format appear in CAPS?

 

How can DirectX render to 10bit monitors?


{XAudio2 2.7] - Source Voice questions

04 April 2014 - 05:28 AM

Hello

 

I am interested in using XAudio2 for my DX9 game. And I can't find if there are any limits to how many Source Voices one can create in XAudio2.

 

I am tempted to create thousands, one for each sound in the game and warp both the voice and the data in a single Sound Object. That way I can play the object when I need to just by calling its "Play" method. Is this good/bad?

 

 

Also, if I have thousands of these sound objects, can all of them be submitted at creation, or must this be done right before you Start the voice?

//Once at init, or before every Start call?
pSourceVoice->SubmitSourceBuffer( &buffer );
void MySoundObjectClass::Play(){
//pSourceVoice->SubmitSourceBuffer( &buffer ); needed?
pSourceVoice->Start( 0 );
}

Passing Concurreny::concurrent_queue by reference to thread

12 March 2014 - 03:52 AM

Hello

 

I am testing out Concurreny and std::thread features that I might want to use. But I am having trouble passing a thread-safe queue to a workerThread by reference.

 

When I push a message in main thread I can't retrieve it in the worker thread. What am I doing wrong?

thread workerThread;
concurrent_queue<string> SendQueue;
concurrent_queue<string> ReceiveQueue;
workerThread = thread(&ThreadRoutine, SendQueue, ReceiveQueue);
ThreadRoutine(concurrent_queue<string> &SendQueue, concurrent_queue<string> &ReceiveQueue)
{

string SendString;
if(SendQueue.try_pop(SendString))
{
//Never triggers after I push a message from main side.
}

}

If I push a few messages BEFORE I create the thread, then those messages gets carried over. It's like the queues are not passed by reference at all.

 

 


Running game Server as a system Service

11 March 2014 - 06:49 AM

Hi

 

I have a simple server/relay which runs on a Virtual Private Server that I rent for 10$/mo. Sometimes the system may restart abruptly and I have to RDP to the system, and log in in order to start my server application.

 

So I figured that I should rather create a Service, which will run without me having to log in after a system restart.

I am using this tutorial: http://www.codeproject.com/Articles/499465/Simple-Windows-Service-in-Cplusplus

 

Is this an good idea? Any things to keep in mind?

 

 

 

Also, would setting the priority to RealTime work/benefit for a system Service?

SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS);

The inevitable God object

03 March 2014 - 12:53 PM

Hello

 

Anyone else experiencing that most of your code end up in a God Object?

 

Over some time I have toyed with several different programming ways. From pure procedural to strict OOP. As I program my game I encounter problems such as how to move messages between objects. Even messages across a network. These messages has to be properly identified, dispatched and call the correct methods. All messages are derived from a base object such that they can all be stored in the same STL container.

 

We can take advantage of double dispatch to avoid down casting these message objects. However now a message has to be accompanied by all the possible objects it may interact with. So in order for this message to have that acces, we need an interface that holds everything, the God object, or GameManager or whatever.

 

C++ has so many quirks that most of my code are based on solving these quirks rather then focusing on the game itself.

 

Am I alone, is this a noob thing, or what?


PARTNERS