Jump to content

Yehuda Katz

  • Content Count

  • Joined

  • Last visited

About Yehuda Katz

  • Rank
    Advanced Member

Contact Methods

  • Website URL

Profile Information

  • Gender

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. @damager thanks for sample, I bookmarked topic for future reference. Did I understand your code correctly? You already have one image with six different puzzle pieces. If that's true, why you do not want convert them in sprite in advance? What's the advantage of doing it after loading it as sprite first? As for the font drawing, Phaser has one strange thing... I cannot find that post on forum but the example was following. There were two buttons (sprite and text above it). If you draw first sprite, font and after second sprite and text, you will get slower result than if you draw both spr
  2. @microspace Despite that reset is widely used in tutories, I personally faced many strange behaviours of it. It does almost nothing special https://github.com/photonstorm/phaser/blob/v2.6.2/src/gameobjects/components/Reset.js#L30 and if you need to move sprite back, better do it yourself. As you can see reset itself does something which may not important for your case and you are losing CPU time.
  3. @damager try this short tutorial and trial of app. Anyone who does games soon or later switch to atlases https://www.codeandweb.com/texturepacker/tutorials/creating-spritesheets-for-phaser-with-texturepacker there is also free alternative but with less easy to understand interface: https://renderhjs.net/shoebox/
  4. @dude78 sometimes it looks like this forum is dead What do you mean by changing sprite bounds? You cannot change texture size but you can change size of sprite which uses it. Lets say you have 'character.png' image 100x200 pixels size. Once you load it, it will have 100x200 pixel size texture. You can create sprite using this texture and by default it will be also 100x200 but you can easily change its width/height by my_sprite.width =150 or my_sprite.scale.x = 0.7 to make its width 100*0.7 = 70 pixels. That will change sprite's bounds... also you can directly change x/y propery of sprite to m
  5. @makis actually if you compare svg vs png, I would say svg is much better However, it's all about how you keep your resources. The downside of svg is that it requires CPU to get rendered, that's why it's not activly used. Game developers even trying to reduce transparen pixels in sprite (png image) by using triangular polygons (unfortunately phaserdoes not support them yet). Anyway, Phaser looks way complicated and difficult untill you spend at least half/one year with it. BTW here is the creator of PhaserEditor @PhaserEditor2D. It's kind of GameMaker but simpler and uses Phaser. The adv
  6. Espace, you cannot see the difference if you use a group from CPU point of view. However the difference exist simply because lets say your both sprites are in game.world, if you use wrapper group it means they are inside game.world.warp_group so it means when Phaser will need to calculate where to draw sprites, it should first get local bounds of group and apply them sprite's x/y. Those calculation are so simple that I would prefer use group which makes code simpler and easier to understand. Therefor there is a less chance to make more important, logical mistake in future when games gets bigge
  7. Hello, I have my own scrolling for container, everything worked fine until: I had popup with scrolling over background which could be scrolled as well 😃 The issue is obvious: while I am scrolling popup, the background is also scrolling. Of course I can improve code and check that pointer down was over container but there are over elements which grab mouse down event and prevents it to be passed to the bottom container. Is there any pattern to resolve this issue? Thanks
  8. Oh... in that case you should give a try to GameMaker. Almost everything can be done only visually and they have great video tutorials. I have no idea how good you are with software development but anyway you will enjoy this game on your mobile/table http://lightbot.com/ There is also much more complicated game on Steam... you can write pretty nice games using only your imagination and finger. If you are really interested just let me know and I will search for it.
  9. You are right... actually your mistake was to select Phaser3 while it's under active development. I could assure you that even Phaser2 has lots of bugs but you can deal with most of them (amazon has couple of interesting books). If you want to be a good game developer you need time (at least couple of years). Learn Phaser, GameMaker, Unity, Defold to get the best out of their tools because finally you will end up creating your own engine. Once you spend enough time with Phaser you will understand that it's all about: sprite and group 😃 plus simple physics. However, if you are ne
  10. This is the only 3rd party plugin I am still using but I think having some pure HTML inputbox while game fades out would be much better. Just imagine the situation, the input is at th bottom of the screen... native keyboard will overlay the input so user cannot see what she is typing. If you do not do this and your implemented your game so it scales to mobile screen size, you can guess what user will see
  11. @farhan out of curioucity, when you mentioned about custom state manager, I decided to check how Phaser is doing that and is there a way to tell it to skip some? So basically Phaser with clearWorld parameter enabled is dong two things: resets scale and shutdowns the world... and here is what shutdown of the world means: https://github.com/photonstorm/phaser/blob/v2.6.2/src/core/World.js#L158 // World is a Group, so run a soft destruction on this and all children. Awesome, did you got the point? So basically set resetWorld to false and once new state will be started, in its init/
  12. @Appolos you should have global object which will be accessable from all states. I assume you have global variable game, so you can create another global object like profile = {health:100, coin:0} and store all data there. I personally prefer to store all global objects within game object. So it looks like game.profile = {health:100, coin:0} and I also have game.translate_manager, game.tween_manager and etc. Those objects are kind of libraries, they store data during the game and can be easily accessed because game object isaccessable everywhere probably I should use plugin property instead b
  13. @farhan the issue you face is related to how you switch between states. The first option sets the state you want to start but the rest is used to tell Phaser if all objected created in current state should bedestoyed (default). Since you created group this.add.group() it will be automatically destroyed (to clear memory from junk). The only solution is to tell state manager not yo clear BUT I would not suggest todo that because in that case you will have new state over old one, plus you have to clear memory from unnassasary objects yourself. That's way complicated... so simply recreate the grou
  14. @Appolos There is a little chance to get answer here since the issue is not related to Phaser or even web requests. You should try official support.
  15. @rich is absolutely right and even more @damager, you can speed up texture atlases too https://phaser.io/news/2016/07/multitexturing-support-added I am sure you will enjoy the article, as it will explain how everything works behind the scene.
  • Create New...