[WF-General] spawn area

Erik Hjortsberg erik.hjortsberg at gmail.com
Sat Jan 2 10:58:08 PST 2010

Hi, here's an example of a terrain mod.

    <map name="terrainmod">
      <float name="heightoffset">0</float>
      <map name="shape">
        <string name="type">polygon</string>
      <string name="type">levelmod</string>


Alistair Riddoch skrev:
> Agreed the format needs to be common.
> Also agreed that the format should be flexible enough to support
> different shape types, though I am disinclined to go much out of my
> way to support formats other than Polygon in much of the code for now.
> Do you have Atlas examples to hand for the shape of terrain mods? I am
> frantically busy sorting my move today, and if I can get this coded
> today, I will.
> I will spin the release last thing tonight.
> 2010/1/2 Erik Hjortsberg <erik.hjortsberg at gmail.com>:
>> I can agree that not all different kind of shapes fits all kind of purposes,
>> but I still think that we would benefit from having both a common code and a
>> common atlas representation of shapes.
>> While the code can be common for parsing the shapes, different kind of
>> properties might have different kinds of shapes available. The changes made
>> to Mercator with the addition of atlas parsing of shapes was made with such
>> a harmonization in mind.
>> If the way shapes are defined for the terrain mods, there's a "shape"
>> attribute which in turn has a "type" attribute describing the type of shape,
>> and then different other attributes defining the shape, dependent on the
>> type.
>> For spawn areas I would actually think that circles and rectangles would be
>> more suited than polygons, since the math for generating an evenly spread
>> random point within the shape probably would be simpler.
>> I did the code for the terrain mods; if you want I can take a stab at
>> implementing this for the spawn points too.
>> Another question regarding the spawn points: I see that there is proof of
>> concept code in SpawnEntity::populateEntity
>> Is the idea to let this be data driven, or to let it be implemented in a
>> script hook?
> Yeah, populateEntity will become data driven, the idea being that
> initial inventory will be determined here instead of in the core
> character creation code. Will probably make some progress on this
> tonight too.
> Al
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.worldforge.org/pipermail/general/attachments/20100102/db3d610f/attachment-0001.html>

More information about the General mailing list