Hornete Posted September 26, 2020 Share Posted September 26, 2020 1 hour ago, Cuikui said: The main problem is that DST's physics and collision engine only works with spheres and horizontal cylinders. Currently, all objects/structures/players/boats are modeled by a sphere or a cylinder and there is no other possible shape. Oh? What about the Physics:SetTriangleMesh function? Would that not work in creating collisions other than spheres and cylinders? Link to comment https://forums.kleientertainment.com/forums/topic/122019-why-dont-boats-look-like-this/page/2/#findComment-1375136 Share on other sites More sharing options...
Cuikui Posted September 27, 2020 Share Posted September 27, 2020 9 hours ago, Hornete said: What about the Physics:SetTriangleMesh function? TriangleMesh can collide with spheres and cylinders. They are used in the basic game and in the mod to make the collision between the boat and the characters / objects / mobs. The problem is that two TriangleMesh don't collide together. You can't make a collision between two boats, between a boat and the world border, the land, and even the ground. To imitate a collision between two TriangleMesh you have to create cylindrical dummy entities that will collide with one of the TriangleMesh. If the engine could handle the collision between two TriangleMesh, it would open the way for all kinds of new shapes. Link to comment https://forums.kleientertainment.com/forums/topic/122019-why-dont-boats-look-like-this/page/2/#findComment-1375237 Share on other sites More sharing options...
Orangex Posted September 27, 2020 Share Posted September 27, 2020 On 9/26/2020 at 7:23 AM, Monkey Cups said: But if boat is not cookie then we have to rename the cookie cutters. How about Boat Biters? Nautical Nibblers? Maritime Munchers??? Link to comment https://forums.kleientertainment.com/forums/topic/122019-why-dont-boats-look-like-this/page/2/#findComment-1375240 Share on other sites More sharing options...
-Variant Posted September 27, 2020 Share Posted September 27, 2020 On 9/26/2020 at 1:23 AM, Monkey Cups said: But if boat is not cookie then we have to rename the cookie cutters. I get the joke but I think they'd be fine staying as is, they are real animals after all. Link to comment https://forums.kleientertainment.com/forums/topic/122019-why-dont-boats-look-like-this/page/2/#findComment-1375243 Share on other sites More sharing options...
pedregales Posted September 27, 2020 Share Posted September 27, 2020 I just downloaded the mod only for the "boat"-shaped one and let me tell you: it does move very awkward (specially noticeable when you are avoiding collision and you do a hard-turn), but it does feel better than the current circle boat. Having that shape really helps with navigation. One of the hardest things of seafaring in DST, I think lies with perception: the ocean is very vast and empty so you don't really know where you are going, where you are overall, and the shape of the boat does not help much on which direction you are going with the sails (more specifically, when you have been stationed for a few seconds, or when you change map direction a bit too often, it is easy to "lose North" at sea, at least for me). I know the sails have a very tiny indicator on the direction the boat will move, but I am preferring the boat-shaped boat for getting that info (that is, until the mod heavily crashes on me). I also love how they add other boat variations for different purposes (although, personally, I find the bridge one kind of pointless, specially considering they could be moved on purpose or accidentally). And I honestly thought the lunar boat was just fancy decoration, but it does have a specific purpose! EDIT: forgot to mention, do not make the mistake I made on the boat-shaped boat of putting a sail in the middle and placing the steering wheel on the point of the boat. It made the experience even more awkward. Link to comment https://forums.kleientertainment.com/forums/topic/122019-why-dont-boats-look-like-this/page/2/#findComment-1375272 Share on other sites More sharing options...
Minitte Posted September 28, 2020 Share Posted September 28, 2020 Boat shaped boats, I'm in love! Link to comment https://forums.kleientertainment.com/forums/topic/122019-why-dont-boats-look-like-this/page/2/#findComment-1375434 Share on other sites More sharing options...
A3_21 Posted September 28, 2020 Share Posted September 28, 2020 I am happy with the circular boat Link to comment https://forums.kleientertainment.com/forums/topic/122019-why-dont-boats-look-like-this/page/2/#findComment-1375447 Share on other sites More sharing options...
Duck986 Posted September 28, 2020 Share Posted September 28, 2020 On 9/25/2020 at 7:58 PM, Squirrel12 said: They do turn though... oh God, why i didn't use this mod before? this moon and square boats are absolutely perfect for collecting bull kelp! yes, 10 kelps from moon island isn't enough for me. Link to comment https://forums.kleientertainment.com/forums/topic/122019-why-dont-boats-look-like-this/page/2/#findComment-1375524 Share on other sites More sharing options...
ShadowDuelist Posted September 28, 2020 Share Posted September 28, 2020 6 hours ago, Duck986 said: oh God, why i didn't use this mod before? this moon and square boats are absolutely perfect for collecting bull kelp! yes, 10 kelps from moon island isn't enough for me. It can be done with the vanilla boat too, although you need to have more patience than maxwell himself. Link to comment https://forums.kleientertainment.com/forums/topic/122019-why-dont-boats-look-like-this/page/2/#findComment-1375596 Share on other sites More sharing options...
Mike23Ua Posted September 28, 2020 Share Posted September 28, 2020 Call me crazy but.. I don’t like the looks of most the boats shown in the mod at all.. what I want is fairly simple- I’m pretty sure someone could mod this in within about an hour if they’re talented enough. I want Shipwrecked and Hamlet Boat designs, but with the new sailing mechanics (oars, anchors, sails that need turning etc) of the new DST boat cookie platform thing. TL:DR: Boats that actually LOOK like Boats And just encase for whatever reason you guys haven’t played those expansions: here are a few examples of what they looked like Link to comment https://forums.kleientertainment.com/forums/topic/122019-why-dont-boats-look-like-this/page/2/#findComment-1375607 Share on other sites More sharing options...
Developer zarklord_klei Posted September 28, 2020 Developer Share Posted September 28, 2020 On 9/27/2020 at 5:28 AM, Cuikui said: TriangleMesh can collide with spheres and cylinders. They are used in the basic game and in the mod to make the collision between the boat and the characters / objects / mobs. The problem is that two TriangleMesh don't collide together. You can't make a collision between two boats, between a boat and the world border, the land, and even the ground. To imitate a collision between two TriangleMesh you have to create cylindrical dummy entities that will collide with one of the TriangleMesh. If the engine could handle the collision between two TriangleMesh, it would open the way for all kinds of new shapes. Are you sure you set the Collision Masks correctly? TriangleMeshes should be able to collide with each other... Link to comment https://forums.kleientertainment.com/forums/topic/122019-why-dont-boats-look-like-this/page/2/#findComment-1375611 Share on other sites More sharing options...
viberr Posted September 28, 2020 Share Posted September 28, 2020 34 minutes ago, Mike23Ua said: Call me crazy but.. I don’t like the looks of most the boats shown in the mod at all.. what I want is fairly simple- I’m pretty sure someone could mod this in within about an hour if they’re talented enough. I want Shipwrecked and Hamlet Boat designs, but with the new sailing mechanics (oars, anchors, sails that need turning etc) of the new DST boat cookie platform thing. TL:DR: Boats that actually LOOK like Boats And just encase for whatever reason you guys haven’t played those expansions: here are a few examples of what they looked like my question is how? i personally have no idea how shipwrecked boats could be added into dont starve together and if they did add the boats from shipwrecked into dont starve together then how would they be turned multiplayer?(they are really small so how would multiple people be able to use them)also how would they add the mechanics of RoT boats(sails oars etc)onto shipwrecked boats? Link to comment https://forums.kleientertainment.com/forums/topic/122019-why-dont-boats-look-like-this/page/2/#findComment-1375614 Share on other sites More sharing options...
Mike23Ua Posted September 28, 2020 Share Posted September 28, 2020 21 minutes ago, stranger again said: my question is how? i personally have no idea how shipwrecked boats could be added into dont starve together and if they did add the boats from shipwrecked into dont starve together then how would they be turned multiplayer?(they are really small so how would multiple people be able to use them)also how would they add the mechanics of RoT boats(sails oars etc)onto shipwrecked boats? Well.. I had several suggestions for how but I don’t design games I merely make suggestions, one way that could do it I guess would be like having different commands on your Dpad that do a different thing (if you don’t use a controller then think of whatever button simulates your Dpad) Down would Drop/Raise Anchor- Up would Raise/Lower Sail.. Left/right would turn sail.. tapping B would paddle (if no mast upgrade was applied) These wouldn’t be full 6 person vessels- make them a tiny bit larger.. to support 2 players max as a smaller, less expensive, slightly faster moving but a heck of a lot less durable mode of transportation one person steers/operates all boat functions while the other person can fish, mine, hold a lantern etc.. So basically you have the large Barge like vessel.. and then you’d have the smaller transportation ones- now you may be asking why ever use the big ones.. Answers simple: can’t place larger Barge like structures into the smaller boat- so stuff like Cooking pots, campfires, fridges, Pinching Winch, Tackle Box the new Anti-Fire Spittle fish pump, Etc.. would only fit on the Large cookie. So the smaller vessel wouldn’t be able completely to “replace” all the hard work Klei has already done with the Boat Cookie, but merely be a cheaper easier to handle vessel for people like myself who play mostly alone or with only one other friend. Link to comment https://forums.kleientertainment.com/forums/topic/122019-why-dont-boats-look-like-this/page/2/#findComment-1375620 Share on other sites More sharing options...
thegreatJash Posted September 28, 2020 Share Posted September 28, 2020 I think the circle boats look more natural, but your ships do look more like actual boats. As long as they are a portable base, I'm cool with them. Link to comment https://forums.kleientertainment.com/forums/topic/122019-why-dont-boats-look-like-this/page/2/#findComment-1375646 Share on other sites More sharing options...
Cuikui Posted September 29, 2020 Share Posted September 29, 2020 @zarklord_klei For as far as my tests go, I couldn't make them collide. It's a bit off topic, but here are some of my tests: Spoiler 1. I first create a cylindrical entity : Spoiler local function dummy_cylinder_fn() local inst = CreateEntity() inst.entity:AddTransform() local phys = inst.entity:AddPhysics() phys:SetMass(500) phys:SetFriction(0) phys:SetDamping(5) phys:SetCylinder(1, 2) phys:SetCollisionGroup(COLLISION.OBSTACLES) phys:ClearCollisionMask() phys:CollidesWith(COLLISION.OBSTACLES) phys:CollidesWith(COLLISION.GROUND) phys:SetCollisionCallback(OnCollide) phys:SetDontRemoveOnSleep(true) inst.entity:AddAnimState() --to make it visible inst.AnimState:SetBank("carrot") inst.AnimState:SetBuild("carrot") inst.AnimState:PlayAnimation("idle") inst.entity:SetPristine() if not TheWorld.ismastersim then return inst end inst.persists = false return inst end With the cylindrical entity everything is fine, they are colliding with each other: The masks are good. 2. Now I do the same thing with a Triangle Mesh, I use the same code except I use SetTriangleMesh instead of SetCylinder. Spoiler local function dummy_triangle_fn() local inst = CreateEntity() inst.entity:AddTransform() local phys = inst.entity:AddPhysics() phys:SetMass(500) phys:SetFriction(0) phys:SetDamping(5) phys:SetTriangleMesh(build_mesh(vertices)) phys:SetCollisionGroup(COLLISION.OBSTACLES) phys:ClearCollisionMask() phys:CollidesWith(COLLISION.OBSTACLES) phys:CollidesWith(COLLISION.GROUND) phys:SetCollisionCallback(OnCollide) phys:SetDontRemoveOnSleep(true) inst.entity:AddAnimState() --to make it visible inst.AnimState:SetBank("carrot") inst.AnimState:SetBuild("carrot") inst.AnimState:PlayAnimation("planted") inst.entity:SetPristine() if not TheWorld.ismastersim then return inst end inst.persists = false return inst end With the triangular mesh, I have two problems: The entity falls under the ground: There is no triangle_mesh/ground collision. If I create a "dummy_triangle" near a "dummy_cylinder" I detect a collision: Physics and masks work. 3. To prevent the triangular mesh from falling under the ground, I attach it to a "ground_support" with "Physics:ConstrainTo". The results are as follows: When I spawn "dummy_triangle_with_support" near "dummy_cylinder", I detect a collision. The "Physics" and "Mask" functions work. When I create several "dummy_triangle_with_support" close to each other, I don't detect a collision. Collisions between Triangle_mesh and Triangle_Mesh are not detected. My conclusion: The physics of trianglemesh/cylinder (or sphere) works as expected, while the physics of trianglemesh/trianglemesh (and similarly trianglemesh/ground and trianglemesh/world) does not. But maybe I missed something, and I'll be happy to hear how to make the trainglemesh meet. Here is the full code I used: Spoiler local assets = { Asset("ANIM", "anim/carrot.zip") } local function OnCollide(inst, other, world_position_on_a_x, world_position_on_a_y, world_position_on_a_z, world_position_on_b_x, world_position_on_b_y, world_position_on_b_z, world_normal_on_b_x, world_normal_on_b_y, world_normal_on_b_z, lifetime_in_frames) print(inst, other, world_position_on_a_x, world_position_on_a_y, world_position_on_a_z, world_position_on_b_x, world_position_on_b_y, world_position_on_b_z, world_normal_on_b_x, world_normal_on_b_y, world_normal_on_b_z, lifetime_in_frames) end --- Simple cylinder abject local function dummy_cylinder_fn() local inst = CreateEntity() inst.entity:AddTransform() local phys = inst.entity:AddPhysics() phys:SetMass(500) phys:SetFriction(0) phys:SetDamping(5) phys:SetCylinder(1, 2) phys:SetCollisionGroup(COLLISION.OBSTACLES) phys:ClearCollisionMask() phys:CollidesWith(COLLISION.OBSTACLES) phys:CollidesWith(COLLISION.GROUND) phys:SetCollisionCallback(OnCollide) phys:SetDontRemoveOnSleep(true) inst.entity:AddAnimState() --to make it visible inst.AnimState:SetBank("carrot") inst.AnimState:SetBuild("carrot") inst.AnimState:PlayAnimation("idle") inst.entity:SetPristine() if not TheWorld.ismastersim then return inst end inst.persists = false return inst end --- Util for triangle mesh local function build_mesh(vertices) local triangles = {} local y0 = 0 local y1 = 3 local idx0 = #vertices for idx1 = 1, #vertices do local x0, z0 = vertices[idx0][1], vertices[idx0][2] local x1, z1 = vertices[idx1][1], vertices[idx1][2] --vertical one table.insert(triangles, x0) table.insert(triangles, y0) table.insert(triangles, z0) table.insert(triangles, x0) table.insert(triangles, y1) table.insert(triangles, z0) table.insert(triangles, x1) table.insert(triangles, y0) table.insert(triangles, z1) table.insert(triangles, x1) table.insert(triangles, y0) table.insert(triangles, z1) table.insert(triangles, x0) table.insert(triangles, y1) table.insert(triangles, z0) table.insert(triangles, x1) table.insert(triangles, y1) table.insert(triangles, z1) idx0 = idx1 end return triangles end local vertices = {{-2, -2}, {-2, 2}, {2, 2}, {2, -2}} --a square --Simple triangle mesh local function dummy_triangle_fn() local inst = CreateEntity() inst.entity:AddTransform() local phys = inst.entity:AddPhysics() phys:SetMass(500) phys:SetFriction(0) phys:SetDamping(5) phys:SetTriangleMesh(build_mesh(vertices)) phys:SetCollisionGroup(COLLISION.OBSTACLES) phys:ClearCollisionMask() phys:CollidesWith(COLLISION.OBSTACLES) phys:CollidesWith(COLLISION.GROUND) phys:SetCollisionCallback(OnCollide) phys:SetDontRemoveOnSleep(true) inst.entity:AddAnimState() --to make it visible inst.AnimState:SetBank("carrot") inst.AnimState:SetBuild("carrot") inst.AnimState:PlayAnimation("planted") inst.entity:SetPristine() if not TheWorld.ismastersim then return inst end inst.persists = false return inst end --Triangle with support local function ground_support_fn() local inst = CreateEntity() inst.entity:AddTransform() local phys = inst.entity:AddPhysics() phys:SetMass(500) phys:SetFriction(0) phys:SetDamping(5) phys:ClearCollisionMask() phys:CollidesWith(COLLISION.GROUND) phys:SetCylinder(2, 2) phys:SetDontRemoveOnSleep(true) inst.entity:AddAnimState() --to make it visible inst.AnimState:SetBank("carrot") inst.AnimState:SetBuild("carrot") inst.AnimState:PlayAnimation("idle") inst.entity:SetPristine() if not TheWorld.ismastersim then return inst end inst.persists = false return inst end local function AddConstrainedPhysicsObj(inst, physics_obj) physics_obj:ListenForEvent("onremove", function() RemoveConstrainedPhysicsObj(physics_obj) end, inst) physics_obj:DoTaskInTime(0, function() if inst:IsValid() then physics_obj.Transform:SetPosition(inst.Transform:GetWorldPosition()) physics_obj.Physics:ConstrainTo(inst.entity) end end) end --Triangle mesh with ground support local function dummy_triangle_with_support_fn() local inst = CreateEntity() inst.entity:AddTransform() local phys = inst.entity:AddPhysics() phys:SetMass(500) phys:SetFriction(0) phys:SetDamping(5) phys:SetTriangleMesh(build_mesh(vertices)) phys:SetCollisionGroup(COLLISION.OBSTACLES) phys:ClearCollisionMask() phys:CollidesWith(COLLISION.OBSTACLES) phys:CollidesWith(COLLISION.GROUND) phys:SetCollisionCallback(OnCollide) phys:SetDontRemoveOnSleep(true) inst.entity:AddAnimState() --to make it visible inst.AnimState:SetBank("carrot") inst.AnimState:SetBuild("carrot") inst.AnimState:PlayAnimation("planted") local ground_support = SpawnPrefab("ground_support") AddConstrainedPhysicsObj(inst, ground_support) inst.entity:SetPristine() if not TheWorld.ismastersim then return inst end inst.persists = false return inst end return Prefab("ground_support", ground_support_fn, assets), Prefab("dummy_cylinder", dummy_cylinder_fn, assets), Prefab("dummy_triangle", dummy_triangle_fn, assets), Prefab("dummy_triangle_with_support", dummy_triangle_with_support_fn, assets) Link to comment https://forums.kleientertainment.com/forums/topic/122019-why-dont-boats-look-like-this/page/2/#findComment-1375776 Share on other sites More sharing options...
Developer zarklord_klei Posted September 29, 2020 Developer Share Posted September 29, 2020 10 hours ago, Cuikui said: snip Ah, yeah SetTriangleMesh doesn't support mass, so that is its first point of issue.... Link to comment https://forums.kleientertainment.com/forums/topic/122019-why-dont-boats-look-like-this/page/2/#findComment-1375963 Share on other sites More sharing options...
Bird Up Posted September 30, 2020 Share Posted September 30, 2020 On 9/25/2020 at 12:58 PM, Squirrel12 said: They do turn though... what the heck. someone is doing god's work. been wondering why klei hasn't done things like this. For bridges, it might be cool if bridge functioned as turf? Link to comment https://forums.kleientertainment.com/forums/topic/122019-why-dont-boats-look-like-this/page/2/#findComment-1376181 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.