kittykatattack / hexi

Make games the fun way!
MIT License
551 stars 83 forks source link

Update for Pixi 4 Ongoing.... #27

Open kittykatattack opened 7 years ago

kittykatattack commented 7 years ago

Now that it's stable, I'm busy updating Hexi and its support modules for Pixi v.4

UPDATE: Pixi v4 is not yet stable (as of v4.3)!!! So I temporarily suspended this work - see my comments below.

kittykatattack commented 7 years ago

... just an update - I will hopefully be done within the next week.

Sempervirens256 commented 7 years ago

<3!! cant wait

kittykatattack commented 7 years ago

Just for those of you interested, I've added a new pixi4 branch to this repo with a working implementation of Hexi running Pixi v4.3.x. There were a few surprise changes to Pixi's API which took a bit of detective work to figure out, but I think I found them all... ?

The good news is that so far I've only had to make one API change. The text and bitmapText methods now take an additional argument. Instead of a single font argument, they now take separate fontFamily and fontSize arguments. I documented this change in the README of Hexi's dependant SpriiteUtilities module: https://github.com/kittykatattack/spriteUtilities#text

My next step is to test and update all the example and tutorial files, which have 100% API coverage. I'm sure I'll find some surprises, but hopefully I can get through all these within the next week.

kittykatattack commented 7 years ago

Just a quick update: It turns out there are a bunch of tiny undocumented changes to Pixi's API which proving quite tricky to track down. So this is not going to be as easy as I thought... ! .... stay tuned!

kittykatattack commented 7 years ago

Oh, and the bad news: DropShadowFilter doesn't yet exist in Pixi 4x:

https://github.com/pixijs/pixi-filters/pull/9

That's pretty bad! In fact, it's so bad, and there are so many other small bugs in Pixi v4x, that it I can't recommend we use v4 until it dramatically stabilizes. But that's fine - so far I've noticed no speed or feature improvements that make upgrading to v4 worthwhile - the late release v3 that Hexi is currently using on the master branch is pretty great and extremely stable.

So I'll continue working on the pixi4 branch, but I'm going to hold off merging it wth the master branch until I confirm that that it's completely stable.

ghost commented 7 years ago

Oh bummer, thanks for the legwork though. I really appreciate your books and hexi.

Possibly related: RPGMaker MV updated to v4, but I think they maintain their own branch. I can send you over a copy of theirs if you're interested. They've done amazing work on their engine too.

On Jan 28, 2017 4:54 AM, "kittykatattack" notifications@github.com wrote:

Oh, and the bad news: DropShadowFilter doesn't yet exist in Pixi 4x:

pixijs/pixi-filters#9 https://github.com/pixijs/pixi-filters/pull/9

That's pretty bad! In fact, it's so bad, and there are so many other small bugs in Pixi v4x, that it I can't recommend we use v4 until it dramatically stabilizes. But that's fine - so far I've noticed no speed or feature improvements that make upgrading to v4 worthwhile - the late release v3 that Hexi is currently using on the master branch is pretty great and extremely stable.

So I'll continue working on the pixi4 branch, but I'm going to be hold off merging it wth the master branch until I confirm that that it's completely stable.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kittykatattack/hexi/issues/27#issuecomment-275843963, or mute the thread https://github.com/notifications/unsubscribe-auth/AC0QCu_GByGQfWkR6HVwhKTUws3ifuaGks5rWyxegaJpZM4LYnpA .

kittykatattack commented 7 years ago

@dontalton Actually, it's fine 😄 I can think of zero reason to actually use Pixi v4 over v3. Its seems like v4 is just a lot of refactoring (which is really fun for programmers) but no significant features that will actually benefit end users (us!). And, in fact, removing the most-used and most-useful filter, DropShadowFilter, is a really bad sign about the goals and direction of v4. (... I certainly might wrong about that - so if anyone from the Pixi dev team could correct me, please do!!!) And, Mat (the lead dev) is one of the smartest people I know so I'm sure Pixi will find its way in the long term.

But, any late version of Pixi 3 is beautiful and stable, and there's no reason not to keep using it... indefinitely. So, my strategy now is to go back to the master branch of Hexi and stabilize it, and all its dependent modules (Bump, Think, Charm etc.) Once that's done, I'll return to the pixi4 branch and keep working it. I'm sure that Hexi will eventually adopt version 4, but the way things look now it's not going to happen util it matures - maybe by the time it reaches 4.8 or 4.10...?

Cheers, kk.

PS: if anyone wants out of curiosity to help with pixi4 branch, please feel free! I've just been going though all the examples and tutorials, testing them for bugs and tweaking Hexi's source as needed. But, I've definitely needed to route around some v4 bugs - which is why I'm reluctant to put too much time into this as it may be wasted effort in the long term when those bugs are fixed.