Yehuda Katz

  • Content Count

  • Joined

  • Last visited

1 Follower

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 sprites and after both fonts (because drawing font causing draw call, since texture changes). While I was searching for that link, I came across to this old post I hope it will be handy (I will go refresh my knowladge as well :))
  2. @microspace Despite that reset is widely used in tutories, I personally faced many strange behaviours of it. It does almost nothing special 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 there is also free alternative but with less easy to understand interface:
  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 move it around screen and that will also affect bounds. If I understand your question wrongly, just let me know.
  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 advantage of Phaser vs GameMaker is that it uses JS, which has tons of Q/A on stackoverflow. There is also mightyeditor... it looks awesome from demo videos but I personally never used it. I prefer custom/own editors/solutions, simply because I can easily change/upgrade them at any time. However, GameMaker is almost only GUI... that's not acceptable for real game developers but could be a good start for you. I am learning all editors and technologies to get the best out of each but since game development is not your job and just a hobby, start with gui and once it will not be enought, switch to technology which requires more codding
  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, if you use wrapper group it means they are inside 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 bigger 😃
  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 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 new to game development, starting with PIXI is something like starting with Assembler (who remembers it now?) while you are still unfamiliar with C.
  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: // 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/preload even you can clean up (destroy) world (the children of previous state) which you do not need by simply calling, true). I have not tested this solution yet but I will give it a try with one of the next game's update.
  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 but official doc gives little guids regarding game structure.
  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 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 group. Unity for example has option to set one particular object to be preserved, Phaser so far does not have (at least I have not found it yet). As for @dude78 suggestion - that's also very handy, if you need to pass some local parameters for state but user profile or something bigger should be stored as global variable just like you did it.
  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 I am sure you will enjoy the article, as it will explain how everything works behind the scene.