The Holidays are Coming...
The holidays are coming! What a good time to settle down and relax with con and a warm mug of hot chocolate while relaxing!
Or maybe we should get up and do a little something to make us "sweat."
SuperDoe was proposing earlier that we do something for the upcoming holidays (mainly Christmas ). I know last time we tried to do a contest, it was a bit of a drag (maybe we should do contests...). I would like to know what you guys would like to do for the holidays!
Thoughts? Comments? Suggestions? Please express them!
Or maybe we should get up and do a little something to make us "sweat."
SuperDoe was proposing earlier that we do something for the upcoming holidays (mainly Christmas ). I know last time we tried to do a contest, it was a bit of a drag (maybe we should do contests...). I would like to know what you guys would like to do for the holidays!
Thoughts? Comments? Suggestions? Please express them!
Comments
Are you sure clientside will go down well with The-Construct or whoever's willing to take it?
Waldo???
Thanks, Thyth.
If Eolk can't do it, i will.
*cough* Clientside *cough*
Unless if you simply move them below the ground...
It could work, and it couldn't. I think I found some terrain-loading functions. I'll give it a shot soon.
WALDO??? WHERE ARE YOU?!?
Terrain holes are properties of the instance, not of the mesh. That's why you can plop holes in the terrain using the editor for buildings with underground areas without making the map client side.
It is quite likely that these deactivated tiles will appear active to clients, but if you provide some sort of visual outline of the cutout, it isn't a big deal.
The only reason nobody has done it before is because nobody has bothered figuring out how to go from terrain X/Y coordinates to tile index numbers. I'm sure anyone with half of a brain (which obviously excludes you, Phantom) could figure out that conversion in under 20 minutes.
I've finally conducted some research, and things are starting to make sense...
Playing "what is the rule?" is not my favorite game...
Converting a position to a square number might not be the best approach... I probably should have started on this earlier, 'cause it's getting too late to think...
Anyway, when I tried terrain tile/position conversion on the Katabatic map, I discovered that the existing terrain holes were all between 0 and 1048576. Considering terrain maps are square (and based on this upper bound, the Katabatic terrain is 1024x1024 tiles), this means the tiles are numbered somehow sequentially. Terrain objects have a tile size field property to indicate how large a terrain block is on the X and Y axis. So... if you take the position of the player/deployable hole pack, from it subtract the position of the terrain, and ignore the z axis, you get a positional delta vector. If you divide that by the size of the terrain tile, and floor it, you should get a 2D vector indicating how many tiles on the X axis, and how many tiles on the Y axis the player/deployable hole pack is located.
Then, it becomes a process of figuring out which direction tiles go on the terrain map, which is really 2 questions. Firstly, does the tile index increment process move on the X axis, or the Y axis, as well as if it is in the positive or negative direction. Secondly, does the tile wrap increment process move in the positive or negative direction on the axis orthogonal to the index increment process move.
Once you figure out that, it is trivial to go from x/y to tile index, and index to tile position.
The only snag you might run into is what happens to tile index values when you create holes on tiles that are on one of the nearly infinite duplicated sections of the terrain.
I'm testing using MissionBlank from Zear's pack. It's a little easier on a flat terrain.
I think that's enough evidence...
Happy Holidays Everyone! :wave:
Well, hoop-de-doop, and dickory dock...