Crack of Dawn Productivity

Published February 28, 2006
Advertisement
So my puppy awoke me at 1 am, and again at 3 am for potty and water respectively. So around 4am, after laying in bed pondering code, I decide to get up and do something, since I'm not going to get any more sleep.

The result was some threading test code, which confirmed my fears that a design concept I had would not work as nicely as I thought. In particular, my current thread usage seperates threads via a shared memory messaging system, so each thread can act independantly; utilizing messages when communication is necissary. I also wanted a similar seperation to exist for object transfer. Essentially, a mediator class would act as an airlock so that one thread could drop off an object for another thread to retrieve at its leisure; with the airlock providing all of the synchronization mechanisms so the threads don't have to.

Well, at 3 am last night I realised it might not work as nicely as I thought. Since most everything I use in C# is a reference type, that means that the object isn't really 'dropped off' in the airlock. So when the thread picks it up on the other side, they still reference the same object, meaning icky concurrency issues still exist. I'm pretty sure there's a simple 'by value' addition which will make it work right, but I'm also nearly certain that something like this already exists and I'm just being stubborn/ignorant/blind/stupid by not using it. Either way, investigation will happen later.


I also managed to doodle up some shadowed text (pardon the colors):

Which is perhaps not so notable in and of itself. I have in fact made this sort of construct 3-4 times now. This though is the first time that I got it made in such a way that classes like the ChatBox could load and manipulate the shadowed text like any other text merely by a change of a font string. Hurray C#, hurray design patterns, hurray sucking less.
Previous Entry Monday...
0 likes 2 comments

Comments

Rob Loach
It might just be me, but I like the solid font more without the shadow...
February 28, 2006 11:33 AM
Telastyn
Yeah, it's not so good for things like that console. It's generally better when the text is overlayed on a texture to provide more distinctness to the text. I just needed some test text, and the console is the only thing done yet :D
February 28, 2006 12:02 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement