Jump to content

Turbo Game Engine Beta Update

Josh

1,561 views

The Turbo Game Engine beta is updated! This will allow you to load your own maps in the new engine and see the speed difference the new renderer makes.

Image1.jpg.04b723610eefcf20ce0575ae83869cbd.jpg

  • LoadScene() has replaced the LoadMap() function, but it still loads your existing map files.
  • To create a PBR material, insert a line into the material file that says "lightingmodel=1". Blinn-Phong is the default lighting model.
  • The red and green channels on texture unit 2 represent metalness and roughness.
  • You generally don't need to assign shaders to your materials. The engine will automatically select one based on what textures you have.
  • Point and spot lights work. Directional lights do not.
  • Setting the world skybox only affects PBR reflections and Blinn-Phong ambient lighting. No sky will be visible.
  • Physics, scripting, particles, and terrain do not work.
  • Variance shadow maps are in use. There are currently some problems with lines appearing at cubemap seams and some flickering pixels. Objects should always cast a shadow or they won't appear correctly with VSMs.
  • I had to include glew.c in the project because the functions weren't being detected from the static lib. I'm not sure why.
  • The static libraries are huge. The release build is nearly one gigabyte. But when compiled, your executable is small.
#include "Leadwerks.h"

using namespace Leadwerks;

int main(int argc, const char *argv[])
{
	//Create a window
	auto window = CreateWindow("MyGame", 0, 0, 1280, 720);

	//Create a rendering context
	auto context = CreateContext(window);

	//Create the world
	auto world = CreateWorld();

	//This only affects reflections at this time
	world->SetSkybox("Models/Damaged Helmet/papermill.tex");

	shared_ptr<Camera> camera;

	auto scene = LoadScene(world, "Maps/turbotest.map");
	for (auto entity : scene->entities)
	{
		if (dynamic_pointer_cast<Camera>(entity))
		{
			camera = dynamic_pointer_cast<Camera>(entity);
		}
	}

	auto model = LoadModel(world, "Models/Damaged Helmet/DamagedHelmet.mdl");
	model->Move(0, 1, 0);
	model->SetShadowMode(LIGHT_DYNAMIC, true);

	//Create a camera if one was not found
	if (camera == nullptr)
	{
		camera = CreateCamera(world);
		camera->Move(0, 1, -3);
	}

	//Set background color
	camera->SetClearColor(0.15);

	//Enable camera free look and hide mouse
	camera->SetFreeLookMode(true);
	window->HideMouse();

	//Create a light
	auto light = CreateLight(world, LIGHT_POINT);
	light->SetShadowMode(LIGHT_DYNAMIC | LIGHT_STATIC | LIGHT_CACHED);
	light->SetPosition(0, 4, -4);
	light->SetRange(15);

	while (window->KeyHit(KEY_ESCAPE) == false and window->Closed() == false)
	{
		//Rotate model
		model->Turn(0, 0.5, 0);

		//Camera movement
		if (window->KeyDown(Key::A)) camera->Move(-0.1, 0, 0);
		if (window->KeyDown(Key::D)) camera->Move(0.1, 0, 0);
		if (window->KeyDown(Key::W)) camera->Move(0, 0, 0.1);
		if (window->KeyDown(Key::S)) camera->Move(0, 0, -0.1);

		//Update the world
		world->Update();

		//Render the world
		world->Render(context);
	}

	Shutdown();
	return 0;
}
  • Like 5


8 Comments


Recommended Comments

Hi! Sorry for question, but can anyone explain me, what exactly Turbo Game Engine is? Is it LE 5.0 but rebranded, or that's the another engine fork?

Share this comment


Link to comment
6 hours ago, adams-antology said:

Hi! Sorry for question, but can anyone explain me, what exactly Turbo Game Engine is? Is it LE 5.0 but rebranded, or that's the another engine fork?

It will be the next version of Leadwerks, with new name.

  • Like 1

Share this comment


Link to comment

Have you ever considered switching to a text map format on a flexible format like Json that allows for expansion, addition of fields, without breaking the loading of the map itself? The idea being we can add fields to entities and if said entity has a script those fields get added to the script? It could aid in external tooling. Just a thought.

  • Like 1

Share this comment


Link to comment
On 8/24/2018 at 1:48 PM, Rick said:

Have you ever considered switching to a text map format on a flexible format like Json that allows for expansion, addition of fields, without breaking the loading of the map itself? The idea being we can add fields to entities and if said entity has a script those fields get added to the script? It could aid in external tooling. Just a thought.

Also it is good for version control. Even better it allows people to develop tools that will allow for simultaneous  multi-user editing.

Share this comment


Link to comment
4 minutes ago, gellert234 said:

Only need to buy the full version once?

I plan on paid updates every 12-18 months, but you can buy one version once and use forever.

  • Thanks 1

Share this comment


Link to comment
1 hour ago, gellert234 said:

Linux supported ?

Upon final release, yes.

  • Like 1

Share this comment


Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Blog Entries

    • By Josh in Josh's Dev Blog 6
      A new build is available on the beta branch on Steam.
      Updated to Visual Studio 2019. Updated to latest version of OpenVR and Steamworks SDK. Fixed object tracking with seated VR mode. Note that the way seated VR works now is a little different, you need to use the VR orientation instead of just positioning the camera (see below). Added VR:SetRotation() so you can rotate the world around in VR. The VRPlayer script has rotation added to the left controller. Press the touchpad to turn left and right. Any arbitrary rotation will work, including roll and pitch. Here are the offset commands:
      static void VR::SetOffset(const Vec3& position); static void VR::SetOffset(const float x, const float y, const float z); static void VR::SetOffset(const float x, const float y, const float z, const float pitch, const float yaw, const float roll); static void VR::SetOffset(const Vec3& position, const Vec3& rotation); static void VR::SetOffset(const Vec3& position, const Quat& rotation); static Vec3 VR::GetOffset(); static Vec3 VR::GetRotation(); static Quat VR::GetQuaternion();  
    • By tipforeveryone in tipforeveryone's Blog 15
      I spent a whole week for learning UE4 with cpp, yep, UE4 is a great engine for sure, but I found out that my mind could not understand the way UE4 works easily. It is too complex and made me tired. Then I returned to my Leadwerks project and felt so familiar. Soooo... sweet, everything is simple as it is
      It felt like I have had a long trip to UE city then return to my hometown. I miss Leadwerks indeed.
      Last year, I thought I could only use Leadwerks with LUA and never touch its CPP side. But I tried my best, learned Cpp for 8 months. Now I am not a cpp pro but I am confident in using this language. At least I can rewrite my whole project in CPP instead. this 3-years project helped me to understand my potential and interest in gamedev.
      I wish Josh be successful in progress of making Turbo, a new hope for much better Leadwerks.
      To all people who are using Leadwerks and help me these years, love you.
      ...
      Peace!
    • By Marcousik in Marcousik's Creations Blog 1
      I updated the moto I was working on and now the physics let having fun with this.
       
×
×
  • Create New...