Jump to content

tipforeveryone

Members
  • Posts

    382
  • Joined

  • Last visited

Everything posted by tipforeveryone

  1. Leadwerks has some disadvantages but overall being a perfect choice for 3d Indie game developer. For a remaster of Fallout New Vegas, I don't think Leadwerks can handle
  2. LOL I have built my own UI system in C++ which can handle any type of language. i dont even use Leadwerks GUI
  3. tipforeveryone

    Evolution

    Please make UI editor happen
  4. Thanks !! additional question, with vector.clear(), will the vector be wiped out from memory ?
  5. I have this code std::vector<Texture*> spriteSequences; for (int i = 1; i <= 20; i++) { Texture* texture = nullptr; texture = Texture::Load(folderPath + "/" + String(i) + ".tex"); spriteSequences.push_back(texture); } in Destructor of my class MyClass::~MyClass() { delete[] spriteSequences; //this is not working } How can I delete a vector of Pointer ?
  6. I realized that actual window size is smaller than input size in Window::Create(), why ? This does not happen in Lua game
  7. I created my project in cpp from scratch, and here is the code I used in main.cpp #include "Leadwerks.h" #include "GameControl.h" using namespace Leadwerks; int main() { iVec2 gfxmode = System::GetGraphicsMode(System::CountGraphicsModes() - 1); gfxmode.x = Math::Min(700, gfxmode.x); gfxmode.y = Math::Round(gfxmode.x * 9 / 16); Window* window = Window::Create("CSCDVMP cpp", 600, 600, gfxmode.x, gfxmode.y, Window::Titlebar); Context* context = Context::Create(window, 0); World* world = World::Create(); Pivot* gameControl = Pivot::Create(); GameControl* actor = new GameControl(); //this actor has PostRender() which I used to draw image gameControl->SetActor(actor); while (true) { if (window->Closed() || window->KeyDown(Key::Escape)) return false; Time::Update(); world->Update(); world->Render(); context->Sync(); } return 0; } In PostRender() function of my actor Context::GetCurrent()->DrawImage( myimage, Window::GetCurrent()->GetWidth() - myimage->GetWidth(), 0, myimage->GetWidth(), myimage->GetHeight() ); as my expectation, myimage will be displayed on the top right corner of screen, but this look like this instead window size seems to be larger than actual game display. It is ok if I use Window::FullScreen in Window::Create()
  8. wow how could you create that road !! look awesome
  9. I put some Pivots in Editor around my map and attach a script to each of them, here is the script function Script:Start() self.entity:SetKeyValue("type","spawnPosition") end In spawn.php //#include <iostream> was on top //#include <list> was on top std::list<Entity> spawnPosition; for (int x = 0; x < world->CountEntities(); x++) { Entity* entity = world->GetEntity(x); if (entity->GetKeyValue("type") == "spawnPosition") { spawnPosition.push_back(entity); } } and I got this error Severity Code Description Project File Line Suppression State Error C2664 'void std::list<int,std::allocator<_Ty>>::push_back(const _Ty &)': cannot convert argument 1 from 'Leadwerks::Entity *' to '_Ty &&' CSCDVMP d:\google drive\w3ateam\game development\cscdvmp\projects\windows\playerclass.cpp 160 what is the right way?
  10. I return to leadwerks cpp learning process and I did not find any example file like in tutorial, so that I can't learn from it https://www.leadwerks.com/learn?page=Tutorials_CPP_Actors This should be fixed. or the example code should be put into this tutorial page, maybe Josh is too busy to fix this
  11. Anyone remind me a function which returns animation ID of a model by input Animation name? something like this: local animID = model:GetAnimationID("running_loop") I think this function is not in document but it exists I remember that Josh told me about it once
  12. copy that "Failed to load texture..." line here. I don't get which texture loaded fail
  13. He put "Sol" entity to the input, this is really weird. What is that Sol object ? a pivot ?
  14. I have more simple one, only for detecting mouse scroll up/down, not for calculating HOW much scroll in Main.lua, add this at the bottom of main while loop (right above "end") lastMouseZ = window:GetMousePosition().z and add this as a Global function MouseScrollDirection = function() if window:GetMousePosition().z < lastMouseZ then return 1 --scolled up elseif window:GetMousePosition().z > lastMouseZ then return 2 --scrolled down elseif window:GetMousePosition().z == lastMouseZ then return 0 end --no scroll end Use this function in any Script:UpdateWorld() function to detect mouse scroll function Script:UpdateWorld() if MouseScrollDirection == 1 then --do something with scroll up --example: camera:Move(0,0,1) end if MouseScrollDirection == 2 then --do something with scroll down --example: camera:Move(0,0,-1) end end
  15. Finally, I finished creating a Dynamic AI Behavior System, that means there won't be a same combat situation each time player replay the map.
  16. sometime it just happens because you change model with a new bones structure/name in scene
  17. My new AI cover/fire system, AI now can choose his own target and fire from cover
  18. and this return to my original post problem which cause depth buffer
  19. No it doesnt work. my weapon is still clipped
  20. Yes, increase near camera range can fix this glitch, but my weapon which is close to camera clipped out render. any proper way to fix both of these problems?
  21. My map is using terrain 256 x 256 and the range is about 220 / 256 of the map and this render glitch occur at closer range infact, about 40m (ingame) and when there is 2 layer of meshes are close to eachother. camera range is from 0 to 10000
×
×
  • Create New...