You are currently browsing the archives for the Uncategorized category.
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jul | ||||||
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
- 3D Stuff (6)
- BumpTop (5)
- C/C++ (12)
- GEL (5)
- Open Source (5)
- Seneca (4)
- Stuff (8)
- Uncategorized (14)
- win32 (7)
- July 31, 2008: Work++; // Again!
- June 8, 2008: Patterns And Such.
- June 4, 2008: Work++;
- May 20, 2008: SIMD And Randomness
- April 30, 2008: Coder Burn-Out
- March 26, 2008: Some GameDev Math Resources.
- March 24, 2008: Real-Time Collision Detection
- March 17, 2008: To OSG, or not to OSG.
- March 9, 2008: The Moz Cause
- February 12, 2008: Et Tu Singletone.
Archive for the Uncategorized Category
Patterns And Such.
June 8, 2008 by Mark.
I ended up having to refactor some of my rendering engine code this weekend. It was a tough job and it involved stripping several classes of their Singleton status. The first couple were easy because they don’t connect the any crucial system. One of them being a Logger that writes error messages to a file and console window. The last class I had to strip was my Event Manager system. Now, to put it in perspective, every hefty class that has a major role in the rendering engine (ie. Renderer, Windowing, Resource Manager, etc) needs to notify some other part(s) of the system of an event. For example, if the user resizes the window, the window class must then notify the renderer that it needs to resize its back buffers. But, the window class does not know of the renderer, so everything would be routed through the Event Manager. In order to send events through it, without coupling the Event Manager to any other classes, I used the Singleton.
It worked great! Until I tried to multi thread my renderer or place the rendering portion of my code inside a DLL. Hell broke loose and my whole architecture failed. Back to the drawing board I went. As a side note, when I started searching for a new way of dealing with this, I came upon a really cool website which proudly displayed this image:

Hilarious! I thought, Who would of thought that Patterns can be displayed in a periodic table. But that was beside the point. I eventually came to the conclusion that one must make a singleton but without a singleton. My solution was this: Create a Factory that spits out message dispatchers, but with a slight twist. Only spit out a pointer to the same dispatcher over and over, therefore creating only one instance of that dispatcher for all objects that want to use that specific Event subsystem. Why, you may ask. Because that lonely dispatcher knows how to communicate with the Event Manager. As the Dispatcher was being created by this factory, it was given a pointer to the manager. So now you have a direct link between a Dispatcher and the Manager. Lastly, all you need is an Event Listener. This listener takes in a pointer to a dispatcher and since it knows how to contact the Manager, it registers itself with it so that it may receive messages. All the programmer has to do is derive a class from this Listener class and it automatically has the capabilities to send and receive messages. To an extent its a fancy version of the observer pattern. I especially like this because I just replaced a Creational pattern with a Behavioral pattern.
This is not the only method I came up with, but its the cleanest one. Although, it sounds like there could be problems with memory management and loose pointers, but I do not believe so. I posted a question regarding this on GameDev, and there was a plethora of responses. I used that as my platform to kick off searches that were more in depth then what was talked about.
On a different note, I used a program called StarUML to model my entire engine. The results are here, but I must warn you, its big, its complex, and not quite finished. Feedback is always welcome as I am always looking for ways to improve it.
Posted in Uncategorized | No Comments »
Some GameDev Math Resources.
March 26, 2008 by Mark.
I’ve been scouring the internet for some decent resources on math, collision detection, and physics, so here are some:
- Essential Math
- Game Physics Resources
- Real-Time Collision Detection
- Advanced Character Physics
- Simple Math Primer
- Flipcode’s Articles
- Harvey Cartel’s Collision Detection Site (Thanks Miksago)
More to come, later.
Posted in GEL, 3D Stuff, C/C++, Stuff, Uncategorized | 1 Comment »
The Moz Cause
March 9, 2008 by Mark.
Being an avid slashdot reader, I read a lot of stories that are mostly based off fact. Then again, some are based off of total trash. I have witnessed the lack of informational prowess by story writers, but in this latest case, I don’t know where I should stand. The article in question is about the Acid3 test that browsers are benchmarked on. According to this story, Safari scores 90% and my favorite browser of all (Firefox) scores a mediocre 69%. This tells me one of two things, either the story is a complete joke or it’s a bold statement about Firefox’s web compliance. I have use Safari and I am not very impressed. It has many flaws that hamper my browsing experience (such as tables not being aligned correctly, flash issues, colors, etc). But those are all small things and if this Acid3 test is the industry “standard”, then I say its not much of one. I believe it might be favoring the Safari side or that it was built off standards that Safari developers pushed forth. In essence, a standard is a standard is a standard and should be taken with a grain of salt when trusting it’s verdict.
Posted in Uncategorized | 8 Comments »
Happy New Year!
January 2, 2008 by Mark.
Well, Happy New Year to all. I, for one, am relieved that this year has come to a close. December was by far, the worst - Exams, moving into a new apartment, Christmas with 3 families, and over $1000 spent on presents.
I gave Connie a Nintendo Wii for Christmas and so far I’ve been the one playing it the most. But for those of you that are looking to buy one, I say good luck. Walmat, Best Buy, etc. have them in stock, but only put one or two out on their shelves per day. They do this so that your forced to come into their store and “browse.” So unless your incredibly lucky, you will be greeted to empty shelves. But if you do get one, I suggest getting a game by the name of Rayman, Raving Rabbids. Its my newest addiction.
Posted in Uncategorized | No Comments »
Test…Test…
June 19, 2007 by Mark.
Fridrich enlightened me on the ways of using the Linker environment variables and my libsvg woes have been shelved. So, my coding progress as afoot again. here are the results of my current test to get lines working. The scaling is a bit off (which I’m trying to fix at the moment) but if everything works as planned, I should have the majority of the functionality finished by the midterm review.
My output is available here.
Original output is available here.
Posted in Uncategorized | 4 Comments »
Scalable Linker Error?
June 17, 2007 by Mark.
My OO.o work is relying heavily on the SVG library (libsvg) for parsing unfortunately. And currently, that specific library is not being cared for and has sat at its current version for a while now. I believe the last major update was sometime in 2005. So either its a shining example of perfect programming or its forgotten about. Remarkably, this is where the majority of my problems lie!
First off, the library itself does not accept streams and therefore requires direct access to a file, which may or may not be local to the user. Secondly, it requires the JPEG library (libjpeg). While I was building libsvg, it linked to the JPEG library correctly and without incident. But, when you try to link to the libsvg library, it freaks out saying that it cannot find libjpeg. Now the question is weather to continue developing and trying to fix the SVG library or modifying the code to use the internal XML parser inside of OpenOffice [Pastebin’d Error: http://pastebin.ca/570784]. Eventually, according to my mentor, libsvg will get replaced with the internal parser, but when this will happen, I am not sure.
On the other hand, while casually looking around for a solution to the above error, I actually got a nice chunk of coding done. I added functionality for line drawing, as well as some other minor things. Nothing too spectacular, but once the compile bug is fixed, there will be some visual feedback. Joy.
Tea is needed in vast Quantities!
Posted in Uncategorized | No Comments »
OpenOffice.org And Paintball.
June 14, 2007 by Mark.
Lately, I’ve been integrating some of Kendy’s code into my own. I’m still not sure if I have the initial reading of SVG files right; the extension still doesn’t show up in the File Types list when I try to open a file. It is really hard to see where I am going wrong because I do not have enough experience with the code to actually determine the cause of my mistake. The code itself relies on so many different objects and name spaces that it is easy to get lost in there.
Regardless, I have received one of the crowning moments from my paintball trip. Check it out here.
Posted in Uncategorized | 1 Comment »
Who Wrote The ESP Package Manager?
June 12, 2007 by Mark.
So, I forgot to set an environment variable while building some of my code and it turns out that the ESP Package Manager (EPM), specifically the version that comes with the SRC680_m211 build of OOo, has a bit of a buffer overflow in it. If your using long file names or paths that have more then 255 characters in it, you will get a nice warm and fuzzy segmentation fault. I never noticed this before. Also, apparently the newest version of EPM (4.1) fixes this bug.
Lovely.
Anyway, I’m still trying to get auto-recognition of SVG files to work. I’m lost in a sea of code. More on this later.
Posted in Uncategorized | No Comments »
Weaving The Web…
June 9, 2007 by Mark.
I’ve been having fun poking through code but its about time to plug some of my changes into the build. I managed to put together some files that will allow OpenOffice to know that *.SVG files can now be imported even though the actual logic for importing them is not there yet. Nevertheless, I plugged them into the build and…failure. I don’t see the extension being registered inside the File>Open dialog. One reason why this might be is because of the fact that the tags and attributes in the *.xcu files I wrote were basically copied and pasted right from some site. Also, the meaning of those tags and what they do is beyond my level of understanding, at this point. Am I missing something? I hope there is a page on the wiki that explains what they mean…somewhere. Another thing I noticed is that the code inside OpenOffice reaches so far deep into other sources files, that it would probably take one man a thousand years just to understand it all. Its like trying to straighten out Christmas lights that are tangled up into a web the size of several football fields.
It’s time to blow off some steam. 14hr work days are starting to take their toll on me and I have an itch that needs scratching. An itch that can only be fulfilled by blasting paint at others. Thats right! Paintball.
Posted in Uncategorized | No Comments »
Something I Noticed…
June 7, 2007 by Mark.
While building OpenOffice (ooo-build), I noticed somewhat of an easter egg. Who said developers only drink Coke and Coffee?
…
Checking for source packages in /home/markp/ooo-build/src
Looking for src680-m211-core.tar.bz2 … ok
Unpacking OO.o build tree - [ go make some tea ] …
Unpacking src680-m211-core.tar.bz2…
…
You don’t argue with a script, you do what it says. Tea was good.
Posted in Uncategorized | 1 Comment »