I want to applaud this outstanding effort. We at the Mo'Creatures Community have a lot of exploring members and a lot of people who enjoy other mods of transportation in addition to that provided by winged or ridden critter. We will soon be supporting this mod on our server, which raises a couple of questions: due to the number of entities involved in each ship, what sort of server load can we expect? Will these affect the overall entity count? How much frame rate drop can we expect from racing two of these things or more against each other?
Awesome work!
Thanks.
Server performance has always been an open question, and entity count has always been the driving factor. I figure there's a limit to how big/complex/many ships a server could reasonably handle, but I don't have any good metrics to go on so far.
I've taken great pains to limit the client-server communications overhead. Even though the boats have an increasingly high entity count, only the parent entity is synchronizing position, and that helps immensely... but I'm also forcing a position sync every few seconds, so that bumps it up a bit.
As this is beta/WIP I haven't been too careful when it comes to array instantiation and cleanup. Specifically, there are a whole bunch of render objects that aren't being used (you can see messages about that in the debug output) and some local vars that aren't being used. There's also some repetitive calculation that could be optimized. All of that will need to be addressed before I publish the code.
My gut tells me that RAM is going to be the worst hit, followed by CPU. Network traffic shouldn't be too bad.
Just as a couple of data points:
My development rig is an 8-core linux monster, and I had to drop a couple dozen Hoys in order to see the CPU graph do something other than flatline.
My LAN testing is done over a wireless connection. The second client is a 4-core Win7 laptop... with Minecraft running in a linux VM.
My dedicated test server is an ancient DL-380 on a 100mb switch.
Running with no other mods, everything is as smooth as vanilla. There's a tick every so often when the position sync hits (most noticeable during high speed turns) but I'm happy with the results so far.
WRT running Small Boats on your server... make sure you back up your world first! I haven't had a world corruption or crash lately, but I haven't done a lot of server testing lately, either. I'd suggest copying the world off your server and trying a LAN game with boats first, just for a sanity check.
Will you be making ship rigged boats, or are you planning on sticking to sloop or lanteen rigs?
I started with fore and aft rigs because they're easier. Gaffs because... well, I like 'em. I'm working toward fully-rigged ships, but there are a lot of capabilities expected of a "ship" that you don't need to deal with on a "boat" -- walking around on deck, for example. And it seems that, with every new capability (guns, for instance) a new problem pops up (what, you wanted to be able to *sink* a boat?).
I'd say that, right now, the primary obstacle to a full rig is the ability to walk around on deck (square sails = multiple masts = bigger vessel = people want to walk around on it). Seems like such a simple thing, but it's been a massive PITA. I got frustrated working on it and decided to do something fun, so I finished rigging the Hoy.
Have you taken a look at the old zeppelin mod? It seems to me he had come up with a primitive way to allow deck walking while in motion. I'm not sure how the entity interaction works, but there might be a couple of ways around it. The first would be a hotkey to cycle positions around the boat; naturally, it would have to perform a check for open attachment points. The second is to attempt to create an AI pathing way, and attach it to the entites.
I've seen this sort of thing work in other games, but only with fixed points, like bridges. I would imagine that such a path would have to check its position relative to the rotation of the attachment points, and that might be a pain in the butt.
We currently use the portculisante plugin, and we have noticed that the moving blocks allow a full movement range while stationary, but hold the player in position when in motion. However, if there was some sort of pathway, and the player was attached to that instead of the blocks, and then the pathway was attached to the blocks, movement might be possible?
One of our guys was taking the old zeppelin mod apart to try to understand it (with an eye towards airships). There may be nothing you can learn from the zeppelin mod, and it may not have anything to do with your project, but I figured I'd mention it.
As to damage, If the entities that make up the hull were replaced over time as damage occurred past a certain point with damage mapped entities, and then perhaps removed altogether? (like we can remove the tusk armor on the mo'creatures elephants with a pickaxe) If the loss of some entities leads to the removal of others? I would think that they fact that the boats are made of entities might lend itself to tracking damage and swapping textures? Just thinking here.
I've heard of the zeppelin mod, watched some videos, but I've never looked at the code. Might be worth spending a little time with it.
Moving positions is currently a click-to-move deal... just interact with a new seat. Works okay for the Whitehall where everyone is sitting down, but would look pretty funny on the Hoy.
BTW, I may have spoken too soon on the SMP smoothness. I just updated all my test installs to 1.5.2, and something is borked now, Very twitchy, and players keep jumping out of the boat. I've seen something like this in the past, but thought I fixed it. May have a regression bug, or MC/Forge may have changes something on me.
Re: Damage
Damage to the hull is nearly trivial to track. Each entity already recognizes collisions, so transferring a damage value is a no-brainer. Exceeding a certain damage value changes the rendering texture, and starts leaking water into the boat. Flooding slows you down and increases heel angle. When heel reaches a certain limit, the boat just falls over and sinks.
I think boats would have to be self-healing for now, with a nominal healing rate for each damaged entity. One or two blow-outs you can ran away from, more than that and you'd be in trouble. Would need to add manually operated pumps at some point (see what I mean about capabilities causing problems?).
Damage to the rigging is much more difficult to handle. The sails and cordage aren't entities, so damage would have to be approximated. Dismasting should be easy enough to check for, the masts are entities, so they can detect collisions. Would probably need to have alternate handling for different ordnance (bar/chain shot vs shell, for example).
Fire would be the most difficult. I haven't looked at the fire code, but it should be do-able, given that zombies catch on fire. Still, it's the sails and cordage that are most at risk, and those aren't entities...
I think it would be easy to go overboard with complexity. In terms of damage, I think that you would need a gui, or at least a script interface with the Mojang anvil. For the moment, damage could be represented to the players the same way you actually construct the boats, with each construction segment showing a damage line (like any tool or weapon would). In the case of damaged sections, the ship could require both an anvil and a tool chest. Each single damaged section could require a chief component at the anvil to repair (for example, hull damage could require wood, sail damage wool, rigging damage string), the boat segments could then be "reunited" on the tool chest, repairing the boat up to 100%.
This would allow for partial or complete repairs, could provide the player with easy damage feedback (going to the anvil and tool chest would be the equivalent of damage control - no pumps needed), and would make it a lot easier on you. After all, this is Minecraft, not Age of Sail. You could even limit the amount of damage the tool chest and anvil could repair, creating the need for an additional block "shipyard," which the player would have to place on shore, within so many blocks of the ship, to completely repair a heavily damaged vessel. Of course, if in the future you decided to get more complex, that'd be totally your call.
We are pretty unhappy with 1.5.2 in terms of performance, and we are hoping that some of the promised fixes for 1.6 help significantly in that direction.
Really? When I called the NSA, they said to turn down rock, because they prefered the sound of the shrill opera of 'NEXT' and 'That's paper E, this line if for paper D!'
Rollback Post to RevisionRollBack
Want my attention? QUOTE ME
11/5/15
This is the first time I've edited my siggy in 3 Years, 5 Months and 7 days.
I just love this mod. Ive had it for 10 minutes and its awesome. Is there anyway to drive the hoy? and why does the small boat crash my client?
The small boat is code behind the other two boats so it's not a real boat but it still shows up for some reason. The Hoy is just for show for now but it will be usable soon.
By the way the NSA said could you turn down your music a little, and their guys prefer classical jazz rather than what you are listening to at the moment.
Really? When I called the NSA, they said to turn down rock, because they prefered the sound of the shrill opera of 'NEXT' and 'That's paper E, this line if for paper D!'
Sheesh... really? I've got a playlist that runs 3-4 days and has a little bit of everything. Harry Connick Jr, Glenn Fry, Toto, New Christy Minstrels, Billy Joel, Beatles, Sting, Steve Miller, Glenn Miller, Sara Evans, Joe Cocker, Jeff Healey, Henry Mancini, Bob Marley, Asia, AC DC... the list goes on and on and, if there isn't something in my playlist that you like, you just don't like music.
And... the shrill sound was probably my cat. She's Siamese, she can't help it.
We are pretty unhappy with 1.5.2 in terms of performance, and we are hoping that some of the promised fixes for 1.6 help significantly in that direction.
Yeah, I'm sensing a tremor in The Force... 1.5.x has put everyone on notice, and 1.6 is being anticipated with trepidation.
The small boat is code behind the other two boats so it's not a real boat but it still shows up for some reason. The Hoy is just for show for now but it will be usable soon.
What Ezradavid said. The "smallboat" is the back-end code and shouldn't have been shown as an item. The fix is in, I hope to be posting a new version tomorrow.
The Meaning of Life, the Universe, and Everything.
Join Date:
8/23/2012
Posts:
350
Minecraft:
AridholGM
Member Details
That new Hoy looks OUTSTANDING!
Just wanted to let you know. It's rad. Totally rad. Can't wait to play with the final version! The pretty version is enough to tide me over for awhile now though probably haha
EDIT:
Building a new modpack for myself, waiting for that update you've got in the works since its forthcoming soon!
Just posted the update, download link in the first post.
This version is not recommended for multiplayer. Something changed in MC/Forge, and position sync is now broken (position/orientation isn't maintained properly, and passengers jump in and out of the boats), I'm looking into it, but I'm expecting things to change again when 1.6 is released next week, so don't expect a fix for a few weeks.
I need an icon for the Hoy. I am no artist, but I know there are a few following this mod (hey, Drullkus!).
There were internal entity changes to the boats and some packet protocol changes -- FLUSH YOUR BOATS!
Instant poll: What's more important (ie, which would you rather see in the next release)?
great job with the update man love the models! Just finished up my showcase did 2 videos in one comparing archimedes ship mod to this was very interesting loved every minute of it! Also i thinking walking on decks is way more high priority
great job with the update man love the models! Just finished up my showcase did 2 videos in one comparing archimedes ship mod to this was very interesting loved every minute of it! Also i thinking walking on decks is way more high priority
Thanks for the vid! Added to the first post.
A few things to note -- I added a few keyboard commands. You can exit the boat with "F" and access the chests with "N" and "M". On the Hoy this is just about the only way to access the chests, because they're just outside clicking range (if you aim *just right*, you can get to one of them with a click).
The glitchiness you saw in the Whitehall occured because you switched seats, and there's something messed up with the position sync (hence the warning about using this version in multiplayer).
There's no icon for the Hoy because... there's no icon yet. I suck at icons, and I'm hoping someone (hey, Drullkus! ) will help me out with one. I could have just written "Hoy" on a background and used that, but I figured the additional ugliness would encourage a replacement.
Whenever I make a change to the entity structure or packet protocol, it causes problems for any boats already added to a world. Things that are written to NBT won't be read back out correctly, and it causes boats to do strange things, and can crash your world. This is why I suggest removing the mod jar, loading your world (which will force Minecraft to flush the old entities out of NBT), and then add the new mod jar. It's a PITA I know, but it's the only way I've found to keep worlds from crashing.
You mentioned that the Hoy looks odd at distance when using optifine. I don't use optifine, so I don't see what you see, and I couldn't really tell from your video. Can you send me a screen cap?
There are a number of things I wanted to do prior to posting this version, but I had some bugfixes in, so I wanted to get those out there sooner rather than later. That, and I think 1.6 is going to throw a wrench in the works, and I didn't want to wait until after I'd gotten my dev and test rigs updated before putting out another release.
The glitchiness you saw in the Whitehall occured because you switched seats, and there's something messed up with the position sync (hence the warning about using this version in multiplayer).
Ah ok i think this explains why my client and server are desyncing the boats. If one of my boats gets stuck but then I get it unstuck, it's still stuck on the server and isn't actually moving but the client goes on like normal. When I get out, it drops me off where I originally got stuck. Only relogging fixes this. I guess I can deal with this and just keep the boats away from anything that would get them stuck =)
One suggestion - can you make the boats spawn horizontally out from the player since usually we spawn them near a dock or land, instead of always spawning them pointing one direction? (this usually gets them stuck in the land or dock.)
Love the Hoy model, and I just saw you added the key commands, very nice. (oh and I want walking on deck)
Thanks.
Server performance has always been an open question, and entity count has always been the driving factor. I figure there's a limit to how big/complex/many ships a server could reasonably handle, but I don't have any good metrics to go on so far.
I've taken great pains to limit the client-server communications overhead. Even though the boats have an increasingly high entity count, only the parent entity is synchronizing position, and that helps immensely... but I'm also forcing a position sync every few seconds, so that bumps it up a bit.
As this is beta/WIP I haven't been too careful when it comes to array instantiation and cleanup. Specifically, there are a whole bunch of render objects that aren't being used (you can see messages about that in the debug output) and some local vars that aren't being used. There's also some repetitive calculation that could be optimized. All of that will need to be addressed before I publish the code.
My gut tells me that RAM is going to be the worst hit, followed by CPU. Network traffic shouldn't be too bad.
Just as a couple of data points:
WRT running Small Boats on your server... make sure you back up your world first! I haven't had a world corruption or crash lately, but I haven't done a lot of server testing lately, either. I'd suggest copying the world off your server and trying a LAN game with boats first, just for a sanity check.
I started with fore and aft rigs because they're easier. Gaffs because... well, I like 'em. I'm working toward fully-rigged ships, but there are a lot of capabilities expected of a "ship" that you don't need to deal with on a "boat" -- walking around on deck, for example. And it seems that, with every new capability (guns, for instance) a new problem pops up (what, you wanted to be able to *sink* a boat?).
I'd say that, right now, the primary obstacle to a full rig is the ability to walk around on deck (square sails = multiple masts = bigger vessel = people want to walk around on it). Seems like such a simple thing, but it's been a massive PITA. I got frustrated working on it and decided to do something fun, so I finished rigging the Hoy.
*sigh*
I guess it's time to get back to work...
I've seen this sort of thing work in other games, but only with fixed points, like bridges. I would imagine that such a path would have to check its position relative to the rotation of the attachment points, and that might be a pain in the butt.
We currently use the portculisante plugin, and we have noticed that the moving blocks allow a full movement range while stationary, but hold the player in position when in motion. However, if there was some sort of pathway, and the player was attached to that instead of the blocks, and then the pathway was attached to the blocks, movement might be possible?
One of our guys was taking the old zeppelin mod apart to try to understand it (with an eye towards airships). There may be nothing you can learn from the zeppelin mod, and it may not have anything to do with your project, but I figured I'd mention it.
As to damage, If the entities that make up the hull were replaced over time as damage occurred past a certain point with damage mapped entities, and then perhaps removed altogether? (like we can remove the tusk armor on the mo'creatures elephants with a pickaxe) If the loss of some entities leads to the removal of others? I would think that they fact that the boats are made of entities might lend itself to tracking damage and swapping textures? Just thinking here.
Good luck, however you handle it.
Moving positions is currently a click-to-move deal... just interact with a new seat. Works okay for the Whitehall where everyone is sitting down, but would look pretty funny on the Hoy.
BTW, I may have spoken too soon on the SMP smoothness. I just updated all my test installs to 1.5.2, and something is borked now, Very twitchy, and players keep jumping out of the boat. I've seen something like this in the past, but thought I fixed it. May have a regression bug, or MC/Forge may have changes something on me.
Re: Damage
Damage to the hull is nearly trivial to track. Each entity already recognizes collisions, so transferring a damage value is a no-brainer. Exceeding a certain damage value changes the rendering texture, and starts leaking water into the boat. Flooding slows you down and increases heel angle. When heel reaches a certain limit, the boat just falls over and sinks.
I think boats would have to be self-healing for now, with a nominal healing rate for each damaged entity. One or two blow-outs you can ran away from, more than that and you'd be in trouble. Would need to add manually operated pumps at some point (see what I mean about capabilities causing problems?).
Damage to the rigging is much more difficult to handle. The sails and cordage aren't entities, so damage would have to be approximated. Dismasting should be easy enough to check for, the masts are entities, so they can detect collisions. Would probably need to have alternate handling for different ordnance (bar/chain shot vs shell, for example).
Fire would be the most difficult. I haven't looked at the fire code, but it should be do-able, given that zombies catch on fire. Still, it's the sails and cordage that are most at risk, and those aren't entities...
This would allow for partial or complete repairs, could provide the player with easy damage feedback (going to the anvil and tool chest would be the equivalent of damage control - no pumps needed), and would make it a lot easier on you. After all, this is Minecraft, not Age of Sail. You could even limit the amount of damage the tool chest and anvil could repair, creating the need for an additional block "shipyard," which the player would have to place on shore, within so many blocks of the ship, to completely repair a heavily damaged vessel. Of course, if in the future you decided to get more complex, that'd be totally your call.
We are pretty unhappy with 1.5.2 in terms of performance, and we are hoping that some of the promised fixes for 1.6 help significantly in that direction.
Sheesh... really? I've got a playlist that runs 3-4 days and has a little bit of everything. Harry Connick Jr, Glenn Fry, Toto, New Christy Minstrels, Billy Joel, Beatles, Sting, Steve Miller, Glenn Miller, Sara Evans, Joe Cocker, Jeff Healey, Henry Mancini, Bob Marley, Asia, AC DC... the list goes on and on and, if there isn't something in my playlist that you like, you just don't like music.
And... the shrill sound was probably my cat. She's Siamese, she can't help it.
Exactly. I'm trying to keep things simple... it will get complicated enough, soon enough.
Yeah, I'm sensing a tremor in The Force... 1.5.x has put everyone on notice, and 1.6 is being anticipated with trepidation.
What Ezradavid said. The "smallboat" is the back-end code and shouldn't have been shown as an item. The fix is in, I hope to be posting a new version tomorrow.
Just wanted to let you know. It's rad. Totally rad. Can't wait to play with the final version! The pretty version is enough to tide me over for awhile now though probably haha
EDIT:
Building a new modpack for myself, waiting for that update you've got in the works since its forthcoming soon!
This version is not recommended for multiplayer. Something changed in MC/Forge, and position sync is now broken (position/orientation isn't maintained properly, and passengers jump in and out of the boats), I'm looking into it, but I'm expecting things to change again when 1.6 is released next week, so don't expect a fix for a few weeks.
I need an icon for the Hoy. I am no artist, but I know there are a few following this mod (hey, Drullkus!).
There were internal entity changes to the boats and some packet protocol changes -- FLUSH YOUR BOATS!
Instant poll: What's more important (ie, which would you rather see in the next release)?
Agreed.
Thanks for the vid! Added to the first post.
A few things to note -- I added a few keyboard commands. You can exit the boat with "F" and access the chests with "N" and "M". On the Hoy this is just about the only way to access the chests, because they're just outside clicking range (if you aim *just right*, you can get to one of them with a click).
The glitchiness you saw in the Whitehall occured because you switched seats, and there's something messed up with the position sync (hence the warning about using this version in multiplayer).
There's no icon for the Hoy because... there's no icon yet. I suck at icons, and I'm hoping someone (hey, Drullkus! ) will help me out with one. I could have just written "Hoy" on a background and used that, but I figured the additional ugliness would encourage a replacement.
Whenever I make a change to the entity structure or packet protocol, it causes problems for any boats already added to a world. Things that are written to NBT won't be read back out correctly, and it causes boats to do strange things, and can crash your world. This is why I suggest removing the mod jar, loading your world (which will force Minecraft to flush the old entities out of NBT), and then add the new mod jar. It's a PITA I know, but it's the only way I've found to keep worlds from crashing.
You mentioned that the Hoy looks odd at distance when using optifine. I don't use optifine, so I don't see what you see, and I couldn't really tell from your video. Can you send me a screen cap?
There are a number of things I wanted to do prior to posting this version, but I had some bugfixes in, so I wanted to get those out there sooner rather than later. That, and I think 1.6 is going to throw a wrench in the works, and I didn't want to wait until after I'd gotten my dev and test rigs updated before putting out another release.
Ah ok i think this explains why my client and server are desyncing the boats. If one of my boats gets stuck but then I get it unstuck, it's still stuck on the server and isn't actually moving but the client goes on like normal. When I get out, it drops me off where I originally got stuck. Only relogging fixes this. I guess I can deal with this and just keep the boats away from anything that would get them stuck =)
One suggestion - can you make the boats spawn horizontally out from the player since usually we spawn them near a dock or land, instead of always spawning them pointing one direction? (this usually gets them stuck in the land or dock.)
Love the Hoy model, and I just saw you added the key commands, very nice. (oh and I want walking on deck)