Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the point of PIE version? #325

Closed
inodlite opened this issue Apr 16, 2019 · 5 comments

Comments

@inodlite
Copy link
Contributor

commented Apr 16, 2019

According to https://github.com/Warzone2100/warzone2100/blob/master/doc/PIE.md there are multiple PIE 3-only directives.

Yet there are multiple models in master with EVENTS and ANIMOBJECT directives which are still PIE 2.

ImdLoader is simply checking for 2 or 3 in version and not using this info for anything else (maybe passes down for points reading):

if (imd_version != PIE_VER && imd_version != PIE_FLOAT_VER)

Could you please clarify this situation? Should other editors support all directives for both PIE 2 and 3, since this is actual logic in wz since probably 2.x? With floating points being the only difference between them.

Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this issue Apr 25, 2019
Fix documentation of PIE 2 format
* PIE 2 files can include all extensions available in PIE 3 since
  bc80e9b
* coordinate notation is the only difference between the PIE versions

Thanks to inodlite for noticing the mistake.

Refs ticket:4769
Fixes Warzone2100#325
Fixes Warzone2100#334
@Forgon2100

This comment has been minimized.

Copy link
Contributor

commented Apr 25, 2019

According to https://github.com/Warzone2100/warzone2100/blob/master/doc/PIE.md there are multiple PIE 3-only directives.

Yet there are multiple models in master with EVENTS and ANIMOBJECT directives which are still PIE 2.

ImdLoader is simply checking for 2 or 3 in version and not using this info for anything else (maybe passes down for points reading):

warzone2100/lib/ivis_opengl/imdload.cpp

Line 805 in 63498a9
if (imd_version != PIE_VER && imd_version != PIE_FLOAT_VER)

Could you please clarify this situation? Should other editors support all directives for both PIE 2 and 3, since this is actual logic in wz since probably 2.x? With floating points being the only difference between them.

Editors should support the status quo rather than unimplemented specs.

Unlike you, I misunderstood the differences between PIE 2 and PIE 3
after reading http://developer.wz2100.net/wiki/PIE_format?version=33 and
introduced errors into both that wiki article and doc/PIE.md.

Judging from http://developer.wz2100.net/wiki/PIE_format?action=history
PIE 2 does not necessarily exclude later extensions, although they will
obviously not work in older versions of this game.

Since bc80e9b only coordinate notation
is supposed to differ between PIE 2 and PIE 3.

My mistake should be rectified with #334.

@inodlite

This comment has been minimized.

Copy link
Contributor Author

commented Apr 26, 2019

Thank you for looking into this.

Wow, I'm so not sure if that ancient comment is to blame for stale pies :) I think that commit was necessary so that models could be opened with tools that we had at the time, but there were no intent not to keep it in old format per se.

My speculation is that the current intent is to keep int-based PIE due to MP needs, thus PIE2 only models in vanilla wz. If that is really the case, then it would be nice to put a note somewhere and maybe retire PIE3 too. This way mods artwork can be exported into more future proof format.

@Forgon2100

This comment has been minimized.

Copy link
Contributor

commented Apr 26, 2019

[...] I'm so not sure if that ancient comment is to blame for stale pies :) I think that commit was necessary so that models could be opened with tools that we had at the time, but there were no intent not to keep it in old format per se.

Together with c1beb1f, this commit
introduced the distinction between PIE 2 and PIE 3 as it still exists.
Of course, I could be wrong.

My speculation is that the current intent is to keep int-based PIE due to MP needs, thus PIE2 only models in vanilla wz. If that is really the case, then it would be nice to put a note somewhere and maybe retire PIE3 too. This way mods artwork can be exported into more future proof format.

Could you be more specific? I'm not sure I understand what you mean.

In af9c913, Per wrote:

The PIE format is a custom model format created by Pumpkin.

It has gone through two iterations since the original commercial release. PIE2 was
used until version 2.3 and is still supported. PIE3 is the latest version and is
described here.

The big change between PIE2 and PIE3 is that values are floating point in the latter,
whereas values in PIE2 are scaled up 256 times.

This suggests that PIE 3 is supposed to be used for newer models.
Executing head -q -n 1 $(find DIRECTORY -name '*.pie') | tr -d '\r' | sort | uniq -c yielded the following results:

Art Revolution Mod (recent version):

      7 PIE 2
    118 PIE 3

Source code repository, latest revision:

    709 PIE 2
     29 PIE 3

@KJeff01 KJeff01 closed this in 58e78a2 Apr 26, 2019

@inodlite

This comment has been minimized.

Copy link
Contributor Author

commented Apr 27, 2019

I did not realize that there are actual PIE 3 models in master... I happen to open all those animated ones recently and they were all PIE 2.

I think the real question is: why there is still a PIE 2 format? Do you guys know of any good reasons to keep it supported on top of PIE 3 still? I don't have up-to-date insight into that question, unfortunately...

Again, it does not look like there is much extra code, but it is still has to be supported for lifecycle of each release branch. Plus, practical implications are that if there is some technical reason to keep PIE 2 as base format, than that has to be spelled somewhere, so any future developments will accommodate those...

@Forgon2100

This comment has been minimized.

Copy link
Contributor

commented Apr 27, 2019

I did not realize that there are actual PIE 3 models in master... I happen to open all those animated ones recently and they were all PIE 2.

I think the real question is: why there is still a PIE 2 format? Do you guys know of any good reasons to keep it supported on top of PIE 3 still? I don't have up-to-date insight into that question, unfortunately... [...]

Our source code contains PIE 2 models because no one converted them.
Besides, not enforcing PIE 3 usage prevents breaking mods.

@inodlite inodlite changed the title What is point of PIE version? What is the point of PIE version? Apr 27, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.