Choupom / tw-maps-gen

Generates as images the layers of a Teeworlds map.
Other
11 stars 4 forks source link

Dumping quads #6

Open Sworddragon opened 13 years ago

Sworddragon commented 13 years ago

The quads should be dumped like the player sees them at playing (not like the map editor shows them).

Choupom commented 13 years ago

Done for rectangular quads.

Sworddragon commented 13 years ago

I have thought about it and this ticket can be maybe closed.

The problem is not the view of the quad but the parallax. This is not a quad specific problem because tiles can have a parallax too. The only thing that is needed is the position of the quads like the offsets for the tiles. But this is related to the metadata ticket. With the metadata we have even the parallax and can calculate the view of the image.

Theoretically it is just a scaling calculation. I'm not sure if tw-maps-gen should do this. Maybe you want but if not you can close this ticket. If you decide to do this you should remember that this must be done for tiles too. This is like the offset calculation of a tile layer. tw-maps-gen don't add any empty graphics information because just of the offset. It's easy to calculate external how to do this.

Choupom commented 13 years ago

This issue is about dumping quads, like you see them ingame : the sun, the clouds, the moon, etc.

The position of a layer with a custom parallax (other than 100) changes according to the camera position and thus can't be computed by tw-maps-gen.

Sworddragon commented 13 years ago

This issue is about dumping quads, like you see them ingame : the sun, the clouds, the moon, etc.

If you want this you must render the offset of them. If you are talking about moving quads you are talking about the parallax. But with the metadata the offset dumping is not needed anymore.

Choupom commented 13 years ago

There is no need for rendering the offset, it would make a big blank in the images and would make them heavier. The offset will be dumped in the metadata with the rest of the informations (para, clipping, etc) and will allow other programs to move the layers correctly.

Sworddragon commented 13 years ago

This is good that the offset will not be rendered. Aren't currently all quads dumped as original graphic? Maybe this is the problem here.

Choupom commented 13 years ago

There is no problem, this just has to be done...

Sworddragon commented 13 years ago

I think I have get it now. You are talking about quads that are morphed. tw-maps-gen currently don't dump them correctly if they are sized or morphed abstractly. Am I correct with this?

Choupom commented 13 years ago

Yeah, as i said, "Done for rectangular quads."