Monster Tamer - RPG Tutorial with Phaser 3 - Ep. 5 - Loading Game Assets

Поделиться
HTML-код
  • Опубликовано: 13 янв 2025

Комментарии • 12

  • @PepePanRzabka
    @PepePanRzabka 7 дней назад +1

    Huge! Thank you so much for what have you done here!

  • @MeFodil
    @MeFodil 8 месяцев назад +4

    I really enjoy the thing that you not only guide us how to do things, but you also explain best practices of storage and provide extendable information, for example events timings and for which purposes they can be used.

  • @sueprbr
    @sueprbr 15 дней назад +1

    Still watching!

  • @Artem-u5e9c
    @Artem-u5e9c Год назад +3

    Thank you! The Phaser is very interesting engine!

    • @swestover
      @swestover  Год назад +2

      Yeah, the Phaser framework is great to work with. I'm really excited for V4, which is being developed in TypeScript.

  • @pavloburyanov5842
    @pavloburyanov5842 8 месяцев назад +2

    Is it possible to access GameObject created at SceneA from SceneB?
    What good approaches can you suggest in case I need to have one instance of GameObject shared across multiple scenes?
    First what come in mind: add it globaly then use scene.add method

    • @swestover
      @swestover  8 месяцев назад

      By chance, would you be able to give more detail on the game object that you want to share across multiple scenes? A good example I usually have is something like a UI element, but I generally will put these type of objects in 1 scene, and then run both scenes at the same time.
      Generally, I would try to abstract the logic needed for that shared game object into another class, and then have both scenes have a reference to that class. With logic abstracted out, then it would make easy to pass or retrieve the same instance of that data from both scenes when needed.

    • @pavloburyanov5842
      @pavloburyanov5842 8 месяцев назад +1

      @@swestover Thanks for the response. Yes, it may sounds weird having same Sprite instance in the both scenes or having instance out of any scene, but I feel a bit uneasy having this restrictions. Maybe I just need to review my vision on the things again.
      Talking about examples: imagine we have 2 type of GameScene class for different type of levels and we want to transfer Player from one to another. I think it can be done by creating plain Player class with #spriteA and #spriteB properties for each type of scene.
      PS: But all this about managing state. We can just have global state and create new Sprite instance of player any time we want using data from state.
      PSS: Im gonna watch all your series to learn some approaches, so maybe I will find answers in the next videos.

  • @tuxmusicman
    @tuxmusicman Год назад

    I have a question. I am using typescript which has enums. Would it work if I used enums instead of Object.freeze since they are an option in typescript?

    • @swestover
      @swestover  Год назад +1

      Yes, any of the objects we add the @enum JSDoc tag to could be switched over to enums in TypeScript without any issue. In later videos, we use the same pattern for a variety of other enum type objects, and you should be able to use enums there as well.