Squirrel12

Why don't boats look like this?

Recommended Posts

Hornete    5683
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?

Edited by Hornete

Share this post


Link to post
Share on other sites
Cuikui    273
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.

  • Thanks 1

Share this post


Link to post
Share on other sites
Orangex    124
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???

Share this post


Link to post
Share on other sites
-Variant    5739
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.

Share this post


Link to post
Share on other sites
pedregales    480

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.

Edited by pedregales
  • Like 1

Share this post


Link to post
Share on other sites
Duck986    784
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.

  • Like 1

Share this post


Link to post
Share on other sites
ShadowDuelist    7082
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.

  • Haha 1

Share this post


Link to post
Share on other sites
Mike23Ua    7695

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

D4E62837-663E-420C-95B8-1842A7E0ECBD.png.b74951a99a7bdc3d77bdc18150ebdfa8.png228115B7-7C2F-48E3-BFB4-E465C842FC1F.thumb.jpeg.15c8c7da1c77f78d1780fc494263c1e3.jpeg7812B902-E8F9-47F2-A59A-9F3F70E1F896.png.4aa552ea4cb881097e6c876baa03e30a.png1CEECFD0-697C-4C11-B445-E9AE66FB6F19.jpeg.f9224826a81ff4ce5ef4a8dc0e67432b.jpeg

Share this post


Link to post
Share on other sites
stranger again    439
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

D4E62837-663E-420C-95B8-1842A7E0ECBD.png.b74951a99a7bdc3d77bdc18150ebdfa8.png228115B7-7C2F-48E3-BFB4-E465C842FC1F.thumb.jpeg.15c8c7da1c77f78d1780fc494263c1e3.jpeg7812B902-E8F9-47F2-A59A-9F3F70E1F896.png.4aa552ea4cb881097e6c876baa03e30a.png1CEECFD0-697C-4C11-B445-E9AE66FB6F19.jpeg.f9224826a81ff4ce5ef4a8dc0e67432b.jpeg

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?

Edited by stranger again

Share this post


Link to post
Share on other sites
Mike23Ua    7695
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.

:) 

Share this post


Link to post
Share on other sites
Cuikui    273

@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)

 

 

 

  • Thanks 2
  • Big Ups 1

Share this post


Link to post
Share on other sites
Bird Up    1964
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?

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now