-
Posts
186 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by khotan
-
-
That is Ok, Josh xD
Let's cross our fingers so that it comes out one day ^^
-
Hi Josh,
Can we have if possible a beta from Ultra engine to test and then bright it more powerful and make it more stable of course ? I know you are working hard on it but the idea is maybe you can have more feedback from us and speed it up on what wrong Ultra engine works over the time... Is it a good idea or not ?
Regards and thanks.
-
- Sound :
- Bake to texture maps :
- 2D tool :
- Learning :
- 3D models :
-
Thank you for the links.
- 1
-
Can I make my own PBR in Leadwerks with C++ and shader GLSL ? Have you an example for this codes in C++?
Thanks.
-
I think is yes but I am not sure because I have tried with Dynamic + Buffered in my code C++ so it doesnt work...
What is missing I do ? Problem it is in code c++ ? Or it is in Leadwerks from program itself ? Need it to be activated in Leadwerks?
-
I have a problem the shadow so i have coded in C++ but it doesn't work, how to resolve it, please ?
The code here :
#include "App.h" using namespace Leadwerks; App::App() : window(NULL), context(NULL), world(NULL), camera(NULL) {} App::~App() { delete world; delete window; } //Camera storage Vec3 camRotation; Vec2 centerMouse; Vec2 mouseDifference; float mouseSensitivity; //Player Model* playerMesh; Entity* player; Model* tpsSphere; //Speeds Vec3 playerMovement; float moveSpeed; float strafeSpeed; //jump and crouch float jumpForce; float tempJumpForce; bool crouched; float playerHeight; float playerCrouchHeight; //angles float cameraTopAngle; float cameraBottomAngle; float camSmoothing; //TPS controls Pivot* fpsPivot; Pivot* tpsPivot; float maxCamOffset; float minCamOffset; Vec3 oldCamPos; bool App::Start() { //Create a window window = Window::Create("_9_TPSController", 200, 0, 1024,768); //Create a context context = Context::Create(window); //Create a world world = World::Create(); //Create a camera camera = Camera::Create(); camera->Move(0,2,-5); /*light = PointLight::Create(); light->SetPosition(0, 100, 0); light->SetRange(1);*/ //Hide the mouse cursor window->HideMouse(); Map::Load("Maps/my_map.map"); //Move the mouse to the center of the screen centerMouse = Vec2(context->GetWidth()/2,context->GetHeight()/2 ); window->SetMousePosition(centerMouse.x, centerMouse.y); mouseSensitivity = 15; //Create the player player = Pivot::Create(); player->SetPosition(0,4,0); player->SetMass(5); player->SetPhysicsMode(Entity::CharacterPhysics); player->SetShadowMode(Light::Static | Light::Dynamic); //Create camera pivot fpsPivot = Pivot::Create(); tpsPivot = Pivot::Create(); //Create a visible mesh playerMesh = Model::Cylinder(16,player); playerMesh->SetPosition(0,1,0); playerMesh->SetScale(1,2,1); //Set some variables moveSpeed = 6; strafeSpeed = 4; crouched = false; playerHeight = 1.8; playerCrouchHeight = 0.8; jumpForce = 6; cameraTopAngle = -45; cameraBottomAngle = 80; camSmoothing = 8.0; //Tps camera maxCamOffset = -8.0; minCamOffset = 1.5; return true; } bool App::Loop() { //Close the window to end the program if (window->Closed()||window->KeyHit(Key::Escape)) return false; //Get the mouse movement Vec3 currentMousePos = window->GetMousePosition(); mouseDifference.x = currentMousePos.x - centerMouse.x; mouseDifference.y = currentMousePos.y - centerMouse.y; //Adjust and set the camera rotation float tempX = camRotation.x + (mouseDifference.y / mouseSensitivity); if(tempX > cameraTopAngle && tempX < cameraBottomAngle ) camRotation.x = tempX; camRotation.y += mouseDifference.x / mouseSensitivity; fpsPivot->SetRotation(camRotation); window->SetMousePosition(centerMouse.x, centerMouse.y); //Player Movement playerMovement.x = (window->KeyDown(Key::D) - window->KeyDown(Key::A)) * Time::GetSpeed() * strafeSpeed; playerMovement.z = (window->KeyDown(Key::W) - window->KeyDown(Key::S)) * Time::GetSpeed() * moveSpeed; // Check for jumping tempJumpForce = 0; if(window->KeyHit(Key::Space) && !(player->GetAirborne()) ) tempJumpForce = jumpForce; // Check for crouching if(window->KeyHit(Key::C)) crouched = !crouched; //Position camera at correct height and playerPosition player->SetInput(camRotation.y, playerMovement.z, playerMovement.x, tempJumpForce * Time::GetSpeed(), crouched, 1); //Store player some information Vec3 tempFpsPos = fpsPivot->GetPosition(); Vec3 playerPos = player->GetPosition(); playerPos.y += (crouched ? playerCrouchHeight : playerHeight); tempFpsPos.y = Math::Curve(playerPos.y, tempFpsPos.y, camSmoothing * Time::GetSpeed()); tempFpsPos = Vec3(playerPos.x, tempFpsPos.y ,playerPos.z); fpsPivot->SetPosition(tempFpsPos); //Position and Rotate the camera to FPS pivot camera->SetPosition(fpsPivot->GetPosition()); camera->SetRotation(fpsPivot->GetRotation()); //Calculate the furthest TPS pivot position tpsPivot->SetPosition(fpsPivot->GetPosition()); tpsPivot->SetRotation(fpsPivot->GetRotation()); tpsPivot->Move(0, 0, maxCamOffset, false); camera->SetPosition(tpsPivot->GetPosition()); //Use a pick to determine where the camera should be PickInfo pick; if(world->Pick(fpsPivot->GetPosition(), tpsPivot->GetPosition(), pick, 0, true )) { //Store distance float distance = fpsPivot->GetPosition().DistanceToPoint(pick.position); printf((String(distance) + "\n").c_str()); //If the tps distance is to small, we switch to FPS view if(distance < minCamOffset) { camera->SetPosition(fpsPivot->GetPosition()); } else { camera->SetPosition(pick.position); } } else { camera->SetPosition(tpsPivot->GetPosition()); } Time::Update(); world->Update(); world->Render(); context->Sync(true); return true; }
The problem here is ==> player->SetShadowMode(Light::Static | Light::Dynamic); ... it is activated but it doesn't work for shadow as dynamic...
Here it is screenshot for result :
-
Is it possible to create 2D UI in Leadwerks for my games as HUD, health bar, etc... ? Or is it needed with UAK for better ?
-
STL ?
in Programming
Good to know, again thank you, Josh.
-
Thank you all !
- 1
-
STL ?
in Programming
Great for that ! Thank you for your answer
Another question.
Is it working as well as Template too ?
-
What I need for making an AI with my game in Leadwerks (for characters making as realistic ?) ? What type of algorithm and name use it ?
Someone have an experience from that ?
Thanks
-
STL ?
in Programming
Is it possible to use C++ with STL Library for Leadwerks ? Not sure and not tested so I need for to be confirmed from you ?
Thanks.
-
On 6/26/2021 at 6:30 AM, Josh said:
Thank you, Josh.
-
We need some game sample made by Leadwerks as "complete" and "real" programming for 2D game c++ : 2d platform and top-down style; 3D game c++ : FPS and TPS style for learning way and very good for beginner and advanced
What do you think of that ?
- 1
-
Can make for UAK as skinning UI in look and feel with custom button ? And any example from source code sample ?
-
Great ! Thank you and I will buy it for sure
-
Josh, in futur are you considering to make a product as UltraEngine on Steam for easy with license ?
Thanks in advance.
-
Cool it works !! Thank you so much Ttiki
- 1
-
No, I don't know... It is my first try in Lua for learning because I used before in C++ that work fine.
How to setup for startup map in main.lua file ?
-
When in Leadwerks editor the game lua work fine but when i create a standalone it shows nothing and doesn't work, why ? How to create a game lua from specific into executable ?
-
i vote for 3D engine but i would like the 2d games stuff side too
-
Maybe it needs a vote for a new forum "team for project" to talk and to join when they are ready ? Is it good or bad idea ?
-
Great ! I am looking forward this engine
Is it possible to have an Ultra engine as "beta" ?
in General Discussion
Posted
That is for sure !