Well I'm at a stage where I can understand both enough to make good progress, so I've started my learning process properly now.
The first piece worth showing is FPS Movement in a room, tomorrow I'll probaly extend that (If I decide that I don't want to enjoy the nice weather) by adding 3D models and whatever I can do to it, most likely the 'make teapot' command

I'll also post commented code (as soon as I've commented them) of each piece I do
Here is screeny numero uno
It doesn't look like much when it comes to 3D, but its a start to something a lot better (hopefully)
[edit]
Source code with comments
//
// Truevision 3D SDK 3D test
// Declare what you are using in this application
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using TrueVision3D; //Add the TrueVision3D lib to the USES clause.
namespace Truevision_Game_Test
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
/// <summary>
/// These are the classes that have to be declared if you choose to use them
/// We will need the classes so C# knows what part of Truevision we are using
/// and makes truevision related commands valid (only valid to those in declared classes)
/// So if were were to use anything 'Global' then we would us TVGlobals and declare any name we
/// decide for it, make it sensible.
/// For this we will need only to use these ones here (Some are not used, but
/// they are from previous test leading up to this code
/// </summary>
TrueVision3D.TVEngineClass tv;
TrueVision3D.TVSceneClass scene;
TrueVision3D.TVInputEngineClass input;
TrueVision3D.TVMeshClass teapot;
TrueVision3D.TVScreen2DText tv2dt;
TrueVision3D.TVGlobals TVGlobal;
TrueVision3D.TVMeshClass Room;
TrueVision3D.TVCamera Camera;
//These variables will need to be declared, these will be used for camera positions etc
//at the moment they carry no value we will use, but we have made them as floats
//and you should know what a float is, if not, I pity you.
float sngPositionX;
float sngPositionY;
float sngPositionZ;
float sngLookAtX;
float sngLookAtY;
float sngLookAtZ;
float sngWalk;
float sngStrafe;
float sngAngleX, sngAngleY;
//More variables, but more of the mouse input
int tmpMouseX, tmpMouseY;
short tmpMouseB1, tmpMouseB2, tmpMouseB3;
int tmpMouseScrollOld, tmpMouseScrollNew;
//Declare the 'finished' varible and set its initial value
int NotFinished = 1;
//This stuff is all automatic in C#, I wouldn't worry about the automatic stuff
private System.Windows.Forms.PictureBox pictureBox1;
//these three are for the menu strip, you can ignore it
private MenuStrip menuStrip1;
private ToolStripMenuItem gameToolStripMenuItem;
private ToolStripMenuItem quitToolStripMenuItem;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose(bool disposing)
{
NotFinished = 0;
tv = null;
scene = null;
if (disposing)
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose(disposing);
}
//This next bit is Windows form generated until the comment signifying an end
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.gameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.quitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
// pictureBox1
//
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox1.Location = new System.Drawing.Point(0, 24);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(584, 461);
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.gameToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(584, 24);
this.menuStrip1.TabIndex = 2;
this.menuStrip1.Text = "menuStrip1";
//
// gameToolStripMenuItem
//
this.gameToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.quitToolStripMenuItem});
this.gameToolStripMenuItem.Name = "gameToolStripMenuItem";
this.gameToolStripMenuItem.Size = new System.Drawing.Size(50, 20);
this.gameToolStripMenuItem.Text = "Game";
//
// quitToolStripMenuItem
//
this.quitToolStripMenuItem.Name = "quitToolStripMenuItem";
this.quitToolStripMenuItem.Size = new System.Drawing.Size(107, 22);
this.quitToolStripMenuItem.Text = "Quit";
this.quitToolStripMenuItem.Click += new System.EventHandler(this.quitToolStripMenuItem_Click);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(584, 485);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.menuStrip1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
this.Name = "Form1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "FPS Movement in Truevision";
this.Load += new System.EventHandler(this.Form1_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
/// <summary>
/// End of windows forms generated code
///
/// The main entry point for the application.
/// Starts the application
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
//This private void is useful for loading parts, there is no loop, so texture/object files
//all can be loaded here
private void Form1_Load(object sender, System.EventArgs e)
{
// SetUp the newly declared parts
//For those experienced with Dark Basic, it could be described as this part is like
//x# = object position x(1), however you will need these when you want to make
//a command, you will use these labels as prefixes to the commands you will need
//to use, look at tv = new TVEngineClass(); tv would be used as tv.something, for
//example, look futher down to find tv.SetDebugFile, the command SetDebugFile is
//a command from the Engine class (look at the classes in the TV3D help files)
//which is why you will need the .tv infront of it
//We declared these new labels, now when these labels if you like are
//used at anytime like 'tv.DisplayFPS' tv will start a new class of the
//TV EngineClass and will use the 'DisplayFPS' command found inside of it
//So be sure to use all of the previous declared ones
tv = new TVEngineClass();
scene = new TVSceneClass();
teapot = new TVMeshClass();
tv2dt = new TVScreen2DText();
TVGlobal = new TVGlobals();
Room = new TVMeshClass();
Camera = new TVCamera();
input = new TVInputEngineClass();
//Show the App before we init
this.Show();
this.Focus();
//Set the debug output file
tv.SetDebugFile("c:\testcsharp.txt");
//Display the FPS
tv.DisplayFPS = true;
//This will execute the application as fullscreen
//Arguements are = width(1024),height(768),depth(32),TnL?(true),Vsync,depthmode(The current DMode calculates the best one for your system
//gamma, Form Handle)
tv.Init3DFullscreen(1024, 768, 32, true, true, CONST_TV_DEPTHMODE.TV_DEPTHBUFFER_BESTBUFFER, 1, 0);
//swap this next comment with the full screen to get a window mode which will execute through
//the picture box labelled
//tv.Init3DWindowedMode(pictureBox1.Handle.ToInt32(), true);
scene.SetSceneBackGround(0.3f, 0.5f, 0.9f);
//Earlier we made the variable, now they get numbers, just do as so
//Set Variables
sngPositionX = 0;
sngPositionY = 20;
sngPositionZ = 0;
sngLookAtX = 0;
sngLookAtY = 20;
sngLookAtZ = 50;
sngWalk = 0;
sngStrafe = 0;
//Set the Scene camera, this will position and point the camera as set by the
//previous variable
scene.SetCamera(sngPositionX, sngPositionY, sngPositionZ, sngLookAtX, sngLookAtY, sngLookAtZ);
//This will load the textures needed and give name numbers (rather than in DBP giving numbers)
scene.LoadTexture("C:/Documents and Settings/Bryn/Desktop/Folders (Desktop)/Cinema 4D CE 6/boat texture2.bmp", -1, -1, "wall");
scene.LoadTexture("C:/Documents and Settings/Bryn/Desktop/Folders (Desktop)/Cinema 4D CE 6/grass_T.bmp", -1, -1, "floor");
// create a new mesh object and call it "room"
//This will declare progress of building a room object
Room = (TVMeshClass)scene.CreateMeshBuilder("room");
// add the walls to the room, and texture them, it looks confusing, but look for it
//in the help file and what each part means is clearly explained (as with all commands)
Room.AddWall3D(TVGlobal.GetTex("wall"), 350.0f, -350.0f, -350.0f, -350.0f, 350.0f, 5.0f, true, false, -50.0f, 5.0f, 5.0f);
Room.AddWall3D(TVGlobal.GetTex("wall"), -350.0f, -350.0f, -350.0f, 350.0f, 350.0f, 5.0f, true, false, -50.0f, 5.0f, 5.0f);
Room.AddWall3D(TVGlobal.GetTex("wall"), -350.0f, 350.0f, 350.0f, 350.0f, 350.0f, 5.0f, true, false, -50.0f, 5.0f, 5.0f);
Room.AddWall3D(TVGlobal.GetTex("wall"), 350.0f, 350.0f, 350.0f, -350.0f, 350.0f, 5.0f, true, false, -50.0f, 5.0f, 5.0f);
Room.AddFloor(TVGlobal.GetTex("floor"), -350.0f, -350 - 0f, 350.0f, 350.0f, -50.0f, 10.0f, 10.0f, true, false);
// The render loop
//Anything that needs to loop, will be placed here
//This will start the loop (Not Finished had to be declared, so as during
//the variable 'notfinished' equals the number 1, all these commands will be
//execute continuously, hence a loop
while (NotFinished == 1)
{
//Check Movement and Input
CheckMovement();
// Clear and Render
tv.Clear(false);
//This will render all availible meshes in the scene, except, we don't have anymeshes !
//Just yet, but its a good place holder for when you add them
scene.RenderAllMeshes(false);
//Our 'hello world' sort of thing
//Its pretty much straigh forward, but make sure this goes AFTER
//Render all meshes, otherwise the text will be behind the meshes/3D objects
tv2dt.ACTION_BeginText();
tv2dt.NormalFont_DrawText("This is a room made in Truevision SDK with C# with FPS Movement", 10, 30, TVGlobal.RGBA(255, 255, 255, 1), "Arial10");
tv2dt.NormalFont_DrawText("Movement: WSAD and Mouse", 10, 50, TVGlobal.RGBA(255, 255, 255, 1), "Arial10");
tv2dt.ACTION_EndText();
//Well, this is so that the images actually render themselves
tv.RenderToScreen();
// Process application messages
Application.DoEvents();
}
}
//you may ignore these 2 private voids and move onto Check Movement()
private void button1_Click(object sender, System.EventArgs e)
{
Application.Exit();
}
private void quitToolStripMenuItem_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void CheckMovement()
{
//Check if we pressed the W key, if so, then we are
// walking forward.
if (input.IsKeyPressed(CONST_TV_KEY.TV_KEY_W))
{
sngWalk = 1.0f;
}
// If we are not walking forward, maybe we are walking backward
// by using the S button? If so, set walk speed to negative.
if (input.IsKeyPressed(TrueVision3D.CONST_TV_KEY.TV_KEY_S))
{
sngWalk = -1.0f;
}
// Check if we pressed the A key, if so, then strafe
// on the left.
if (input.IsKeyPressed(TrueVision3D.CONST_TV_KEY.TV_KEY_A))
{
sngStrafe = 1.0f;
}
// If we are not strafing left, maybe we want to strafe to the
// right, using the D key? If so, set strafe to negative.
if (input.IsKeyPressed(TrueVision3D.CONST_TV_KEY.TV_KEY_D))
{
sngStrafe = -1.0f;
}
// Now, for the mouse input...
// We pass the actual value of the mouse scroller to the variable
// that holds the old mouse scroller value.
tmpMouseScrollOld = tmpMouseScrollNew;
// By using GetMouseState, we get the movement of the mouse
// with the speed of the movement. The fastest the mouse movement
// will be, the higher will be the return.
input.GetMouseState(ref tmpMouseX, ref tmpMouseY, ref tmpMouseB1, ref tmpMouseB2, ref tmpMouseB3, ref tmpMouseScrollNew);
// by adding or substracting the mouse return value.
sngAngleX = sngAngleX - ((float)tmpMouseY / 100);
sngAngleY = sngAngleY - ((float)tmpMouseX / 100);
// We will add a simple check, so we can't look up at more
// than 80 degrees nor down than -80 degrees.
if (sngAngleX > 1.3)
{
sngAngleX = 1.3f;
}
if (sngAngleX < -1.3)
{
sngAngleX = -1.3f;
}
// Okay, now for the smothing of the movement... We checked
// above if we were pressing a key. If so, then we updated the
// movement variable to 1 (positive or negative). Here, we
// lower this value until it get to 0. This method give us a
// smoother camera movement. We start by updating the forward
// and backward (walk) movement.
if (sngWalk > 0)
{
sngWalk = sngWalk - 0.05f;
if (sngWalk < 0)
{
sngWalk = 0.0f;
}
}
if (sngWalk < 0)
{
sngWalk = sngWalk + 0.05f;
if (sngWalk > 0)
{
sngWalk = 0;
}
}
// Now, we update the left and right (strafe) movement.
if (sngStrafe > 0)
{
sngStrafe = sngStrafe - 0.05f;
if (sngStrafe < 0)
{
sngStrafe = 0;
}
}
if (sngStrafe < 0)
{
sngStrafe = sngStrafe + 0.05f;
if (sngStrafe > 0)
{
sngStrafe = 0;
}
}
// Update the vectors using the angles and positions.
sngPositionX = sngPositionX + (float)(System.Math.Cos((double)sngAngleY) * sngWalk * tv.TimeElapsed()) + (float)(System.Math.Cos((double)sngAngleY + 3.141596 / 2) * sngStrafe * tv.TimeElapsed());
sngPositionZ = sngPositionZ + (float)(System.Math.Sin((double)sngAngleY) * sngWalk * tv.TimeElapsed()) + (float)(System.Math.Sin((double)sngAngleY + 3.141596 / 2) * sngStrafe * tv.TimeElapsed());
sngLookAtX = sngPositionX + (float)System.Math.Cos((double)sngAngleY);
sngLookAtY = sngPositionY + (float)System.Math.Tan((double)sngAngleX);
sngLookAtZ = sngPositionZ + (float)System.Math.Sin((double)sngAngleY);
// With the new values of the camera vectors (position and
// look at), we update the scene's camera.
scene.SetCamera(sngPositionX, sngPositionY, sngPositionZ, sngLookAtX, sngLookAtY, sngLookAtZ);
}
}
}
I am sparticus and so is my wife