Jump to content

martyj

Members
  • Posts

    544
  • Joined

  • Last visited

Everything posted by martyj

  1. You need to use Context. Context::SetBlendMode
  2. The best way to do waves would be a gemometry shader in GLSL. Pass in specific data such as a wave height, noise level, or whatever you want. Something like this might be a good starting place where you can get something running in less than an hour. http://jayconrod.com/posts/34/water-simulation-in-glsl
  3. I think this feature would just end up having plug-ins become stagnate and not up to date with the current leadwerks features. Is there an example of something someone wishes to do in the editor that it cannot already handle? I'd love to see better c++ integration myself, but I find I can get around it. And towards @GlshchnkLx. Sure leadwerks doesn't have things like networking, but in my opinion, leadwerks has the features needed for the audience. For example, if Leadwerks added networking it would only benefit people who can already write their own networking code IMO. Considering multiplayer games usually require a server side. If you ask me, I think the bigger question is not what plugins people could add. But what features would people actually use in leadwerks. I would rather use something built into leadwerks just off the fact that you know Josh will support it. If there's a bug, it will get resolved quickly, and not wait for a potential open source fix. Having you depend on plugins I feel like could be "game" breaking in a lot of peoples projects. I've thought of writing an MP3 OpenAL audio player for Leadwerks since a few people have requested it, and it's an area where I've done some work on. The problem is, I would have to then maintain that section of code.
  4. Check out this. http://en.cppreference.com/w/cpp/locale/codecvt
  5. My Bitmap does have transparency. I loaded it in a web browser changing the background color to whatever I wanted. http://martyj.phpdev.gurutech.ws/images/icon256.html Windows might not show the color right in explorer.exe. But the color is right. Here is the options for exporting. What are you trying to do in win32? Set an icon for a button?
  6. What are you using to convert it? I only have GIMP at work. http://martyj.phpdev.gurutech.ws/images/icon256.bmp
  7. In the file located here: Leadwerks\Include\Libraries\glslang\StandAlone\ResourceLimits.h The file references #include "glslang/Include/ResourceLimits.h" This is the incorrect path for this folder. It should be as follows #include "../glslang/Include/ResourceLimits.h"
  8. It could be due to something like this. http://i.stack.imgur.com/RXJ3d.jpg Try specifying a different z-axis for your p1. Notice how the camera is at p(0, 0, 0), but the image placement is forward in the z direction.
  9. How do they collide if I only set the position of the cloned one? I believe you when this is happening. When I change the code to this, it also works. Model* base = Model::Load(path); base->Hide(); base->SetPosition(Vec3(-1, -1, -1), true); this->model = (Model*)base->Copy(true); this->model->Show(); this->model->SetPosition(position, true); this->model->SetVelocity(Vec3(0, 0, 0), true); this->model->SetCollisionType(Collision::Prop); this->model->SetPhysicsMode(Entity::RigidBodyPhysics); this->model->SetPickMode(Entity::PolygonPick, true); this->model->SetMass(10); // TODO: real mass this->model->SetUserData(this); this->model->SetSweptCollisionMode(true); The reason I need the cloned model is so that I can change the material on a single instance of the object to light it on fire. Is there a better way to do this? I'm also doing something similar with trees, rocks, and NPCs as they all have a customized material.
  10. Here is a clean version of a project. http://martyj.net/DroppingLogs.7z Keys: D1 = Drop oak.mdl D2 = Drop oak2.mdl
  11. Edit: ---------- Deleted. See post below on a smaller demo
  12. There's a couple of ways to do this. Note that date takes in an integer for the second param of a unix timestmap. Easiest but error prone, $displayDate = date($format, strtotime($timestamp)) strtotime can be kind of picky. I recommend something like this: http://php.net/manual/en/datetime.createfromformat.php That way you can specify the format of the input. Then call format on the object to display.
  13. See your inbox for the project. Here is the log entity in question. Granted, there are a few other entities that have this same behavior as in the videos posted here: See attachments for the models oak2.FBX oak2.mdl oak.FBX oak.mdl
  14. Bump. Does anyone have any recommendations for how to spawn items? Is there some default collision type/physics type being set that could be causing this bug? Thanks, Marty
  15. I had a bug once in GLSL where I forgot to initialize a float variable in a shader. Nvidia set the value to 0. AMD had the value assigned to a random number, so I had some weird color flickering bug on AMD but my code rendered fine on Nvidia. Nvidia is defiantly the better GPU to buy, although for developers, test on all platforms.
  16. So I've been starting to develop some quests and storylines to my game to help introduce players to the game. What do you think of our NPC messaging system? I should hopefully have a demo in 3 weeks. I have a huge bug list to solve before hand.
  17. I assume z references the distance into the screen in the camera normal's direction?
  18. I added a collision hook on this entity. Video: Code: this->model = (Model*)Model::Load(item->GetModelPath())->Copy(true); this->model->SetUserData(this); this->model->AddHook(Entity::CollisionHook, ItemEntity::CollisionHook); this->model->SetVelocity(Vec3(0, 0, 0), true); this->model->SetCollisionType(Collision::Prop); this->model->SetPhysicsMode(Entity::RigidBodyPhysics); this->model->SetPickMode(WF_PICK_MODE, true); this->model->SetMass(10); // TODO: real mass this->model->SetSweptCollisionMode(true); this->model->SetPosition(position, true); Collision Hook void ItemEntity::CollisionHook(Entity* entity0, Entity* entity1, float* position, float* normal, float speed) { System::Print("Collision"); System::Print(entity0->GetKeyValue("name")); System::Print(entity1->GetKeyValue("name")); printf("Posit(%f, %f, %f)\n", position[0], position[1], position[2]); printf("Norm(%f, %f, %f)\n", normal[0], normal[1], normal[2]); printf("Speed: %f\n", speed); System::Print("EndCollision"); } See attached file for console printing. ------------------ I removed everything from my map and tested a few other objects with different collision types. Some things I've learned. Polymesh doesn't have gravity. Size matters if it is less than 0.5 feet. Could this be a difference between float and double precision? I've scaled my object up to 5 feet and I still get the same weird collisions. Collision.txt
  19. This is an update to a thread that I've already created on this subject. Previously the cause was expected to be due to collisions in the self physics. I've since changed my model to have a cleaner physics. Video shows two bugs. 1. Creating items will sometimes have them thrown off in a random direction. (Depends on players position). As seen in the video, when the same action is done in a different position of the map. The object falls as normal. 2. There's an unknown physics object stopping me from walking in a section of my map. I have no idea what it is. This one may be hard to produce. Source code will be messaged to Josh after I finish compressing and uploading it.
  20. gun.frame is never reset to 1 in this code. You should probably reset it in this statement if (gun.frame >= gun.animlength) { idle = true; done = true; // here }
  21. Nvidia Pascal graphics cards are suppose to releasing soon. I was wondering if the multiple camera support optimizations would also get implemented in Leadewerks. I know personally in my game, having two cameras slows down the scene a lot. Granted I'm sure it may depend on the drivers on how they handle the multiple cameras. I know sometimes with Nvidia, they have additional OpenGL instructions to use advanced features. Such as HairWorks.
  22. That's a real bummer to hear. I'll just have to import the model twice. With and without the collisionhull since LE doesn't override the physics file.
  23. I'm trying to optimize some features in my game as I plan on releasing a small demo soon. So I'd like specific physics on my tree model. I have a tree model with a falling animation. When the tree is cut down I play the animation and set the top of the tree's material to be invisible for X amount of seconds.The tree has two materials. One for the Trunk, and one for the top half which falls over and becomes invisible after animation Some nice fellow from the forum, macklebee, helped me out a while back, the problem is I need to do this to 10 trees, so I need to learn myself with 3ds max. Here is the list of elements in my model http://i.imgur.com/a7zfQ1m.png My materials: When I export as FBX I get the following error: The plug-in has detected modifiers listed above Skin (or Physique) in the Modifier list and must disable them. The following nodes are affected: -Top When I load up the model, Leadwerks doesn't set the physics to be the collisionhull. Also changing the "Top" material makes the whole tree invisible. Files ---------- 3ds Max File: http://martyj.net/oak1.max Working FBX File http://martyj.net/oak_02.fbx Nonworking export of current .max file http://martyj.net/oak_03.fbx So TLDR: How can I have the oak1.max export as the oak_02.fbx file with the addition to the collisionhull in 3ds Max.
  24. There's a few ways to do this. The best way I think, Using Time::GetCurrent(), and checking if X amount of time has passed to call Sound::Play() or Source::Play(). You'd also want to check to see if the audio isn't playing. This is the best way as you can add velocity in with your sounds. For example, if the player is running, the footsteps would be faster. The second way, and by far the easiest, add the time delay in your audio file. With SetLoopMode(true). The audio file will play a walking sound until you call Pause(), or Stop()
  25. This is roughly how I do it. C++ --------------------- // Place in Start() function for instance caching Entity* leftHand = playerModel->FindChild("LeftHand_OrWhateverMyModelSays"); // Wielding Model* leftHandItem = Model::Load("SomePath") leftHandItem ->SetParent(leftHand); // Unwielding leftHandItem ->SetParent(NULL); // DELETE if not using again! Lua? --------------- // Place in Start() function for instance caching self.leftHand = playerModel:FindChild("LeftHand"); // Weidling self.leftHandItem = Model:Load("SomePath"); self.leftHandItem:SetParent(self.leftHand) // Unweild self.leftHandItem:SetParent(NULL); // DELETE if not using again! Btw I think your map is missing some details. It doesn't contain any player object. Are you using the FPSPlayer.lua script for your player?
×
×
  • Create New...