PDA

View Full Version : Implementing ships.


brainleacher
03-25-2003, 04:49 AM
Hey guys,
Just wondering, would it be possible to implement ships currently with the current NPC wander code? I'm just thinking that if the ship is a npc type with the correct wander points set up for each zone that it passes through, then the ships can be spawned in each of those zones as a NPC and travel from grid point to grid point. There might need to be 2 columns added to the grid point table, a wait time at certain wander points (the docks, and the starting zone point), and a starting time based on time of day that it starts from its first point. The engine might even need to calculate a spawn location based on the grids and the time the zone server comes up.

So the ships don't actually travel from zone to zone, but rather just wander between the points in a zone. You can synch up the grid points between the zones with the zone points so that when a player travels from one zone to the next, he just happens to zone from a ship to another ship of the same name in the second zone. Also, you have to synch the wandering of the ships between the zones to guarantee that another ship is on the other side of the zone waiting for you. This would work even if the zone is not loaded on the zone server, because when a new zone is loaded, the ship would be at the starting point waiting for the ship from the previous zone.

Of course, somehow, when the player gets on the ship, he/she needs to start inheriting the ships coordinate transforms. Does the client engine already support this, or is this a server side issue?

Just my little thoughts, I don't quiter know the nature of the server side engine, but from what I can see, I thought that this might be a less painful way of implementing ships.

Trumpcard
03-25-2003, 05:37 AM
I dont think it would be too hard to do, and sounds very feasible..

Lets not overcomplicate it though... waittime, good idea. Will be easy to create the db structure for a wait time, and the hook to the ai to make it work.

See if you can create a spawn grid point for say the ship in qeynos and get it transversing that path.

Let me know, If you can get them travelling along the zone points correctly, I'll see about adding the extra database entry in for waittime to allow it to pause before moving to the next one then we can expand it from there.

This would even be a good idea to include into the database out of the box.

DeletedUser
03-25-2003, 05:48 AM
Boats dont use zone points I don't think, I believe they just force the client to zone. The only problem we have is boats on the other side of the zone, it requires timing and keep in mind we have sleeping zones, zones always running, etc. It will require some thought.

Trumpcard
03-25-2003, 07:04 AM
You know, sadly thats something I didnt think about..lol... what happens on the other side !

Good point image, it would be a problem coordinating it.. we'd almost have to pass a zoning flag to indicate its a boat transfer, then spawn a boat under the players location..

In essence, you can get them moving, and move through a zone, but once you hit the other side, there needs to be some handshaking going on..

Lurker_005
03-25-2003, 12:05 PM
How about Force the boat to always spawn at it's starting point on zone startup, and before any players are spawned. Then have the boat on a fixed schedule based off the system clock.

Normal operation is the boat is spawned right before the player zones, then starts it's motion say 30 seconds later. This could work because the boat zoning out is at a fixed time.

For zones that have to startup it is basically the same. The boat is just forced to spawn first. With the 30 second window before moving to cover timming errors with starting the zone, and players spawning. In the case of the zone starting for other reasons than players zoning via the boat, just have the boat spawn anyhow, and wait for the time to move.

brainleacher
03-25-2003, 06:05 PM
Lurker is absolutely correct, that was my exact line of thought. Iregardless of if the zone is constant or not, the boat can be guaranteed to be at the zone point via shedule. So when a boat hits the people on the boat hits the zone point and the target zone is constant, the boat in that zone should be already at the zone point sitting there waiting for the new passengers, according to its schedule. If the zone needs to be loaded, when it comes time to spawn a boat, it'll see that according to its schedule, it should spawn at the zone point ( this will be the case if the zone is forced to load because a player zoned in via a boat from another zone). In the case of a player zoning in to a boat zone via a non-boat method, the boat can be spawned at any grid point and will just wait at the grid point until its time to move. Does that sound about right?

brainleacher
03-25-2003, 06:10 PM
Man, I suddenly realized that I'm typing very badly, I'm skipping words left and right in my posts. Sorry if I sound like an uneducated simpleton.

:cry:

Lurker_005
03-26-2003, 01:11 PM
Yea that is what I was thinking might work. now for someone to program that up :D

mByte
03-26-2003, 06:19 PM
Invis door?

Spawn a ship park it at the dock in efreeport

You cant just walk on, i think I saw somewhere there is a OpenBoatDoor_struct at one time.

brainleacher
03-26-2003, 07:31 PM
I noticed that too, the bow of the ship is out of the water, which is why you can't get on. It's too high. It needs a translation in the Z.