Zealot

Members
  • Content Count

    13
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. Like
    Zealot got a reaction from llpujol in Puzzle Astronauts Game - PixiJs   
    That's super cool 😁 Neat little game, well done!
  2. Like
    Zealot reacted to llpujol in Puzzle Astronauts Game - PixiJs   
    I am developing a unique but really simple puzzle game that consist in just put all the players (astronauts) in the goal squares at the same time.

    Rules: All astronauts move at once.

    NOTE: Only puzzle games lovers would enjoy this game, so if you aren't, you can skip seeing it:). Some levels could be really challenging.

    Here it is: https://llpujol.itch.io/puzzle-astronauts

    Comments & improve suggestions are welcomed:),

    Hope someone could enjoy it:)




  3. Like
    Zealot reacted to ivan.popelyshev in pixi-layers: .on(sort) callback and updateOrder   
    layers are scanning whole tree every frame, and re-sort stuff, any other implmeentation could have big number of bugs  Another trick is that in many cases you dont have to use layers sort, they are mostly used to conventionally move elements to other rendering containers.
    Default pixi-v5 sort is better in that way - but its limited only to one container, you cant sort through tree.
    I have custom layers version that actually takes care of all those changes, and even removes pixi canonical updateTransform() pass completely. Its too hard to publish it, people wont understand all those small triggers.
  4. Like
    Zealot got a reaction from charlie_says in pixi-layers : PIXI is not defined   
    @charlie_says thank you for your answer, even though it didn't work in my case, it putted me on the way to what @bubamara said, I had actually found the solution but a bad config in my webpack conf was compiling the code in the wrong location 🤦‍♂️
    So yes: simply providing PIXI through the webpack config is the way, thanks everyone for your help.
  5. Like
    Zealot got a reaction from bubamara in pixi-layers : PIXI is not defined   
    @charlie_says thank you for your answer, even though it didn't work in my case, it putted me on the way to what @bubamara said, I had actually found the solution but a bad config in my webpack conf was compiling the code in the wrong location 🤦‍♂️
    So yes: simply providing PIXI through the webpack config is the way, thanks everyone for your help.
  6. Like
    Zealot reacted to charlie_says in pixi-layers : PIXI is not defined   
    I had a similar issue, I was (and am) using webpack - but I'm not sure I'm working in the same way as you (I'm not using require in my project) I hope this helps:
     
  7. Like
    Zealot reacted to bubamara in pixi-layers : PIXI is not defined   
    Really should be mentioned in Pixi wiki as it's frequent question.. Add this to you webpack config file:
    plugins: [ new webpack.ProvidePlugin({ PIXI: 'pixi.js' }) ] ..and then only import pixi layers, spine, whatever.
  8. Like
    Zealot reacted to ivan.popelyshev in pixi-layers : PIXI is not defined   
    its old way of doing plugins, and we cant really move from it before next big pixi release. The combination of webpack/vanilla  and typescript compatibility is possible only with a few tricks like this one. So far everyone who solved that moved their libs to ES6 modules COMPLETELY. We cant do that without big research on how it affects our old users, we need to make an article on how to use new pixi+vanilla and move all plugins to new modules at the same time. Its hard.
    Yes, I prioritize hardcore vanilla users over newbies with webpack. Not everyone like that in pixijs team, @bigtimebuddy thinks the other way, his pixi-filters are hard to use by vanilla. Hope all that will be sorted out soon
  9. Like
    Zealot got a reaction from bubamara in Can't get grid shader to work (v3 to v5)   
    Thanks a lot, it helped me get a working grid using a TilingSprite. The result is pretty good, and the `cacheAsBitmap` method probably helped the whole thing run even smoother, however I'm not sure the TilingSprite approach has a lot of benefits performance-wise over the looped `Graphics` elements, but I'm not sure of how to compare memory usage for the 2 of them.
    It should be fine for the scope of my project for now, I just wished I had a better understanding of shaders are they look like an excellent solution for this kind of use.
  10. Like
    Zealot reacted to bubamara in Can't get grid shader to work (v3 to v5)   
    You actually need to draw something to canvas plus it's missing new keyword before Sprite. Here's working demo for you: https://pixiplayground.com/#/edit/H7xf1sMhhQpzD2anLy51a
  11. Like
    Zealot reacted to bubamara in Can't get grid shader to work (v3 to v5)   
    You can still render grid tile to canvas, grab the texture from it and update.
  12. Like
    Zealot got a reaction from bubamara in Can't get grid shader to work (v3 to v5)   
    I'm not sure of how to achieve that yet, but I'll look into it. Thanks for your insight!
  13. Like
    Zealot reacted to ivan.popelyshev in Can't get grid shader to work (v3 to v5)   
    There were countless threads like this. I've remade many shaders and i can help you after you make at least two tries
    those are our filters:
    https://github.com/pixijs/pixi.js/wiki/v5-Creating-filters
    https://github.com/pixijs/pixi.js/wiki/v4-Creating-filters
    You need fullscreen mode, compatible with v3, "container.filterArea = renderer.screen". You also need to move uniforms to new format - just values, "type" is not needed.
    In case you don't actually need a filter content , its better to rewrite it to mesh shader: https://pixijs.io/examples/#/mesh-and-shaders/triangle-color.js
    The basic distinction - you need extra framebuffer? you don't know what framebuffer is? Don't use filter, use mesh shader, its simpler.
    Welcome to the forums!
     
  14. Like
    Zealot got a reaction from ivan.popelyshev in Can't get grid shader to work (v3 to v5)   
    I'm looking to generate a basic grid using a shader, and I've came across this Codepen which fits what I'm looking for.
    Only issue is: it's using Pixi v3, I've been looking into the documentation to port this code to work for a v5 filter, with no success so far. I'm still in the process of learning about shaders and filters, and the original code is already 2 versions outdated. Any help would be greatly appreciated.
    Cheers!