Programming Overload!
by
, 01-17-11 at 12:41 AM (3216 Views)
It's been a while since my last blog and I'm not following what I laid out for myself at all. However, I've been feeling pretty good for the last two months and decided to take on three small-to-medium-sized projects:
- Teamspeak 3 Query Plugin,
- C++ 'Windows Made Easy!',
- and Some Recent PHP Work that will come to light soon.
For the Bad-Company 2 Fans
We (TPG) recently fired back up our Bad-Company: 2 server due to popular demand (and because EA decided to get off their butts and fix some major issues, i.e., networking). However, in EA's haste to throw Bad-Company: 2 to the way-side, they forgot to fix the VOIP (Voice over IP). Some (unnamed) TPG junkies approached me and asked if I could write an addition for PRoCon that would synchronize a Teamspeak 3 server with a Bad Company: 2 server. I accepted.
Defiant, one of the main causes BC:2 is back in action, had developed a script in PhP that did essentially what I was writing. However, due to complications with programming in general, it was "slow" or "sluggish" to recognize when people joined the server. Let me back-up a second; the goal I was trying to accomplish was simple: move people in Teamspeak to the correct channel based off their team in Bad Company 2. Fast-forward; In short, I had to learn Threading and Networking in C#. I'm tooting my own horn here (probably pre-maturely), but I kicked ass. There are still some minor issues with the plugin I wrote, but nothing devastating.
If you want to check it out, here's my latest release TeamspeakSync_0.7.zip.
Windows in C++? Huh?
In school, my professors never felt it was necessary to teach the students anything about GUI's. Don't get me wrong here, I'm not ranting, I'm just stating what happened. Being the crazy fool I am, I dove into the intricacies of Human-Computer Interaction blindfolded, both arms tied behind my back. My first adventure was Java, freshmen year. I made a calendar program to remind me when homework was due (because I'm a scatterbrain!)-it worked marvelously. But I wanted more... I looked at Microsoft Foundation Classes in C++ back then as well, but was overwhelmed. I made a smoother transition to C#, where I built several programs (that worked, but never had the functionality I wanted them to) such as my Flash Card program.
Somewhere down the line, I became acquainted with C++ (I had one class on it, which was over data structures, so not much experience in class). My previous semester I was building a 3-D Game Physics engine (which I'm also re-building, as it was just a big hack-together of code) and I was introduced to Open-GL and GUI's in C++. After my classes ended, I thought, "I'm going to mess with windows in c++!" And so I have. I found out it's pretty much hell to create a window in C++, so I decided to make it easier. Normally, you have to create a "window class" that basically holds some general settings about a window. Then you have to create the actual window, passing in even more settings. Finally, you have to handle all the messages (key strokes, mouse clicks, etc) given to that window. To make things easy, I encapsulated all of that into one simple object.
I'm not going to post any code, however, I'll give you some pseudo-code to check out what I did:
As for my PhP project?Code://C++ Code: Window myWindow(); //What happens: //The default 'window class' is used by constructing a static WNDCLASSEX strucure (the general windows settings). //The window is created, saving all the window specific settings. //The messages are thrown into a universal message handling loop for all windows. // When a message appears, it re-directs it to the window it belongs to and goes through a list of delegates (pointers to functions) // which have been 'registered' to that window by other classes. I.e. Events.
Well, hopefully you'll see soon enough. It wasn't really my idea to start with, but I just kinda stole the reigns and took off. I guess if you want to see some of my web-work, check out my website for my dad. My previous blog about my website is some-what out-dated, as my father never decided to find a host (makes me wonder what he really thought about the site Q_Q) but, there you go.
Conclusion
I know there wasn't much eye-candy this go around, but this was more of a documentation of some work I've done (for my own benefit, remember the scatter-brained comment?). Hopefully you enjoyed it.