Introduction
Downloads
Documentation
Tutorials
Pixie Lite
Forum

Home

Tutorials


1 - Hello World
2 - Bouncing Ball
3 - Multiballs

Appendices

A - Installation

Pixie - Tutorial Appendix A - Installing Visual Studio and DirectX SDK

As I mentioned in the Hello World tutorial the other day, there's certain things you need to do in order to get your Pixie programs to compile and run. Today, I'll go through the whole process, and I'll be doing it in more detail than is probably needed - but I think it's better to do it that way, then to miss some essential bit out which someone would have really liked me to cover.

Ok, so there's four main things we'll be covering:

Downloading and installing Visual C++ Express 2008

Microsoft supplies the "express" editions of Visual C++ for free. The express editions produce exactly the same results as the professional editions, and there's no restrictions on how you can use programs you make with it (it's perfectly ok to sell them, for example). The difference from the professional editions is that you can't use third-party plugins, not all the extra tools and utilities are included, and things like that. But you don't need those anyway, so it's a good choice to go with the express edition.

You can download Visual C++ Express 2008 here:

http://www.microsoft.com/express/vc/

Download Visual C++

I would have provided a direct link if I could - but apparently they thought it was necessary to have some custom button to start the download - but who knows why?

This will download an installation program, which will in turn download everything needed to install Visual C++. When you launch it, it looks like this:

Installing Visual C++ 1

Just go Next here - we don't really need to help Microsoft...

Installing Visual C++ 2

Indicate that you've accepted the license agreement - you can even read it before you do.

Installing Visual C++ 3

We don't need Silverlight (it's got nothing to do with Visual C++ anyway, it is just something they want to bundle in whereever they can) and we're not going to be using any SQL stuff, so just go Next here.

Installing Visual C++ 4

I usually go for the default install location - doesn't really matter where you put it, so just go Install >

Installing Visual C++ 5

And now we wait... depending on your web connection, this might take a while, so go read a blog or something while you're waiting...

Installing Visual C++ 6

Thought we were almost done? Nope, now it will install the stuff you've downloaded. Again, this will take some time, so go play a game or something while you're waiting...

Installing Visual C++ 7

Yay, all done. It says here that you should register, but you don't have to do it straight away. But after 30 days, it will require you to register (or it won't start Visual C++ until you do).

Downloading and installing the DirectX SDK

Next, we need to download the DirectX Software Development Kit, which is also available free from Microsoft. Game made with Pixie doesn't require DirectX to run - they run fine on computers with no DirectX installation whatsoever - but it does require DirectX SDK in order to compile Pixie programs.

You can download the DirectX SDK here:

http://www.microsoft.com/downloads/details.aspx?FamilyID=b66e14b8-8505-4b17-bf80-edb2df5abad4

It doesn't really matter which version, so we might as well go for the latest one.

Download the DirectX SDK

Again, there's a download button rather than a regular link

When you launch it, it looks like this:

Install DirectX SDK 1

Launch screen, just go Next...

Install DirectX SDK 2

Accept agreement and go Next...

Install DirectX SDK 3

Select No (we don't need to help Microsoft) and go Next...

Install DirectX SDK 4

I usually just go with the default settings - just hit Next...

Install DirectX SDK 5

Wait for the actual installation to be done ...

Install DirectX SDK 6

Yay, all done with the DirectX SDK installation too...

Pointing Visual C++ to the location of the DirectX SDK

Now that both Visual Studio and the DirectX SDK have been installed, we need to let Visual Studio know that the DirectX SDK exists, and where it is located.

Setting up the DX path 1

So, start by launching Visual C++ from the Start-menu.

Setting up the DX path 2

Once it is loaded, go to the Tools->Options menu.

Setting up the DX path 3

There's a lot of options you can configure in Visual Studio, but the one we're interested in is under the Projects and Solutions category.

Setting up the DX path 4

More specifically, it's the "VC++ Directories" settings we want.

Setting up the DX path 5

In the top-right corner of the window, we need to change the "Show directories for:" setting to "Include files"

Setting up the DX path 6

Which should display a screen something like this.

Setting up the DX path 7

Add a new line to the settings, and enter the path to the DirectX SDK Include directory, as pictured above. If you installed to a location other than the default, you need to modify the path you enter here.

Setting up the DX path 8

Next, change the "Show directories for:" setting to "Library files".

Setting up the DX path 9

Add add a new line here as well, where you enter the path to the DirectX SDK Lib/x86 directory (again, modifying the path if you didn't install to the default location).

When you're done, you just click OK at the bottom of the window, and we're all done: now you can happily compile DirectX applications, including Pixie programs.

Loading and building Pixie and the "Hello World" sample

So, we're now ready to load up a Pixie project, compile it and run it. To do this, you must download the latest version of Pixie. from the download section, which includes the "Hello World" sample program. Unzip the files to somewhere: you'll end up with a bunch of folders, including a PixieLib folder and a Sample1_HelloWorld folder.

Start and load the project 1

To load the "Hello World" sample, go to the File->Open->Project/Solution... menu.

Start and load the project 2

Navigate to where you unzipped the Pixie files to. We don't need to load the PixieLib project, as the HelloWorld sample will automatically load it for us.

Start and load the project 3

Open the Sample1_HelloWorld folder, and select the solution file, HelloWorld.sln

Start and load the project 4

When you load one of my Pixie projects in Visual C++ 2008, you will usually get the Conversion Wizard, which will help you convert the project from the Visual C++ 2003 version (which I use) to the 2008 version. I guess this extra step can be a bit annoying, but by doing it this way, I'm making Pixie available for users of more different Visual Studio versions. And the process is automatic anyway. Just hit Next (or Finish straight away, so you don't have to go through the following step).

Start and load the project 5

I usually choose to make a backup, just in case something goes wrong - but I haven't had that happen to me so far...

Start and load the project 6

Now we're ready to convert - hit Finish.

Start and load the project 7

You can have a look at the log if you like, but it's mostly just saying that everything went well (and also goes on about things they have changed in Visual C++ recently).

Start and load the project 8

Now we should have both projects loaded, "HelloWorld" and "PixieLib". Go to the Build->Build Solution menu - this will compile Pixie and the HelloWorld sample, and it will take a little bit of time the first time round - but shouldn't be too bad.

Start and load the project 9

Once the build is completed (it should report no errors or warnings), you can select the Debug->Start Debugging menu option, and this will launch the program. Hit Esc or Alt+F4 to terminate it and come back to Visual Studio.




That's it. A lot more handholding than you needed, I'm sure, but just skim past the more obvious bits, and make use of the ones that help. And if you have any problems at all getting this to work, please let me know and I'll help you get it sorted out.



Pixie University and the Pixie Game Engine is created and managed by Mattias Gustavsson.
Reproduction/republishing of any material on this site without permission is strictly prohibited.