Site Sections

Thursday, January 3, 2008

More Fun With VB and Visual Studios

So, its been a while since my last post. Holidays and such keeping me busy (not to mention Zelda, Twilight Princess for my new Wii and Final Fantasy Tactics, War of the Lions remake for the PSP. Both are awesome games and you should play them if you haven't!).

ANYWHO, no huge changes to my engine yet. I've been working with a friend of mine at work on how to handle the level design portion of the engine (editors, state machines, good stuff like that) and hopefully we will be getting something together soon. It might just end up here some day (hint hint).

For now here are some neat/not so neat things I've learned about Visual Studios in the past couple of days while working in VB at work...

  1. Pressing Ctrl and the dash '-' key will move the cursor to the previous place you have edited, like undo (Ctrl Z) except it doesn't undo your changes. Ctrl Shift dash will go forward if you have already traversed backwards in your change list.
  2. Linking files to a project is a super handy way to add functionality from a different project without having to copy the file. To link a file, right click the project, go to add existing item, browse for the file to link and select the drop down arrow next to the open button, this will give you the option to link. It doesn't copy the file, it simply creates a link to the file in the project for the purposes of building.
  3. Using multiple solutions/project combinations allows for easier manageability without having to clutter a single project for large scale projects. Be careful though if you have more than one project in a solution that link the same file. Visual Studio will not allow two classes of the same name (even if it is the same file) within the same namespace. To fix this, right click on your projects and go to properties and provide the project a unique root namespace.
  4. In VB, if you set your tabbing to be replaced with spaces, and you press space 4 times (or the number of spaces your tabs are set to, mine is 4 which is default), then press backspace to delete a space (say you only want 3 spaces), Visual Studios will delete all 4 spaces as if it were a tab. I don't know about all of you but I find this very frustrating when I didn't even press tab in the first place. If any of you knows of a registry hack or something to fix this, please let me know.
Just a few tips and tricks and quirky behaviors of Visual Studios for all of you to take a look at and play with. Let me know if you learn anything else interesting that might be beneficial to add to this list.