Jump to content

khotan

Members
  • Posts

    186
  • Joined

  • Last visited

Everything posted by khotan

  1. @EvilTurtleProductions : Nice for your game, thanks for sharing too !
  2. Nice game ! Thank you for sharing, aiaf !
  3. Thank you Josh. Useful as info to know it 🙂
  4. Someone have created a game with lastet Leadwerks in 2021/2022 ? If yes so please show your screenshot because I need to be inspired from you ! 😇 I ask because with Leadwerks 2.5 to 3.0 and created some game was good if I remember.
  5. Hi, In Leadwerks, can it works in both C++ and Lua in dev ? I mean C++ can access to Lua to futher for controlling the game ?
  6. Awesome ! Thank you Josh, take your time to finish cause we want a stable game engine and we wish you with your project that it ends well when it will be ready !
  7. That is Ok, Josh xD Let's cross our fingers so that it comes out one day ^^
  8. 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.
  9. - Sound : Lmms FL Studio - Bake to texture maps : Xnormal Normal Map - 2D tool : Pixel Studio - Learning : Lua programming C++ Primer - 3D models : archive 3D
  10. Can I make my own PBR in Leadwerks with C++ and shader GLSL ? Have you an example for this codes in C++? Thanks.
  11. 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?
  12. 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 :
  13. 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 ?
  14. khotan

    STL ?

    Good to know, again thank you, Josh.
  15. khotan

    STL ?

    Great for that ! Thank you for your answer Another question. Is it working as well as Template too ?
  16. 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
  17. khotan

    STL ?

    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.
  18. 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 ?
  19. Can make for UAK as skinning UI in look and feel with custom button ? And any example from source code sample ?
×
×
  • Create New...