Now the people at SlickEdit® released a package of VS2005 enhancements, too. More info.
Other todays favourite links are openadaptor.org, bloodmasters.com and TiddlyWiki.
matthias gall – product architect
Now the people at SlickEdit® released a package of VS2005 enhancements, too. More info.
Other todays favourite links are openadaptor.org, bloodmasters.com and TiddlyWiki.
Microsoft has released a Power Toys package for VS2005.
Visual Studio 2005 IDE Enhancements are a set of Visual Studio extensions that are designed to make you more productive. These enhancements are directly integrated into the Visual Studio IDE. This set of enhancements includes Source Code Outliner, Visual C++ Code Snippets, Indexed Find, Super Diff and Event Toaster tools. All these tools except the IDE Event Toaster can be invoked from Visual Studio’s View.OtherWindows menu group. The Event Toaster tool can be configured from the Tools Options dialog under the PowerToys node. The Visual C++ Code Snippets can be invoked on any C++ source file. Previously, these enhancements were only available via the Visual Studio 2005 SDK. This installation does not require Visual Studio 2005 SDK.
- Source Code Outliner: The Source Outliner tool is a Visual Studio extension that provides a tree view of your source code’s types and members and lets you quickly navigate to them inside the editor.
- Visual C++ Code Snippets: The Visual C++ Code Snippets tool lets you insert snippets in your code by using a pop-up menu that contains programming keywords. VB.NET and C# languages have this functionality in Visual Studio 2005.
- Indexed Find: The Indexed Find tool is a Visual Studio extension that uses the Microsoft Indexing Service to provide improved Search capabilities to the integrated development environment (IDE). It sends the results of a search to the Output Window.
- Super Diff Utility: The Super Diff Find tool is a Visual Studio extension that compares text files. It uses color coding and graphics to show the difference between the files in deleted text (red), changed text (blue), inserted text (green).
- Event Toaster Utility: The Event Toaster tool is a Visual Studio extension that notifies users about specific events within the Visual Studio IDE.
Taken from here.
Many people are posting interesting queries for Google code search. Here’s another one which might make Java engineers shake their heads.
I just had a case where I wanted to make sure that a C++ template parameter was of a certain type. The template should be used for pointers to instances of class “Base” and its derivates so that I could call a method of Base on the object provided to the template class.
template< class T >
class MyTemplate
{
public:
MyTemplate( T object )
{
object->baseClassMethod();
}
};
First, I thought there would be no way to achieve this, but then I tried a static_cast which turned out to be the solution: using the static_cast ensures that the type casted to is used at compile-time. Isn’t that beautiful? If you don’t need to access the object but constrain the template to a certain type, you could use the d’tor to implement some dummy code.
template< class T >
class MyTemplate
{
public:
MyTemplate( T someObject )
{
}
virtual ~MyTemplate()
{
// constrain parameter type to "Base"
// and derivates
static_cast< Base* >( static_cast< T >( 0 ) );
}
};
Using this template with a type which is neither “Base” nor inherited from “Base” leads to a compiler error like “can’t convert ‘bad type’ to ‘Base’.
Tonight, I added the batch processing. On the left image, you can see a set of six input images on the left, and three output images on the right (all images at 50% zoom, another feature I added).
The packing is not optimal in a mathematical sense, but it’s effective anyway, as the shot on the right shows. These (100% zoom) images were randomly picked from a set of output images which were created when I reorganized all of the plants we have in DVW to test my tool.
Tonight, I enhanced the tool (codenamed TexTorture, hehe) with a little rectangle packing algorithm. Taking an unsorted list of sprites (i.e. rectangles), the outcome is already quite lovely. Next, I will try how presorting of the rectangles by width, heigth or area will affect the result. Finally, I want to be able to merge n input textures into m output textures, where m<<n, hopefully.

I just wrote a quick and dirty Java/Swing tool. It loads and autodetects DVW sprites from a texture file and allows to reorganize them. This is useful for stupid programmers like me who don’t want to mess around with mspaint.exe or The GIMP but feel the urge to move sprites around for whatever reason. I am planning some improvements like a textual export of the rectangle coordinates and a cool algorithm to align the sprites automatically including batch processing, but for now, manual moving of the sprites is exactly what I wanted. Btw., the autodetection is done using a simple floodfill approach which proved to be sufficient for my test texture. I might find other textures where this approach isn’t enough, therefore I will provide means to apply a dilatation operation on an image and to merge detected rectangles.

While I wrote this tool, I recognized a little problem in the AWT drag and drop framework, java.awt.dnd.DropTargetListener in particular. I used DropTargetListener#dragOver(DropTargetDragEvent) to listen for dragging but found that there was no (direct) way to find out which object was actually dragged (those objects implement java.awt.datatransfer.Transferable). I was not the first one who stumbled over this, like the entries in Suns bug database showed, and fortunately one suggestion from this page worked for me:
DropTargetDropEvent tempDTDropEvent = new DropTargetDropEvent( dtde.getDropTargetContext(), dtde.getLocation(), 0, 0 ); Transferable dragData = tempDTDropEvent.getTransferable(); MyTransferable trans = (MyTransferable) dragData.getTransferData( MyTransferable.DATA_FLAVOR );
This issue was fixed in Tiger where an appropriate getter for Transferable was added.
I just read something in AI Game Programming Wisdom 3 which sounded sooo familiar to me. Sergio Garces of Pyro Studios writes about game architecture regarding the game objects, “… we often see examples of inheritance abuse, making the fundamental mistake of confusing behaviour (what objects do) with identity (what objects are)”. This is exactly one of the many mistakes I did in DVW, where the inheritance hierarchy is like Entity<-Unit<-Vehicle<-Constructor<-KPBConstructor or Entity<-Unit<-Building<-UnitFactory<-BunkerBarracks. It works, but this really is not the way I would do again. Next time, I would use a part-based approach like sheijk|6S is doing in Velox3D, i.e. the game designer (not necessarily the programmer!) creates units out of several abilities, just like plugging and playing: plug in a motor, and the entity could move; plug in a weapon, and the entity could attack or fight back; plug in a brain (i.e. some AI) and it knows how to use its parts.
![]()
But we’re making good progress anyway.
Many of us are enthusiastic about getting into the game industry. And the more enthusiastic we are, the more we might wonder why people are happy to leave the business again. At the end of 2004, a blog entry widely known by the authors nickname, ea-spouse, rocked the boat. I remember that many professionals joined in complaining about the working conditions. Recently, I read two similar articles again: Jurie Horneman of ex Rockstar Vienna wrote that he was glad when the studio was shut down. He refered to another article entitled The joyful life of a lapsed game developer whose author was glad to have left the industry for good.
How can it be that so many want to get in, and at least some are happy to get out again?
Let’s face it. The trouble is that the game industry still is an industry. Like in every other business, be it software or whatever, there are customers, deadlines, and consequently there are crunch times. And I’d expect my employees to commit themselves to the project to some level. This does not mean that overtime should be the custom, nor this means that a company has a right to exploit its employees. But for me, the willingness to do extra hours was part of my employment contract. On Sundays or holidays, if required. Also, I had to agree to relocate to another site of my company if necessary (which could be Cologne<->Calgary in my company, for example). Working in a fast moving industry requires some flexibility.
The second thing is how people got laid off recently at Rockstar. Apart from the many creative and technologically skilled people and those people who feel that making games is their profession, there are business people who don’t care about your great story, your cutting edge technology, whatever. Those people just see these little numbers at the end of the fiscal year. Those people might make mistakes just like we (the creative idealists on the other side of the table) might do, but in the end they’re just doing their job. I believe – well, I hope, at least – that they had a good reason for their decision, and I’m confident that those who are skilled and flexible enough will find a new job soon – be it game development or not, there are a lot of related fields. If not… Darwins natural selection comes into mind.
While this is my very rational point of view, the emotional one is that I feel deepest sympathy for those who got laid off in such a bad manner. And I never want this happen to me. But it will, and I will have to face it, too, I guess. My employer handed out a little book called “30 minutes for sovereign dealing with changes” to all employees several months ago. The actual intention is still unknown to me, but you might guess what many of us feared…
I found a great example why (software) patents suck on the IGDA homepage, and an oppressive feeling arises when I imagine what lawsuits like this mean for game developers and software engineers in general if the claim is admitted. A short excerpt:
There is an ongoing patent litigation case in the Eastern District of Texas of interest to all developers because of how broadly the Plaintiff appears to want to apply the claims of the patent. In this case, American Video Graphics, L.P. (“Plaintiff”) has sued sixteen game publishers, alleging that these defendants infringe AVG’s [patent], “Method and Apparatus for Spherical Panning.” [...] Plaintiff has identified over 1000 accused games, which Plaintiff alleges infringe their [patent].
IGDA is now desperately searching for prior art to invalidate the patent. Read the full story here.
Today I was discussing about how one could implement a stacktrace in C++, where one has not the luxury of Thread.dumpStack() or Throwable.printStackTrace(...) of Java. The general C++ approach one finds often is to create a dummy object on the stack at the beginning of each method which receives the current file and function as constructor parameters (using the __FILE__, __FUNCTION__ and __LINE__ macros) and stores them, i.e. increases a list pointer and saves the const char* at the resulting position. As soon as the object gets destructed at the end of the function, the list header pointer is decreased again. So, my first implementation looked like this:
#ifndef FINAL #define CALLSTACK CallStack dummy(__FILE__, __FUNCTION__) #else #define CALLSTACK #endif class CallStack { public: CallStack( const char* _file, const char* _function ) { file[ current ] = _file; function[ current ] = _function; current++; } ~CallStack() { current--; } static void dump() { for( int i = current - 1; i >= 0; --i ) { std::cout < < file[ i ] << ": " << function[ i ] << std::endl; } } private: static int current; static const int MAX_STACK_DEPTH = 1024; static const char* file[ MAX_STACK_DEPTH ]; static const char* function[ MAX_STACK_DEPTH ]; }; int CallStack::current = 0;>
The first test with an exception I threw somewhere deep in the call hierarchy of my program revealed what one has to remember about exceptions: objects that exist on the stack at the time the exception is thrown are ordinary destructed. So, the d’tor of my CallStack object was called, too, and current was not pointing to where I had expected. So, I had to mark the last element of my list in order to recognize it as the tail. I decided to set the following element after current to 0 so that I would iterate through the elements until I reached 0 in order to dump the stack trace:
CallStack( const char* _file, const char* _function )
{
file[ current ] = _file;
function[ current ] = _function;
current++;
file[ current ] = 0;
function[ current ] = 0;
}
I thought this would work fine, but a friend of mine pointed out this case:
void someMethod()
{
CALLSTACK;
foo(); // foo was called, end of list is still behind foo
throw; // exception is thrown and the resulting stacktrace is misleading
}
So, it turned out that I had to move the tail-pointer back, too, but only in case no exception was thrown. Someone on flipcode had a solution which required all exceptions to descend from one base class which handled this situation, but I wanted to be able to throw anything. bool std::uncaught_exception() satisfied my needs. So, if we’re in the CallStack d’tor, and std::uncaught_exception() returns true, we know that the current method just caused an exception, so we don’t need to move the tail marker anymore. It’s just that simple. I used a static bool flag bool CallStack::exc = false; to remember this situation for the following d’tors. Of course, after one handled an exception one should reset the flag so that the following d’tors set the tail marker correctly again. One should also check whether MAX_STACK_DEPTH is reached (or use std::vector), but you’ll figure this out yourself.
Well, it’s late. If someone is interested, I can provide a full example, just let me know. I also appreciate c&c, indeed. I’m sorry if the source code is messed up, WordPress seems to do this. Night.
Spread the word, Niko has released Irrlicht 0.8. I hope that I’ll have time to have a look this weekend.
We held a little gamedev contest between christmas and sylvester, and I handed an entry in, too. The goal was to create a little game using graphics from Reiners Tilesets only. You can see a little shot of my entry on the left. The programming language was unspecified, and so I decided to write a little MMORPG (Minimal Online Roleplaying Game) in Java. I had no time to test it in the Internet and found out that it’s nearly unplayable online, later, but it’s quite nice for LAN playing. The goal is to collect all gems on a map in a limited time, and to beat all collected gems out of your opponents with your sword. The entry and the other contributions, all with full source code, are available for download on the #gamedev.ger contest page.
Sidenote: I recognized that there seems to be a difference in the behaviour of the KeyboardActionListener under Windows and Linux, but I won’t investigate this issue further. If you have strange effects while trying to walk around with your character, you most likely just experience this bug.
I had to recognize that the amount of entries in my personal worklog at sechsta sinn dramatically decreased since we returned from Dusmania 6.0, June 19th/20th. But it’s not only me who became slower, as it seems. We made plans to speed up the development of our game, decided what to do the next twelve weeks or so, and were full of beans. Today, about ten weeks later, virtually nothing happened. Yes, we did do some planning, all of us coders did do some code, and the graphic artists did work on some gfx stuff. But it was nothing compared to the amount of time and the potentials we had. Although the discussion we had that Sunday outside of the Dusmania halls was quite lively, it seems like it revitalised our motivation only for that one day. After we went home after this weekend everyone seems to have fallen back into his personal lack of motivation. One point indeed is that our project lead Jochen is currently busy with relocating to Finnland for some time, and one of our coders, Julius, is relocating as well to start his CS studies the upcoming semester; mattin was busy with a contest contribution (I guess he’ll win, won’t he?), Christopher and I are busy with our girlfriends, Gereon has his own little game project and works hard for the universty, and so on, and so on.
And this is the other point: everyone has become more and more busy with other stuff besides sechsta sinn. It’s hard to tell whether this trend is just a short term phenomenon … but I better don’t think about what it means if not.
Recent Comments