Jump to content

gamecreator

Members
  • Posts

    4,937
  • Joined

  • Last visited

Everything posted by gamecreator

  1. Really apprecaited and looking forward to it! (Will check out your stuff when I get home too.) Edit: Listend. Love it! Very pro sounding stuff!
  2. I agree with YouGroove's suggestions. Especially since a lot of early projects are characters running around in a forest, hills, etc., a calm, peaceful, exploration soundtrack could be used by a lot of people. Nothing dramatic but something that hopefully adds a "sense of wonder."
  3. Not at all. Moving blocks up and down and side to side is easy. Rotating an entity is easy. But apparently attaching entities to other entities to rotate together is impossible. Here's the Android APK as it stands, to give you an idea. https://www.mediafire.com/?x4ifmprz08xj2me
  4. Thanks. I'm coming to understand that Leadwerks just can't do this. And since I can't do it, I might as well reveal the now-abandoned project. It was going to be an Android game where you rotate phone/tablet to rotate the world. But since I couldn't do the convex decomposition, I thought it would be fun to have dynamic parts of the world that you could first manipulate to make a path for the ball to the end. So phase 1 would be using your moves to move walls (some of which can only move up or down or side to side), etc and phase 2 would be guiding your ball by moving your phone and avoiding enemies and such. Thanks for the help anyway.
  5. I appreciate the tips and it makes sense. It's as if a few boxes work ok but a handful glitch it up - like the joints don't play well with eachother. Will experiment more at home. Also, even just a line of 5 boxes starts slighty shifting up and down (making a slight but visible curve) but I could accept that if that's all it was.
  6. I'm trying to make a game where you can rotate the world to have a ball roll from start point to finish point through and around obstacles. The world and columns and obstacles need to rotate to affect the ball and other things properly. You don't control the ball directly. Here's an imagine to give you an idea. I was trying to dynamically set up walls and such but it's way more difficult than I thought it would be.
  7. http://www.leadwerks.com/werkspace/topic/8340-exception-access-violation-again/page__st__20#entry66097
  8. Good thoughts and sorry, it requires some MDL files and textures - I just wanted to show the code and video. The collision type may be wrong but the goal is to have a level which can rotate but not move. But its rotation should affect a ball moving on top of it (and other things). I'm trying to attach pillars/collumns to a flat level (as you see in the video for a second) but something's going wrong. The mass needs to be high so that a ball doesn't effect it in any way (doesn't make it rotate at the edge, for example).
  9. Any idea what causes this? Ball hits floor which has cubes jointed to it and everything goes crazy. #include "App.h" using namespace Leadwerks; App::App() : window(NULL), context(NULL), world(NULL), camera(NULL) {} App::~App() { delete world; delete window; } Model *ballmodel, *levelmodel; Shape *shape; Vec3 camerarotation; #if defined (PLATFORM_WINDOWS) || defined (PLATFORM_MACOS) bool winmode=true; #else bool winmode=false; #endif float rotx, rotz; struct columnstruct { Model *model; Joint *joint; } column[100]; int columnindex=0; Joint *joint; void createcolumn(int i, float x, float y) { column[i].model=Model::Load("Models/column.mdl"); Shape *shape=Shape::Load("Models/column.phy"); column[i].model->SetShape(shape); shape->Release(); column[i].model->SetPosition(x,0,y); column[i].model->SetPhysicsMode(Entity::RigidBodyPhysics); column[i].model->SetCollisionType(1); column[i].model->SetMass(1000); column[i].joint = Joint::Hinge(x,0,y, 1,0,0, column[i].model, levelmodel); column[i].joint->SetLimits(0,0); column[i].joint->EnableLimits(); } bool App::Start() { window = Window::Create("TiltIt",0,0,1280,720,Window::FullScreen); context = Context::Create(window); world = World::Create(); camera = Camera::Create(); camera->Move(0,7,0); camera->SetRotation(90,0,0); window->HideMouse(); levelmodel=Model::Load("Models/levelbase.mdl"); Shape* shape; shape=Shape::Load("Models/levelbase.phy"); levelmodel->SetShape(shape); shape->Release(); levelmodel->SetPhysicsMode(Entity::RigidBodyPhysics); levelmodel->SetMass(1000); levelmodel->SetCollisionType(1); ballmodel=Model::Load("Models/ball.mdl"); shape=Shape::Load("Models/ball.phy"); ballmodel->SetShape(shape); shape->Release(); ballmodel->SetPosition(0,2,-1); ballmodel->SetPhysicsMode(Entity::RigidBodyPhysics); ballmodel->SetCollisionType(1); ballmodel->SetMass(1); createcolumn(columnindex++,3,3); createcolumn(columnindex++,2,3); createcolumn(columnindex++,1,3); createcolumn(columnindex++,0,3); createcolumn(columnindex++,-1,3); createcolumn(columnindex++,-2,3); createcolumn(columnindex++,-3,3); createcolumn(columnindex++,3,1); createcolumn(columnindex++,2,1); createcolumn(columnindex++,1,1); createcolumn(columnindex++,0,1); createcolumn(columnindex++,-1,1); createcolumn(columnindex++,-2,1); createcolumn(columnindex++,-3,1); Light* light = DirectionalLight::Create(); light->SetRotation(35,35,0); rotx=rotz=0; return true; } bool App::Loop() { if(window->Closed() || window->KeyHit(Key::Escape)) return false; levelmodel->PhysicsSetPosition(0,0,0,1.0f); if(window->KeyDown(Key::Left) || window->TouchDown(0) && !window->TouchDown(1)) rotz+=0.3*Time::GetSpeed(); if(window->KeyDown(Key::Right) || window->TouchDown(0) && window->TouchDown(1)) rotz-=0.3*Time::GetSpeed(); if(window->KeyDown(Key::Up)) rotx+=0.3*Time::GetSpeed(); if(window->KeyDown(Key::Down)) rotx-=0.3*Time::GetSpeed(); levelmodel->PhysicsSetRotation(rotx,0,rotz,0.001f); Time::Update(); world->Update(); world->Render(); context->Sync(false); return true; }
  10. Best to attach entire project (ideally editor could remove large temporary files like what Visual Studio generates). Sometimes problems are with different things than what user thinks. This way Josh doesn't have to keep asking for things that user didn't send or forgot to send. Saves everyone time. Plus there could be a limit on attachment size to encourage people to send small examples, not giant projects for Josh to spend hours on.
  11. The icing on the cake would be if we could attach a copy of the project for Josh (editor would silently export and upload a copy of the zip file in the background). [X] Include copy of project with bug report The additional benefit is that the bug reporter could send all the stats with the report too. Computer specs, video card driver version, etc. And if you really want to get fancy, you'd warn the user about obvious things (like if the video card driver version isn't the latest one).
  12. I remember back in the day someone was having physics issues with a miniature golf game they were doing. Not sure if it's strictly related or if it was solved but may be worth a search. Edit: come to think of it I think it was that the golf ball stopped instantly on hitting a wall. Probably not related.
  13. Oh wow. Thanks for the valuable tips! These really should all be in the documentation but you know... After setting the limits with the above and adding joint->EnableLimits(); it worked as expected. Thank you Michael.
  14. I'm trying to attach two boxes together. The red is supposed to be attached to the blue so that when the blue rotates, red rotates with it. Red will always be "above" the blue. However, I can't figure out how to do this. SetParent doesn't work for physically interacting boxes. My newest attempt was to connect them by a hinge joint but boxes then go through each other for some reason, even though when they're not jointed they do collide. Is this a bug? Do jointed objects not collide with each other? Below is my code. #include "App.h" using namespace Leadwerks; App::App() : window(NULL), context(NULL), world(NULL), camera(NULL) {} App::~App() { delete world; delete window; } Entity *parent, *child; Joint* joint; float angle=0; bool App::Start() { window = Window::Create("TileParentTest"); context = Context::Create(window); world = World::Create(); camera = Camera::Create(); camera->Move(0,1,-3); Light* light = DirectionalLight::Create(); light->SetRotation(35,35,0); window->HideMouse(); //Move the mouse to the center of the screen window->SetMousePosition(context->GetWidth()/2,context->GetHeight()/2); // Parent parent = Model::Box(); parent->SetColor(0.0,0.0,1.0); parent->SetShape(Shape::Box()); parent->SetPosition(0,0,0); parent->SetPhysicsMode(Entity::RigidBodyPhysics); parent->SetMass(1); parent->SetCollisionType(1); // Child child = Model::Box(); child->SetColor(1.0,0.0,0.0); child->SetShape(Shape::Box()); child->SetPosition(0,1.5,0); child->SetPhysicsMode(Entity::RigidBodyPhysics); child->SetMass(1); child->SetCollisionType(1); // Show joint visually Entity *jointpos = Model::Box(0.1,0.1,0.1); jointpos->SetColor(1.0,1.0,0.0); jointpos->SetPosition(0,0.7,0); jointpos->SetParent(parent); // Create joint between parent and child joint = Joint::Hinge(0,0.7,0, 0,0,1,child,parent); return true; } bool App::Loop() { if(window->Closed() || window->KeyHit(Key::Escape)) return false; if(window->KeyDown(Key::Left)) angle-=0.1*Time::GetSpeed(); if(window->KeyDown(Key::Right)) angle+=0.1*Time::GetSpeed(); parent->PhysicsSetPosition(0,0,0,true); parent->PhysicsSetRotation(0,0,angle,0.01); Time::Update(); world->Update(); world->Render(); context->Sync(false); return true; } Note that if you comment out this line: joint = Joint::Hinge(0,0.7,0, 0,0,1,child,parent); the boxes collide. If you don't comment it out (you create the joint), tilting the blue box results in the red one rotating on the hinge and then going through the blue, several times, back and forth. (The yellow box is the hinge position.) Thoughts?
  15. One thought is using an EXE compressor and I think that might jumble the password. The other is pulling it from a server or website. But everything can be circumvented/figured out. It's always a balance of risk versus reward.
  16. SetOmega is the same under entity physics (http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/entity/)
  17. If I understand right from another post, SetRotation doesn't do physics calculations like SetPhysicsRotation. If you use the first, your ball will fly off or fall through your floor or something else you don't want.
  18. Figured it out. You have to keep feeding it every frame, or at least until you stop on the angle you want, as it won't stop there automatically. This is a lot different than just SetRotation itself, which is instant. if(window->KeyDown(Key:)) rot-=0.1*Time::GetSpeed(); if(window->KeyDown(Key:)) rot+=0.1*Time::GetSpeed(); levelmodel->PhysicsSetPosition(0,0,0,1.0f); levelmodel->PhysicsSetRotation(0,0,rot,0.0001f); Oddly, the documentation says the strength (last parameter) should be 1 or close to it, yet that's the value that barely moves it. The smaller the value the faster it moves. Not sure if that's a documentation error.
  19. When you're logged in, on the top right-hand side you can click on your name and go to Client Area to see your transactions. 3.1 is expected to be released this month, per the developer.
  20. Bump. Could anyone please look at the project or the code above? It should be incredibly simple to rotate an entity to an angle but I don't know what I'm missing...
  21. Depends on the game. If you're making a puzzle game or something, you can get away with not having one. But if you have a world and characters, they'll have histories and their interactions will have causes and consequences. It's hard not to have a story/stories in that case.
  22. The release for the pre-order is scheduled to be this month. A lot of people are eagerly waiting for it.
  23. And on the Kickstarter he said December 2013. The point is that even with the best intentions, sh*t happens.
  24. There was talk of boolean operations being implemented but no ETA. It's best to use a 3D modeling program like Blender (free) or Max (paid). As for adjusting the navmesh, you can make invisible barriers with boxes and such and by applying an invisible material. There was also talk of manually adjusting navmeshes but I don't know remember if Josh had any interest in that. Finally, if you haven't watched this, it may help you: http://www.leadwerks.com/werkspace/page/tutorials_legacy/_/pathfinding-r43
×
×
  • Create New...