lpbr

Members
  • Content Count

    26
  • Joined

  • Last visited

About lpbr

  • Rank
    Member
  • Birthday 04/19/1966

Profile Information

  • Gender
    Male
  • Location
    Brazil, SP

Recent Profile Visitors

356 profile views
  1. YEAHHHHHHHHHHHHHHHHH! Mickety, thanks again for your generous contribution! It was very easy indeed. I tried to enter my router by I couldn't because the frakking cable guy that came to install and configure my ISP service supposedly changed the password. But then I used the 'ipconfig' Windows at the command prompt and I quickly retrieved my local IP that in this case is 192.168.0.103 (IPv4). Then I did as you said and typed in the very same IP either on my Android mobile and my iPhone and they just found my localhost instantly.
  2. Thank you for answering Mickety! I am a bit confused on how to share my localhost on my wi-fi network. I work in home and here we have a router that broadcast Internet signal around through wi-fi. I use a desktop PC as my development computer and it has a wi-fi adapter hooked on one of the USBs. As you may suppose the localhost is running on THIS computer. How could I broadcast it making it visible to the other equipments? Thanks!
  3. Hello my friends! I am working on a simple game for kids that consists on a screen with objects that will produce sounds when they click or tap it. OK, I already made all needed adjustments to make it work well either on desktop computer browser as well on Android mobiles. For testing it on Android I used the debug mode of Chrome keeping an Android mobile hooked to the computer through an USB cable, then I could run it directly from my localhost (PC with Windows 7) that is very convenient: just change the code, save it and refresh the page. To make it happen I had to activate the 'developer mode' on my Android mobiles. Now it's time to tweak it to make it work on iOS platform also. I have two iOS gadgets (an iPhone 4 and an iPad 2) but I do NOT have a Mac. Now, how could I hook the iOS mobiles to my PC in a similar way I did to Androids in order to make my tests? I am afraid that there is NOT a way of doing this and that I will have to test my code with the exhaustive task of upload files to a live host and then load it back to the iPhone/iPad through Internet — that is very boring and time consuming. Please any input will be very welcome!
  4. Maybe it's a silly question. I am applying alpha to an image and in the line immediately after I alert a message on screen. The problem is that the alpha is being shown up only after the alert popup be closed. There is a method that I can invoke to force screen to update BEFORE the alert? Thanks!
  5. Sure... Perhaps I didn't express myself correctly – I didn't mean that the MOBILE crashes at all. What I meant is that this method of setting a var with the config parameters and then apply it to the Phaser.Game(config); was crashing the Phaser core on my two mobiles. I don't know why it happened but it definitively did... Anyway, it was with the oplayer example. With your example it seems to be working fine though. HOWEVER, to have it fully functional I had to change renderer: Phaser.AUTO to renderer: Phaser.CANVAS otherwise debugger will throw the following error: WebGL: INVALID_VALUE: vertexAttribPointer: index out of range phaser.min.js:3 WebGL: too many errors, no more errors will be reported to the console for this context. Nonetheless the application still works and mobile doesn't complain. I have no idea what it is. Thanks for the help!
  6. Thank you, rich, I will check and see if it does work on my mobiles without to crash them.
  7. Oh, I see... so even the oplayer example is all wrong then. Thank you! PS: I am still learning Phaser and there is not a bunch of specific Ph3 examples online. Since I have used the existing examples, certainly it's all Ph2 stuff!
  8. But I am using the latest Phaser build. Can I be using Phaser 3.x build and yet coding in 2.x? This is really confusing and weird!
  9. This is really a very nice approach but unfortunately if didn't work. I just tried it and: On PC = Works perfectly with no errors. However when I tried it on two of my Android mobiles... On Android Marshmallow = Pops a generic error alert and on Debugger I get "WebGL: INVALID_VALUE: vertexAttribPointer: index out of range" On Lollipop = Just freezes and on Debugger I get a "Uncaught SyntaxError: Unexpected identifier" in the line 2 (width etc). Man, working with mobile device is really a nightmare!
  10. I have this game with a salmon background color. I can set the background to the proper color into the create function with: game.stage.backgroundColor = '#f3cca3'; The problem is that it takes a little while preloading the images and sounds and so it stays black in the meantime. I tried: var game = new Phaser.Game(window.innerWidth, window.innerHeight, Phaser.CANVAS, 'meems_house', { preload: preload, create: create }); game.stage.backgroundColor = '#f3cca3'; But then it says 'Cannot set property 'backgroundColor' of null' indicating that it didn't find 'game' — however it doesn't make any sense because 'game' is NOT null as it was created one line above... PS: The only thing I can imagine is that although object 'game' was declared it was not properly instantiated yet because it's gonna happen into the create function — but this is still weird to me. Anyway I would like to know if there is a way to set the canvas background color before the create function... Thanks!
  11. lpbr

    Cannot STOP sounds...

    I figured the cause of the problem. I used the onStop event to loop the sound so when it stopped (finished to play) it started again. Of course when I was clicking to force stop it fired the event and restarted the sound. I should use onLoop instead.
  12. lpbr

    Cannot STOP sounds...

    I have an array with a list of sounds and then I loop barely like this to add them to the game: for (var i=0;i<=aSounds.length-1;i++) window[aSounds[i].name+'_snd'] = game.add.audio(aSounds[i].name); To play the sound at the desired points of my code I just do: window[me.name+'_snd'].play() // works fine However I am not managing to STOP the sound with: window[me.name+'_snd'].stop(); // instead to stop the sound it just restarts What am I doing wrong? Thanks!
  13. lpbr

    Click area is off of the picture

    Hey samme, good morning! I just made a quick test and it seems to have worked... The click spot area seems to be matching my pictures now. I just hope to not have more weird "surprises" like that. I will make more tests later today as I have a bunch of spot areas like that one. Thanks a lot for now, my friend!
  14. I was posting this thread at the wrong place (it was in Phaser 2). OK, I am having a very bad time with clickable objects. It works perfectly on desktop browser but when I run it on my Android mobile the hot spot is totally off. Please refer to the attached picture to have an idea what I am talking about. The blue square is the clickable object (it's a .png picture). Tapping the object won't fire the input event but if I tap around the position where I draw the marquee it will. In other words, the clickable area is off of the picture. I found this thread where the OP had a similar issue and mentioned that is could be related to the mobile devicePixelRatio when using Phaser.CANVAS but I couldn't establish a coherent relationship between the DPR and the displacement (otherwise it could be "compensated" with code). I really cannot see how to solve this. I am about to give up Phaser and try a different engine. Any idea?
  15. OK, this is weird. I spent a lot of time trying to figure out why my image objects wasn't firing when I tapped on it (it works on desktop). After several tests I noticed that it happened that on mobile screen the clickable area was off of the image (displaced). I found that someone had a similar issue and figured that it had something to do with devicepixelratio when using Phaser.CANVAS. I couldn't test with Phaser.AUTO because my mobile throws a WebGL error when I try to use it. Any idea how to fix this issue? Thanks!