• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] Random Terrain Generation

Status
Not open for further replies.
Summary:
  1. Why are my 'biome' lines straight versus curvy.
  2. Does PlayerCam work for multiplayer?
More Details:

So, I'm making a terrain generator based on the one I used for Infection. And while I've made it much more efficient and less laggy, I found out that when adding a second heightmap of sorts simulating the amount of rainfall that spot gets, versus the first heightmap being the literal terrain height, it would generate Fall/Summer edges that are far too straight and flat to be as smooth as the math behind it would say.

To get a feel for what i'm looking for, the lines between normal grass and dark grass (under the trees) is nice and jagged/curvy.

Attached below is an example map, containing solely the terrain generator on a 64x64 blank map. If you want to only see the terrain, then comment out where I call CreateDestructable().

Secondly; in the trigger PlayerCam, would that cause a desync, or would it successfully work for all players in their respective camera locations?
 

Attachments

  • Terrain Gen Error.w3x
    19.5 KB · Views: 124
Summary:
  1. Why are my 'biome' lines straight versus curvy.
  2. Does PlayerCam work for multiplayer?
More Details:

So, I'm making a terrain generator based on the one I used for Infection. And while I've made it much more efficient and less laggy, I found out that when adding a second heightmap of sorts simulating the amount of rainfall that spot gets, versus the first heightmap being the literal terrain height, it would generate Fall/Summer edges that are far too straight and flat to be as smooth as the math behind it would say.

To get a feel for what i'm looking for, the lines between normal grass and dark grass (under the trees) is nice and jagged/curvy.

Attached below is an example map, containing solely the terrain generator on a 64x64 blank map. If you want to only see the terrain, then comment out where I call CreateDestructable().

Secondly; in the trigger PlayerCam, would that cause a desync, or would it successfully work for all players in their respective camera locations?
I couldn't check the map yet, as I don't have WC3 on this machine installed, but I suppose you are using terrain deformers based on abilities?

All I can say is that all ways to deform terrain on WC3 are bugged as hell and are very prone to desyncs (especially if you get locationZ somewhere in the map) and create a high amount of hardcoded leaks, so as long as your map is going to be multiplayer, I'd say forget about it. :/

About your camera trigger:
As I said, I couldn't check it yet, but as long as you do not create/destroy/alter any handle variables, it should be totally fine in multiplayer. All scripts that get the current camera target or eye should only affect visual things, not net traffic objects (unless you sync the data using gamecache or nestharius sick network library).

There are exceptions to this, which are texttags and images, as they do not create net traffic.
 
I use terrain deformations, which don't leak like one would think, and i'm talking about a single setting of the environment, i am not worried about leaks (and have all removed that are within my power, afaik of course)
You might want to check this thread:
http://www.hiveworkshop.com/forums/...rrain-deformations-destructables-leak-207515/

As DrSuperGood stated:
Terrain deformations are very prone to desyncs, depending on the OS you are using and the game's graphic options. Before you move on with your map, I seriously suggest you do some testing on how stable your script is by hosting the map in public to gather data from a lot of different players.
 
Status
Not open for further replies.
Top