About the Demo

Back when I first started working for Novint, they gave me a contract job to build a game demo. The game idea was to build something like a kid's sandbox, where you could pick up and toss around various objects, including toy cars. However, you then needed to be able to zoom in to the toy vehicles and drive them around, all using the Novint Falcon controller.


If you want to try out the game demo I built, you can find it here:

http://www.opusgames.com/games/novint/TonkaDemo/FalconTonkaDemo.zip

To run it, just unzip the downloaded file on your PC somewhere, and then run the tr1_main.exe file (though you will need a Falcon attached to your PC... otherwise you will get a pop-up error that then exits the app).

Controls for this demo are simple... use the keyboard arrow keys to move the camera around, and use the W/S/A/D keys to rotate the camera. Use the Falcon to move the hand cursor, and grab or drop items with the main Falcon button, which you should kinda feel when pressing against an object. (Note that the hand cursor is a bit buggy... for example, it often starts under the floor of the game, so you'll need to pull it up above the terrain to see it).

Move the Falcon against the "Shrink Me" button to zoom in to driving mode (the last car you picked up will be the car you zoom in to, though it defaults to the car the game starts out looking at). To drive, push the Falcon forward or back to drive forward or back, and move the Falcon left/right to turn. Hold down the main Falcon button to bring up the hand cursor, and then push into the "Grow Me" button to return to the sandbox view.


About the Demo Source Code

If you want to see the source code for this demo, complete with the Falcon DLL that runs the Falcon side of it, find that here:

http://www.opusgames.com/games/novint/TonkaDemo/Tonkasrc.zip


The source code is split into two parts... the 3DGameStudio project, and a Microsoft Visual Studio C++ project.


The 3DGameStudio Project

3DGameStudio is a small scale game engine that can be used to create 3D games. It has its limitations, but its great for prototyping ideas. You can import or create 3D models, build game levels, and then code your game using a scripting language called "C-Script" (which is something like a simplified version of the C/C++ coding languages).

I started building this project in late 2006, so some things are probably out of date now.

The version of 3DGameStudio I used to build this project was GameStudio Pro 6.40.5/WED V6.731. While you can get trial versions of GameStudio for free, I needed the full professional version to handle the physics objects in the game (the free version of the time allowed only a single physics object, while I needed to handle about twenty physics objects, between the two cars, their wheels, and the other objects in the game). Spending the money on the full professional version also allowed me to build games into a single resouce file, which came in handy with my later work at Novint.

The following is a brief description of each of the C-Script code files in the game, and a little extra info. You can find all the described files under the "src" directory.


The Falcon Haptics DLL Project

The Haptics DLL runs all the Novint Falcon forces. This DLL (or Dynamically Linked Library) was build in Microsoft Visual Studio C++ 6.0, though it can probably be upgraded to later versions of Visual Studio. You can find all the project files in the "gs_haptic_dll" directory... open the "HapticDLL.dsp" file to open the project in Visual Studio. Building the project creates the "tr1HapticsDLL.dll" file that runs all the Novint Falcon controls in the demo.

Note that you need some knowledge of C++ programming to understand how this DLL works....