Advertisement Jump to content
  • Advertisement
  • entries
  • comments
  • views

Crack of Dawn Productivity

Sign in to follow this  


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.
Sign in to follow this  


Recommended Comments

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

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!