Sunday, October 14, 2012

Setting the Stage

I figured I'd use this first blog post to do something I rarely see other game development focused blogs do, give some hints and tips before you write a single line of code. Whether you are an industry professional or a hobbyist, these items will make your life much easier and help make you more productive. I'm going to skip over things like IDEs as that could swallow a few pages and then some, but in the end everyone has their own preference and that's what it normally comes down to. On to the tools!

Source Control

By far one of the most important items to setup before you begin a project is source control. Even if you are a team of one, source control allows for easy backing up of your code, complete control on what code goes into trunk, branching for risky changes, and a definitive time lapse view of the changes to your code base. I cannot tell you how many times source control has saved my life by allowing me to revert changes I made while debugging or just authoring a system and deciding it wasn't quite setup the way I wanted. You can also double the effectiveness of your source control by signing up for a free online storage solution, like Dropbox, and having your code depot output to whatever folder is watched by that storage solution. This gives you free online back up of all submitted code. Now if your computer explodes at least you still have your months/years of code to comfort you as you recover in the hospital from computer shrapnel.

Perforce (p4v client)

As far as what source control to use, I highly suggest Perforce. Not only is it trivial to setup, it's free for small teams (you're limited to 2 users), has numerous tutorials available online, and is pretty much the industry standard in game development (at least in my experience).

Note: My experience with the Perforce plugin for Visual Studio is that it is dubious at best. I would recommend just using the p4v client and checking things out as you work on them. If you're the only user, you can even be really lazy and check out the entire depot and just revert unchanged files before submitting.

Graphics Debugging

Graphics hardware is becoming increasingly important as GPUs are moving to be extra processors for the CPU to send tasks in addition to rendering vast amounts of geometry. Unfortunately, debugging shader code is a nightmare without any tools to help you make sense of what is happening with all your various buffers and the data you fed to the GPU.

If you are developing using DirectX as your graphics API, the DirectX SDK comes with PIX. PIX is an amazing tool that offers a variety of experiments to help you drill down and see exactly what is in your vertex/index buffers and how that data is transformed as it goes through the pipeline. You can step through shader code (albeit in assembly) and get pixel history information as well.

PIX

One of the newer tools that was recently released for NVIDIA hardware is NVIDIA Nsight (for Visual Studio and Eclipse). I've only recently begun using it in conjunction with PIX but so far it is incredibly helpful (you need 2 machines to effectively use it as Nsight will be sending debug commands to the target GPU and could cause the machine to reboot unexpectedly). The support for breakpoints, auto/local variables, and profiling information is a much welcomed addition to my shader debugging toolbox. NSight works with OpenGL / DirectX 9 - 11 / OpenCL / CUDA .

NVIDIA Nsight

For you AMD(formerly ATI) folks, AMD has a page with all the tools they support with their GPU chip sets. Unfortunately I don't have much experience with these tools so I can't give quite as in depth review of them. Give them a shot and let me know how well they work for you!

A (Better) Text Editor

This one is easy. Get a better text editor besides Notepad, gedit, or vi. Personally I like Textpad but I've heard great things about Notepad++ as well. You will be shocked how a good text editor will make your life much easier whether you are just taking notes as you work on a problem, documenting a system, or editing some text based meta file (i.e. XML).

Textpad



I think that's about it. I could probably ramble off a few more tools but those 3 categories are by far the most important and what I go to install anytime I'm setting up a new machine or beginning a new project. If you have any questions, or would simply like to add a tool that you find helpful, feel free to comment. Next time I'll talk about organizing your code to create a code nest egg of sorts that allows you to quickly get projects up and running all while building up your technology base.

2 comments:

  1. I second Notepad++!

    For Perforce, I highly recommend utilizing the command line in Visual Studio. It's dead simple to get some basic commands added to the Tools menu such as p4 edit to check out and p4 add. Plus, you can then set a shortcut for it so that whenever you edit a file you can just hit something like Alt+T+4 to make sure it gets checked out into Perforce.

    Smart first post, man.

    ReplyDelete
    Replies
    1. Thanks. Agreed with using the p4 executable directly via hotkeys/external tool macros. I have it setup in Textpad where CTRL + 1 checks out my current file.

      Delete