Html5Overview

Members
  • Content Count

    12
  • Joined

  • Last visited

  1. I have a problem adding sprite to my background while the first initial scene is loading. Could someone please check the video out and if you know how to load sprite before preloading screen. By reading documents, my asset needs to be before 'start' scene event, since that's when my loading screen starts to load assets. Now, is there an event before start and can I load my asset in my game config? https://streamable.com/bc3ej
  2. How to open mobile keyboard during a game?
  3. I'm sorry, maybe I haven't explained it right. I want every click to sound different. So basically, sounds to change dynamically. I have tried before what you're saying and phaser did not switch sounds. It just create(){}'s random sound each time you reload game, but does not change sound dynamically. I will change sound in update() function just as I did background music. if(!this.music.isPlaying) { this.music = this.sound.add(SoundController.playSong(['song_1', 'song_2', 'song_3', 'song_4', 'song_5'])); this.music.play(); }
  4. Hi, id like to use different sword sounds on each click. I have 3 samples of a sword being drawn. What kind of road should I take to try and change this sound dynamically? Should I implement new sound on this Sound object each time I give it a click? https://streamable.com/5yktz
  5. Is it possible to open phone keyboard once sprite has been clicked with 'pointerdown' event. Or any other way as a matter affect ?
  6. My 3rd day I'm trying to find the solution.
  7. I'd like to add more songs to my background so they play one after the other, however, I'm not sure if Phaser 3 already has inbuilt possibility to add tracks to playlist. I'd like to skip creating my own framework for this. Tnx a bunch
  8. Screenshot: Actually, it looks better in screenshot then on the phone screen. It looks worse on phone. Scene code: https://paste.ofcode.org/A2mUaWF3N3bCcGSfFaS8yM Config code: https://paste.ofcode.org/fhur8xMjs8QVf4M4TEfWJg
  9. Here is a code: https://gist.github.com/GroundZeroCro/093408747c2a62303bcc03ab15d016af Do you notice anything that could scale picture into that terrible resolution? Current sword and shield pictures are cca 200*200 px large.
  10. Hi there, I'm making a project and I have a few things that bother me for the last few days. a.) How do I add background to this project. Is there a way to add a background over css? If there already is a solution to do it over phaser 3 library, how to I add mobile phone background to fit on every screen? b.) I want to center a text to an exact middle of a screen. Is there a function to do so or I'll need to add text to screen_width.middle then add padding to a text to center it? c.) Why are my sprite images (Sword and shield) distorted is Chrome? If firefox they look fine, however, if they are sized down too much in Chrome they are distorted. Here is vide preview(forgive me for double screen preview): https://streamable.com/feba3
  11. I'm sorry, I have found a solution. this.input.keyboard.on('keydown', function(input) { inputText.setText(input.key); }, this)
  12. Hi everyone, I'm creating a game in Phaser 3. I'd like to ask you how do I read a single character key from a keyboard event I've pressed. this.input.keyboard.on('keydown', function(input) { inputText.setText(input.keypress); }, this)