How To Setup & Initialize Visual Basic .NET E-mail
The language of information interchange.
1. Requirements

You will need the Software Development Kit for The Game Basic 3D Engine. You can find this in the download section on this website. Once you have downloaded the setup you can install it by running the installer. Then follow the instructions given by the setup application.

2. References

To use The Game Basic 3D Engine in Microsoft Visual Basic .NET® you need to add a reference to the DLL in your own project. The following image shows you how you can add this reference:

Image

3. Objects Declaration & Initialization

Create a new form, and add the following code:

Imports VB = Microsoft.VisualBasic
 
' Game Basic 3D Engine Build 4096
' Copyright © Monarke Studios. All Rights Reserved.
 
Public Class Main
 
    Private Engine As New GameBasic3D.Engine
 
    ' Temporarily define the screen properties.
    Private Const Engine_Pixel As Long = 32
    Private Const Engine_Width As Long = 800
    Private Const Engine_Height As Long = 600
    Private Const Engine_Screen As Boolean = False
 
    Private Sub Main_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated
 
        ' Setup the form properties.
        Me.Width = Engine_Width
        Me.Height = Engine_Height
 
        Me.Show()
 
        ' Initialize the engine, and embark the main pipeline loop.
        If Not Engine.Initialize(Me.Handle, Engine_Width, Engine_Height, Engine_Pixel, Engine_Screen) Then
            Application.Exit()
        End If
 
        Do : Application.DoEvents()
 
            ' Begin rendering to next frame buffer.
            Engine.BeginScene()
 
            ' Synchronize with display buffer, and loop.
            Engine.EndScene()
 
        Loop Until Engine.Unloaded
        End
 
    End Sub
 
    Private Sub Main_Deactivate(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Deactivate
 
        ' Release all resources and return to the operating system.
        Engine = Nothing
 
    End Sub
 
End Class
4. Distribution

If you want to distribute your Visual Basic application you will need to ship the Game Basic 3D Engine library with your application.