I have this idea but I'm not sure how to make it work.
Essentially I want a verb called Dive whenever a player is swimming. Now when they dive, it saves the Y coordinate to refer to later on when they return to the surface. Now for some overview, I'm essentially making several "diving areas" for each part of the map that essentially chop each part of the map up into equally sized chunks that each span the entire width of the original map, with water where a player can swim and even fight. Then I would tell the Dive proc to check where the player is height wise (Y coordinate)and of course the Z coordinate and then sending them to the top of an appropriate "diving area" with the same x coordinate that they have when they first dive. Now when they dive, they can swim upwards (until they reach the top and re-surface), downwards, left and right (and even diagonals) the same way you can move around in any byond game. Then when you swim all the way up again, it first checks the saved Y and Z coordinates from the time you first submerged and then it returns you to the X(wherever you were underwater) Y and Z (saved from when you first used Dive).
First problems that sprung to mind were the occasion where two players are within view of each other -- say Mike and Dan. Mike has location 10,5,1 and Dan has location 12,11,1. In this instance, let's say I broke the map into chunks of 10. So for every 10 values in the Y coordinate, a player would be sent to a different area. However these two players are clearly within view of each other. Even so, Mike would be sent to "Diving area 1" and Dan would be sent to "Diving area 2".
But then I thought there might be a way to add to the Dive proc -- saying "If another player uses Dive within the oview of the player about to Dive, then send this player to the same diving area as the last player to use Dive within oview." Which would basically just send them to the same Y value as the last player to use Dive within their view, and again they keep their own X value so they don't spawn on top of each other after Diving.
For those of you who may not quite understand what I'm trying to say, picture it like this. Imagine there's SEVERAL 2d fish tanks for a single layer Z of a map
Players on the map that are swimming can dive down. However, players within a certain range of Y coordinates can be sent into the same Fish Tank (but with their own X coordinates)
The lesser the area between players (in a Y coordinate sense) for a single fish tank, the more fish tanks there would have to be -- and thanks to the "check oview dive" idea, players won't have to worry about being in different y coordinate "chunks" that would send them to different fish tanks even tho they can see each other on the surface.
I'd like as much feedback as possible, any questions, comments, positive or negative, anything.
ID:139393
![]() Jan 23 2011, 4:43 pm
|
|