SDK

From nDwiki

Jump to: navigation, search

The nD SDK is simply SDL, a widely used open source standard for graphics, sound, and input.

You can begin developing an nD title by compiling on Windows, Mac, or Linux, using a 320x240 resolution, using typical console type controls (D-pad, 4 buttons, two shoulder pads). Since SDL is so portable, you can test and debug your game on your development PC and cross-compile to the nD when development hardware is available. The transition is quite simple, though of course it will require a bit of extra tweaking.


Remember to check the forum for support, and help us add some tutorial code to the wiki!

We also highly suggest you check out our Recommended tools page.


Contents

Windows

There are several choices for installing the SDK.

Prebuilt

First, you can simply download our prebuilt package here: nD_SDK_v0.50.exe ( Latest version: 0.50, 2011-07-20 )

This package is the latest SVN Debugger branch of CodeBlocks, the latest TDM-GCC installed in the /CodeBlocks/MinGW folder, and the latest stable SDL in the /CodeBlocks/SDL folder. The documentation for SDL and support libs is included.

It's a 7-zip self-extracting archive, so you can run it or extract it manually with 7-zip.

Extract the contents of this archive to c:\codeblocks so that codeblocks.exe is in that directory.

c:\codeblocks\codeblocks.exe
c:\codeblocks\SDL
c:\codeblocks\MinGW
etc

Now, open C:\CodeBlocks\nD_Template\nD_Template.cbp, and Build and Run the project. This is a very simple example that demonstrates usage of basic SDL functions.


To make a new project, the simplest way is to duplicate the nD_Template directory and open nD_Template.cbp in another text editor to change the project name and directories. This directory contains the dll files that your program will need, and the .cbp file already has the libraries and directories configured.


Manual

If you'd like to put together your own package, you can do that. Here's what we used:

That's it!

Mac OS X

Under Construction

Advanced users should already know what to do.

Linux

Install CodeBlocks, SDL, SDL_image, SDL_mixer, and SDL_ttf development packages through your package manager.

example-
sudo apt-get install gcc codeblocks codeblocks-contrib libsdl1.2-all libsdl1.2-dev libsdl-ttf2.0-0 libsdl-ttf2.0-dev libsdl-image1.2 libsdl-image1.2-dev libsdl-mixer1.2 libsdl-mixer1.2-dev


You may want to download the nD_Template

You will have to change some directories inside the nD_Template.cbp file by opening it in a text editor, or by opening it in CodeBlocks and going to Project->Build Options.

If you installed SDL from the package manager, you shouldn't need the "C:\CodeBlocks\SDL" or "C:\CodeBlocks\MinGW" directories at all, and can safely remove these lines.

Also make sure to remove -lmingw32, as this is only needed on Windows.


Since the last official release of CodeBlocks is quite old, you may also want to add the CodeBlocks nightly repo to your package manager repository sources: http://apt.jenslody.de/

Of course, you don't have to use CodeBlocks, you are free to use any IDE. (gedit, emacs, eclipse, etc)

Retrieved from "http://the-nd.com/wiki/SDK"
 
 

theme:
copyright 2011 nD llc. all rights reserved. all trademarks are owned by their respective owners.
terms of service | privacy policy