Author Topic: SuperBasic  (Read 2103 times)

0 Members and 1 Guest are viewing this topic.

Offline Hotshot

  • DBF Aficionado
  • ******
  • Posts: 2114
  • Karma: 91
    • View Profile
SuperBasic
« on: March 31, 2013 »
There is new Programming language(Early Versions) that is out

https://sites.google.com/site/superbasic3d/downloads

Latest Versions is SuperBasic 0.0.1.0 and what I like about is that You dont have mess about with compiler as all you do is click IDE.exe then open the project then click the example and build and run the program!

SuperBasic 0.0.1.0

First C++ foundation test version for SuperBasic, including C++ compiler, C++ IDE, and examples. Unzip and run IDE.exe, then open an example project and press F9 to compile and run them. You can also copy one of the example folders and all the settings are working in your own project.

IF the Code is small fonts inside IDE of Code Block then you can do this

You can use Ctrl+MouseWheel to change font size, but to get best quality (no scaling artifacts), set the font size in Settings/Editor/Font/Choose.

Have Fun with it :)

Here Example of HelloPhysics example

Code: [Select]
#include "SuperBasic.h"
int main()
{
    // start engine
    sb.Start("HelloPhysics");                    // start the engine
    sb.AddWorld();                               // add a world
    sb.AddCamera("Camera1");                     // add a camera
    sb.GetNode().SetPosition(0,3,-30);           // set camera position

    // add texts
    sb.AddText("Text1","Hello Physics!");        // add a text to the current world
    sb.GetText().SetColor(0,1,1);                // set the color of the current text
    sb.AddText("Text2","SuperBasic");            // add another text
    sb.GetText().SetPosition(0,30);              // set the position of the current text
    sb.AddNode("Light1");                        // add a node to the scene
    sb.AddLight("Light1",LIGHT_DIRECTIONAL);     // add a light to the node
    sb.GetNode().SetDirection(-1,-1,-1);         // rotate the light
    sb.AddNode("Model1");                        // add a node for the model
    sb.AddModel("Models/Mushroom/Mushroom");     // add a model to the node

    sb.AddNode("Floor");
    sb.GetNode().SetPosition(Vector3(0,-0.5,0));
    sb.GetNode().SetScale(Vector3(500,1,500));
    sb.AddModel("Models/Box/Box","Models/Box/StoneTiled");
    sb.AddBody();
    sb.AddShape();
    sb.GetShape().SetBox(Vector3(1,1,1));

    for(int i=0; i<1000; ++i)
    {
        sb.AddNode();
        sb.GetNode().SetPosition(0,i*2+100,0);
        sb.GetNode().SetScale(1);
        sb.AddModel("Models/Box/Box","Models/Box/Stone");
        sb.AddBody("Box1");
        sb.GetBody().SetMass(10);
        sb.GetBody().SetFriction(1);
        sb.GetBody().SetCollisionEventMode(COLLISION_NEVER);
        sb.AddShape("Box1");
        sb.GetShape().SetBox(Vector3(1,1,1));
    }

    double x=0, y=0;
    Node &cam=sb.GetNode("Camera1"), &mushroom=sb.GetNode("Model1");
    while(sb.IsRunning())                        // loop while engine is running
    {
        cam.SetRotation(Quaternion(
            x+=0.2*sb.GetInput().GetMouseMoveY(),
            y+=0.2*sb.GetInput().GetMouseMoveX(),
            0
        ));
        cam.TranslateRelative(Vector3(
            0.2*(sb.GetInput().GetKeyDown('D')-sb.GetInput().GetKeyDown('A')),
            0,
            0.2*(sb.GetInput().GetKeyDown('W')-sb.GetInput().GetKeyDown('S'))
        ));
        mushroom.Yaw(0.1);                       // turn the model by 0.1 degrees
        sb.Update();                             // animate the worlds
    }
    return 0;
}

« Last Edit: March 31, 2013 by Hotshot »

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: SuperBasic
« Reply #1 on: April 12, 2013 »
Looks impressive - BASIC has come a very long way from the days of the C64.
You are our 9001st visitor.
Challenge Trophies Won: