<?xml version="1.0"?>
<rss version="2.0"><channel><title>Demos and Projects Latest Topics</title><link>https://www.html5gamedevs.com/forum/34-demos-and-projects/</link><description>Demos and Projects Latest Topics</description><language>en</language><item><title>SvelteKit + Phaser 3 boilerplate</title><link>https://www.html5gamedevs.com/topic/72737-sveltekit-phaser-3-boilerplate/</link><description><![CDATA[<p style="background-color:#ffffff;color:#353c41;font-size:14px;">
	I created a template that sets up a SvelteKit project with Phaser 3 integration. It's minimal and can get people started.
</p>

<p style="background-color:#ffffff;color:#353c41;font-size:14px;">
	Feel free to hit me with suggestions.
</p>

<p style="background-color:#ffffff;color:#353c41;font-size:14px;">
	<a href="https://github.com/Sun0fABeach/sveltekit-phaser" rel="external nofollow">https://github.com/Sun0fABeach/sveltekit-phaser</a>
</p>

<p style="background-color:#ffffff;color:#353c41;font-size:14px;">
	Cheers
</p>
]]></description><guid isPermaLink="false">72737</guid><pubDate>Fri, 30 Jan 2026 13:54:58 +0000</pubDate></item><item><title>Accessing Media Through DOM</title><link>https://www.html5gamedevs.com/topic/46395-accessing-media-through-dom/</link><description><![CDATA[
<p>
	<em>Elements such as images, texts are always accessed within the .js file. Media elements like audio, video can be too, but the code snippet might go complicated. To reduce the complexity of the code, we can declare the media files in the index.html file and access them through DOM (Document Object Model).</em>
</p>

<p>
	<em>In this example, we are going to access an audio file from index.html and play it with a .js file. For this, declare the head and body tag as usual in the index.html</em>
</p>

<pre>
<code>&lt; head &gt;
&lt; title &gt; Example &lt; /title &gt;
&lt; meta charset = "UTF - 8" &gt;
&lt; script src = "example.js" &gt; &lt; /script &gt;
&lt; script src = "phaser.js" &gt; &lt; /script &gt;
&lt;/ head &gt;
&lt; body &gt; 
&lt; /body &gt;</code></pre>

<p>
	 
</p>

<p>
	<em>Include the media file in the body tag</em>
</p>

<pre>
<code>&lt; audio id="id" src="file_name.mp3" &gt;&lt; /audio &gt; //For .mp3, .wav file
&lt; video id = "id" src = "video_name.video_type" &gt;&lt; /video &gt; //For .mp4, .wmv file</code></pre>

<p>
	 
</p>

<p>
	<em>With this, the html part is done. Open the javascript file and create the scene according to your specifications. For this example, we have taken the below config.</em>
</p>

<pre>
<code>var config = {
    type: Phaser.AUTO,
    width: 850,                       //scene width
    height: 650,                      //scene height
    backgroundColor: '#4c0099',       //scene bg color
    parent: 'phaser-example',          //the declaring class has 'phaser-example' as the parent
    scene: {                          
        preload: preload,              //functions declared
        create: create
    }
};
var game = new Phaser.Game(config);</code></pre>

<p>
	 
</p>

<p>
	<em>The above snippet has created the scene. Now, we are going to have a text saying 'Click Here', which upon clicking will play the media file - in this case the audio file</em>
</p>

<pre>
<code>function preload ()                          //defining the preload function
{
}

function create ()                          //defining the create function
{
    var txt; //txt is a variable which is storing a textbox

    txt = this.add.text(400,300,'Click Here');   
    //txt displays 'Click Here' in coordinates (400,300) of the game scene

    txt.setInteractive({useHandCursor : true}); 
    //the cursor turns into a clickable hand cursor when hovering over the 'Click Here' text

    txt.setInteractive().on('pointerdown', function(){            //upon clicking the text, you are declaring and calling a function
        var audi = document.getElementById("aud");                
        //this gets the element from the html file with id = "aud" and stores it in variable 'audi'
        audi.play();  
        //to play the audio file. This can also be used for a video file                                          
    }) }</code></pre>

<p>
	 
</p>

<p>
	<em>The final output will have a purple game scene with 'Click Here' on the center of the scene. 'Click Here' will play the audio file declared in index.html</em>
</p>

<p>
	<em>In case of an image, you can declare the following under create function</em>
</p>

<pre>
<code>   var txt = this.add.text(400,300,'Click Here'); 
        txt.setInteractive({useHandCursor : true});
        txt.setInteractive().on('pointerdown', function(){
            var image = this.add.image(100,100,"filename.png")            //this adds the image at the time of clicking the text
        })</code></pre>

<p>
	 
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="24033" href="https://www.html5gamedevs.com/uploads/monthly_2020_10/ss.png.94cba269ba95adc6d923e990585a016e.png" rel=""><img alt="ss.png" class="ipsImage ipsImage_thumbnailed" data-fileid="24033" data-ratio="76.16" width="843" src="https://www.html5gamedevs.com/uploads/monthly_2020_10/ss.png.94cba269ba95adc6d923e990585a016e.png" /></a>
</p>
]]></description><guid isPermaLink="false">46395</guid><pubDate>Mon, 26 Oct 2020 13:35:28 +0000</pubDate></item><item><title>game developer</title><link>https://www.html5gamedevs.com/topic/56121-game-developer/</link><description><![CDATA[<p>
	Hello 
</p>

<p>
	i need a game developer to fix RTP on pragmatic games 
</p>
]]></description><guid isPermaLink="false">56121</guid><pubDate>Thu, 16 May 2024 20:46:54 +0000</pubDate></item><item><title>Many events emitters</title><link>https://www.html5gamedevs.com/topic/52966-many-events-emitters/</link><description><![CDATA[<p>
	Hi!
</p>

<p>
	i try solid in emitters. How i can listen events across event emitters? Code from bellow in scene, but playerEventSystem isnt on a addPlayer event. code in addPlayer function works if him in MapEventSystem
</p>

<p>
	thx
</p>

<p>
	 <img class="ipsImage ipsImage_thumbnailed" data-fileid="26149" data-ratio="50.41" width="853" alt="image.png.b06227041672628bc561f56255b9b4a2.png" src="https://www.html5gamedevs.com/uploads/monthly_2023_09/image.png.b06227041672628bc561f56255b9b4a2.png" /></p>
]]></description><guid isPermaLink="false">52966</guid><pubDate>Tue, 05 Sep 2023 12:17:50 +0000</pubDate></item><item><title>New to phaser</title><link>https://www.html5gamedevs.com/topic/52521-new-to-phaser/</link><description><![CDATA[<p>
	I'm new to phaser and I'm trying to make a game but I think that I'm doing many things wrong. Can anyone have a look at my code and tell me what to change?<br /><br />
	Code: <a href="https://replit.com/@Joao-PedroPe223/Game" rel="external nofollow">https://replit.com/@Joao-PedroPe223/Game</a>
</p>
]]></description><guid isPermaLink="false">52521</guid><pubDate>Wed, 28 Jun 2023 12:55:25 +0000</pubDate></item><item><title>I coded  &#x1F525;naruto fighting game &#x1F525;with phaser 3 on mobile</title><link>https://www.html5gamedevs.com/topic/52253-i-coded-%F0%9F%94%A5naruto-fighting-game-%F0%9F%94%A5with-phaser-3-on-mobile/</link><description><![CDATA[<p>
	you can see   demo here:
</p>

<p>
	 
</p>

<div class="ipsEmbeddedVideo">
	<div>
		<iframe allowfullscreen="" frameborder="0" height="113" title="Coding 🔥naruto 🔥fighting game with phaser javascript" width="200" data-embed-src="https://www.youtube.com/embed/qbEdALxwYsU?feature=oembed"></iframe>
	</div>
</div>

<p>
	 
</p>

<p>
	This is my source code you can download it then extract:
</p>

<p>
	<span><span></span></span><span>https://www.webintoapp.com/store/80433 </span>
</p>
]]></description><guid isPermaLink="false">52253</guid><pubDate>Wed, 12 Apr 2023 10:53:02 +0000</pubDate></item><item><title>Quasar-Vue3-Phaser3 development setup</title><link>https://www.html5gamedevs.com/topic/52060-quasar-vue3-phaser3-development-setup/</link><description><![CDATA[<p>
	I have published a public repo for building Phaser3 games with Quasar and Vue3. This setup will build a PWA of your game and makes it possible to build and deploy on many platforms. See Quasar documentation for additional build instructions.
</p>

<p>
	 
</p>

<p>
	<a href="https://bitbucket.org/bkirvin/quasar-phaser/src/master/" rel="external nofollow">https://bitbucket.org/bkirvin/quasar-phaser/src/master/</a>
</p>

<p>
	 
</p>

<p>
	This setup builds a simple paddle ball game you can preview here
</p>

<p>
	 
</p>

<p>
	<a href="https://phasar.eepods.com" rel="external nofollow">https://phasar.eepods.com</a>
</p>

<p>
	Enjoy! <span><img alt=":)" data-emoticon="" height="20" src="https://www.html5gamedevs.com/uploads/emoticons/default_smile.png" srcset="https://www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x" title=":)" width="20" /></span>
</p>
]]></description><guid isPermaLink="false">52060</guid><pubDate>Sat, 04 Feb 2023 11:37:13 +0000</pubDate></item><item><title>Phaser 3 Typescript Electron starter template</title><link>https://www.html5gamedevs.com/topic/48930-phaser-3-typescript-electron-starter-template/</link><description><![CDATA[<p>
	Hello everyone.
</p>

<p>
	These days I found myself starting my new project with Phaser and I was looking for a template that included both Typescript and Electron, but around the net there was nothing that fully satisfied me.
</p>

<p>
	So I thought of creating a starter that would allow me to have both the ability to build the project on the web browser and in desktop app format with Electron.
</p>

<p>
	And so, today, I present my starter template: <a href="https://github.com/waliente/phaser-typescript-electron" rel="external nofollow">https://github.com/waliente/phaser-typescript-electron</a>
</p>

<p>
	I hope it will be useful to you too <span><img alt=":)" data-emoticon="" height="20" src="https://www.html5gamedevs.com/uploads/emoticons/default_smile.png" srcset="https://www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x" title=":)" width="20" /></span>
</p>
]]></description><guid isPermaLink="false">48930</guid><pubDate>Thu, 29 Sep 2022 07:30:41 +0000</pubDate></item><item><title>Creating a Reliable Timer in Phaser 3</title><link>https://www.html5gamedevs.com/topic/48919-creating-a-reliable-timer-in-phaser-3/</link><description><![CDATA[<p>
	<a href="https://oiselenjakhian.github.io/mathsmagic/" rel="external nofollow">Maths Magic</a> is the link to my first game. It works well on desktop but the timer misbehaves when it is tested on a mobile device.
</p>

<p>
	The closest I have come to a working timer is this <a href="https://www.html5gamedevs.com/topic/41800-phaser-3-set-timer-event-one-more-time-after-fireing/" rel="">post</a>. I have tried implementing it on my end but sadly, the timer does not seem to work.
</p>

<p>
	I would appreciate any leads on how to do this in an object oriented manner.
</p>

<p>
	Regards,
</p>
]]></description><guid isPermaLink="false">48919</guid><pubDate>Tue, 27 Sep 2022 16:02:11 +0000</pubDate></item><item><title><![CDATA[Phaser 3 & Laravel 9?]]></title><link>https://www.html5gamedevs.com/topic/48880-phaser-3-laravel-9/</link><description><![CDATA[
<p>
	Hello, I developed my first game in Phaser 3 and it's a simple one. Everything works great in all web browsers and web servers when I run my game from a simple index.php, but I run into trouble when I try to implement my game in Laravel to consume a simple API in all web browsers but Firefox. Although I've read a lot of documentation in search of a precise answer, every response refers to server headers.
</p>

<p>
	I experiment with modifying the CORS Policy using Laravel's middleware. Additionally updating the headers file in Nginx and Apache.
</p>
]]></description><guid isPermaLink="false">48880</guid><pubDate>Thu, 01 Sep 2022 08:47:11 +0000</pubDate></item><item><title>[Phaser] My Sweet Lolita Dress - Dressup Game by Playcutegames.com</title><link>https://www.html5gamedevs.com/topic/48629-phaser-my-sweet-lolita-dress-dressup-game-by-playcutegamescom/</link><description><![CDATA[
<p>
	<span style="background-color:#ffffff;color:#0d0d0d;font-size:15px;">Play It Now: </span><span style="background-color:#ffffff;color:#0d0d0d;font-size:15px;"><a href="https://playcutegames.com/game/my-sweet-lolita-dress" rel="external nofollow">https://playcutegames.com/game/my-sweet-lolita-dress</a></span><span style="background-color:#ffffff;color:#0d0d0d;font-size:15px;"> </span>
</p>

<p>
	<span style="background-color:#ffffff;color:#0d0d0d;font-size:15px;">Welcome to My Sweet Lolita Dress. LOL Surprise girls plan to try their sweet lolita fashion. Lolita fashion is a cute stylish way to dress up in puffy skirts, lacy blouses, and accessories, perfect to create your own colorful trendy fashion. Mix classical, sweet, and gothic lolita styles for a unique spin on the Japanese trend. Browse and find cute outfits for our girls. Join as a fashion expert and show your skill.</span>
</p>

<p><a href="https://www.html5gamedevs.com/uploads/monthly_2022_08/1280x720.jpg.24a5a4e056f2f3a975c3cdf373906876.jpg" class="ipsAttachLink ipsAttachLink_image"><img data-fileid="25577" src="https://www.html5gamedevs.com/uploads/monthly_2022_08/1280x720.thumb.jpg.38fe30f5699496a976c2110b6ed64737.jpg" data-ratio="56.3" width="1000" class="ipsImage ipsImage_thumbnailed" alt="1280x720.jpg"></a></p>]]></description><guid isPermaLink="false">48629</guid><pubDate>Sat, 06 Aug 2022 05:42:23 +0000</pubDate></item><item><title>[Phaser 3] Ellie And Ben Insta Fashion - Dressup Game by Cutedressup.com</title><link>https://www.html5gamedevs.com/topic/48624-phaser-3-ellie-and-ben-insta-fashion-dressup-game-by-cutedressupcom/</link><description><![CDATA[
<p>
	<span style="background-color:#ffffff;color:#0d0d0d;font-size:15px;">Play It Now: </span><span style="background-color:#ffffff;color:#0d0d0d;font-size:15px;"><a href="https://cutedressup.com/game/ellie-and-ben-insta-fashion/" rel="external nofollow">https://cutedressup.com/game/ellie-and-ben-insta-fashion/</a></span><span style="background-color:#ffffff;color:#0d0d0d;font-size:15px;"> </span>
</p>

<p>
	<span style="background-color:#ffffff;color:#0d0d0d;font-size:15px;">Welcome to Ellie And Ben Insta Fashion. Help Ellie and her boyfriend Ben to choose an outstanding outfit to show their fashion skill on Instagram. Browse their wardrobe and pick costumes based on their moods. You can make their looks better with the help of other accessories. Join and play with your favorite couples. Have fun!</span>
</p>

<p><a href="https://www.html5gamedevs.com/uploads/monthly_2022_08/1280x720.jpg.125a9ca6ba05af74227115bfe012cf51.jpg" class="ipsAttachLink ipsAttachLink_image"><img data-fileid="25574" src="https://www.html5gamedevs.com/uploads/monthly_2022_08/1280x720.thumb.jpg.f922d69c74090aad1fc46a44df998517.jpg" data-ratio="56.3" width="1000" class="ipsImage ipsImage_thumbnailed" alt="1280x720.jpg"></a></p>]]></description><guid isPermaLink="false">48624</guid><pubDate>Tue, 02 Aug 2022 14:03:11 +0000</pubDate></item><item><title>How does velocity work? (Phaser 3)</title><link>https://www.html5gamedevs.com/topic/48607-how-does-velocity-work-phaser-3/</link><description><![CDATA[
<p>
	I'm working on programming a rhythm game in Phaser, and I want to build an equation so that when I spawn the things, I'm generating them so that they reach the judgement line at a particular time. But to do this, I need to understand how velocity works.
</p>

<p>
	What is velocity in phaser if it isn't how far the sprite moves in a single frame like it is in most engines I've worked with?
</p>
]]></description><guid isPermaLink="false">48607</guid><pubDate>Thu, 21 Jul 2022 03:59:54 +0000</pubDate></item><item><title>Can you monetize browser game websites that have other embedded games on them.</title><link>https://www.html5gamedevs.com/topic/48562-can-you-monetize-browser-game-websites-that-have-other-embedded-games-on-them/</link><description><![CDATA[
<p>
	<span>Can you monetize browser game websites that have other embedded games on them with a few of your own games with Google adsense. </span>
</p>

<p>
	<span>Let's say for example I have a game website with some embedded games from Miniclip.com or some other website along with a few we games of my own. Am I allowed to monetize this website with Google adsense?</span>
</p>

<p>
	<span>thanks in advance.</span>
</p>
]]></description><guid isPermaLink="false">48562</guid><pubDate>Sat, 25 Jun 2022 09:52:35 +0000</pubDate></item><item><title>I want to load the spritesheet using  image's (URI,URL?)</title><link>https://www.html5gamedevs.com/topic/48262-i-want-to-load-the-spritesheet-using-images-uriurl/</link><description><![CDATA[
<p>
	i want to make it in a new way rather than the defualt way of load spriteSheet. 
</p>

<p>
	I want to load an image using ( uri,url ). Is this possible?
</p>

<div style="background-color:#282c34;color:#abb2bf;font-size:14px;">
	<div>
		<span style="color:#e06c75;">this</span><span style="color:#abb2bf;">.</span><span style="color:#e06c75;">load</span><span style="color:#abb2bf;">.</span><span style="color:#61afef;">spritesheet</span><span style="color:#abb2bf;">(</span><span style="color:#98c379;">'item'</span><span style="color:#abb2bf;">, </span><span style="color:#98c379;">'essets/items/item.png'</span><span style="color:#abb2bf;">, {</span>
	</div>

	<div>
		<span style="color:#abb2bf;">      </span><span style="color:#e06c75;">frameWidth</span><span style="color:#56b6c2;">:</span><span style="color:#abb2bf;"> </span><span style="color:#d19a66;">32</span><span style="color:#abb2bf;">,</span>
	</div>

	<div>
		<span style="color:#abb2bf;">      </span><span style="color:#e06c75;">frameHeight</span><span style="color:#56b6c2;">:</span><span style="color:#abb2bf;"> </span><span style="color:#d19a66;">64</span><span style="color:#abb2bf;">,</span>
	</div>

	<div>
		<span style="color:#abb2bf;">   })</span>
	</div>

	<div>
		=&gt; 
	</div>

	<div>
		this.load.spritesheet('item','<a href="https://image.shutterstock.com/image-illustration/img-file-document-icon-trendy-260nw-1407027353.jpg" rel="external nofollow">https:///image.shutterstock.com/image-illustra23tion/img-file-document-icon-trendy-260nw-1407027353.jpg</a>',{
	</div>

	<div>
		<div>
			<span style="color:#e06c75;">frameWidth</span><span style="color:#56b6c2;">:</span><span style="color:#abb2bf;"> </span><span style="color:#d19a66;">32</span><span style="color:#abb2bf;">,</span>
		</div>

		<div>
			<span style="color:#e06c75;">frameHeight</span><span style="color:#56b6c2;">:</span><span style="color:#abb2bf;"> </span><span style="color:#d19a66;">64</span><span style="color:#abb2bf;">,</span>
		</div>

		<div>
			<span style="color:#abb2bf;">   })</span>
		</div>
	</div>

	<div>
		 
	</div>
</div>
]]></description><guid isPermaLink="false">48262</guid><pubDate>Sat, 26 Mar 2022 14:50:15 +0000</pubDate></item><item><title>Phaser 3 MatterJS - Prevent pushing other object</title><link>https://www.html5gamedevs.com/topic/48064-phaser-3-matterjs-prevent-pushing-other-object/</link><description><![CDATA[
<p>
	<span style="background-color:#ffffff;color:#353c41;font-size:14px;">In my case both objects are able to move.  I wish to disable "pushing". So both objects can move, collide, but can't push/affect each other</span>
</p>
]]></description><guid isPermaLink="false">48064</guid><pubDate>Wed, 26 Jan 2022 11:28:10 +0000</pubDate></item><item><title>New Line Not Working With WordWrap</title><link>https://www.html5gamedevs.com/topic/47984-new-line-not-working-with-wordwrap/</link><description><![CDATA[
<p>
	I am trying to make a quest log for my game. I have a javascript object called activeQuests with keys being quest names and values being quest descriptions. For example, we might use
</p>

<p>
	activeQuests={
</p>

<p>
	"quest1": "this is what you do in the first quest",
</p>

<p>
	"quest2": "this is what you do in the second quest"
</p>

<p>
	}
</p>

<p>
	In my menu scene, I use the following code:
</p>

<p>
	gameState10.activeQuestDisplay = this.add.text(175, 140, '', {<br />
	      fontSize: '25px',<br />
	      fill: '#fff',<br />
	      wordWrap: {<br />
	        width: 850,<br />
	        useAdvancedWrap: true<br />
	      }<br />
	    }).setOrigin(0, 0);<br />
	    let textFiller='';<br />
	    for (questTitle of Object.keys(activeQuests)) {<br />
	      textFiller += `${questTitle}: ${activeQuests[questTitle]}\n\n`<br />
	    };<br />
	    gameState10.activeQuestDisplay.setText(`${textFiller}`);
</p>

<p>
	 
</p>

<p>
	However, the two new lines (which should be present from \n\n) do not appear. Is this an issue with wordWrap? I've looked for quite awhile and can not seem to find a solution.
</p>
]]></description><guid isPermaLink="false">47984</guid><pubDate>Mon, 27 Dec 2021 05:03:49 +0000</pubDate></item><item><title>How to queue(tail) behind player after passing?</title><link>https://www.html5gamedevs.com/topic/47753-how-to-queuetail-behind-player-after-passing/</link><description><![CDATA[
<p>
	Hi everyone, I'm trying to make a paper.io, paint.io style game using with Phaser 3, but how can I produce queue(tail) behind player after passing? I use emitter but it is not working. Do you have any suggestions for which methods I can use ? 
</p>

<p>
	 
</p>
]]></description><guid isPermaLink="false">47753</guid><pubDate>Fri, 17 Sep 2021 12:08:04 +0000</pubDate></item><item><title>DOM Element Issue - DIv container positioned offscreen - Chromium Browers - Phaser 3 - 3.55</title><link>https://www.html5gamedevs.com/topic/47670-dom-element-issue-div-container-positioned-offscreen-chromium-browers-phaser-3-355/</link><description><![CDATA[
<p>
	Good Day
</p>

<p>
	I configured my game for DOM Elements, and the div container that's getting placed is under my canvas, instead of on top of the canvas, only on Chromium based browsers, on Firefox the div is set on top correctly.<br /><br />
	Example: (Chromium):<br /><a class="ipsAttachLink ipsAttachLink_image" href="https://www.html5gamedevs.com/uploads/monthly_2021_08/image.png.03c3aaa36622ddb30a89b11f289693d3.png" data-fileid="24935" data-fileext="png" rel=""><img class="ipsImage ipsImage_thumbnailed" data-fileid="24935" data-ratio="69.10" width="1000" alt="image.thumb.png.483419df3acdc6d1bf57d43c8645c72b.png" src="https://www.html5gamedevs.com/uploads/monthly_2021_08/image.thumb.png.483419df3acdc6d1bf57d43c8645c72b.png" /></a>
</p>

<p>
	 
</p>

<p>
	Firefox:<br /><br /><img class="ipsImage ipsImage_thumbnailed" data-fileid="24936" data-ratio="90.58" width="775" alt="image.png.a073dd5c04ec9a862c2e577d36a97062.png" src="https://www.html5gamedevs.com/uploads/monthly_2021_08/image.png.a073dd5c04ec9a862c2e577d36a97062.png" /></p>

<p>
	 
</p>

<p>
	I found on Chromium - Linux, I can target the overlap with the following selector, but is there a better way to go about this?
</p>

<pre style="background-color:#2b2b2b;color:#a9b7c6;font-family:'JetBrains Mono', monospace;font-size:10.8pt;">
<span style="color:#e8bf6a;">body </span>&gt; <span style="color:#e8bf6a;">div</span>:<span style="color:#e8bf6a;">nth-child</span>(<span style="color:#6897bb;">12</span>) {
  <span style="color:#bababa;">position</span>: <span style="color:#a5c261;">absolute</span><span style="color:#cc7832;">;
</span><span style="color:#cc7832;">  </span><span style="color:#bababa;">top</span>: <span style="color:#6897bb;">0</span><span style="color:#cc7832;">;
</span><span style="color:#cc7832;">  </span><span style="color:#bababa;">left</span>: <span style="color:#6897bb;">0</span><span style="color:#cc7832;">;
</span>}</pre>

<p>
	This is my game config:
</p>

<pre style="background-color:#2b2b2b;color:#a9b7c6;font-family:'JetBrains Mono', monospace;font-size:10.8pt;">
<span style="color:#cc7832;">this</span>.<span style="color:#9876aa;">config </span>= {
  <span style="color:#9876aa;">type</span>: Phaser.<span style="color:#9876aa;font-weight:bold;font-style:italic;">AUTO</span><span style="color:#cc7832;">,
</span><span style="color:#cc7832;">  </span><span style="color:#9876aa;">dom</span>: {
    <span style="color:#9876aa;">createContainer</span>: <span style="color:#cc7832;">true,
</span><span style="color:#cc7832;">    </span><span style="color:#9876aa;">behindCanvas</span>: <span style="color:#cc7832;">true
</span><span style="color:#cc7832;">  </span>}<span style="color:#cc7832;">,
</span><span style="color:#cc7832;">  </span><span style="color:#9876aa;">scale</span>: {
    <span style="color:#9876aa;">mode</span>: Phaser.Scale.<span style="color:#9876aa;font-weight:bold;font-style:italic;">FIT</span><span style="color:#cc7832;">,
</span><span style="color:#cc7832;">  </span>}<span style="color:#cc7832;">,
</span><span style="color:#cc7832;">  </span><span style="color:#9876aa;">height</span>: <span style="color:#6897bb;">940</span><span style="color:#cc7832;">,
</span><span style="color:#cc7832;">  </span><span style="color:#9876aa;">width</span>: <span style="color:#6897bb;">1840</span><span style="color:#cc7832;">,
</span><span style="color:#cc7832;">  </span><span style="color:#9876aa;">scene</span>: [ StartScene<span style="color:#cc7832;">,
</span><span style="color:#cc7832;">           </span>IdentificationScene<span style="color:#cc7832;">,
</span><span style="color:#cc7832;">           </span>MainScene<span style="color:#cc7832;">,
</span><span style="color:#cc7832;">           </span>FinalScene ]<span style="color:#cc7832;">,
</span><span style="color:#cc7832;">  </span><span style="color:#9876aa;">parent</span>: <span style="color:#6a8759;">"gameContainer"</span><span style="color:#cc7832;">,
</span>}<span style="color:#cc7832;">;</span></pre>

<p>
	Has anyone seen this behavior before?  I'm using Angular 12 with the framework. Is there a better selector that won't require a child selector?<br /><br />
	Thanks
</p>
]]></description><guid isPermaLink="false">47670</guid><pubDate>Sun, 22 Aug 2021 15:56:08 +0000</pubDate></item><item><title>Multiplayer game example using Phaser 3</title><link>https://www.html5gamedevs.com/topic/47660-multiplayer-game-example-using-phaser-3/</link><description><![CDATA[<p>
	Hi,<br />
	I've made an example for multiplayer game using Phaser 3.<br />
	If you are interested you can check:<br /><a href="https://github.com/rivalis/rivalis-demo" rel="external nofollow">https://github.com/rivalis/rivalis-demo</a>
</p>]]></description><guid isPermaLink="false">47660</guid><pubDate>Thu, 19 Aug 2021 16:52:59 +0000</pubDate></item><item><title>rexUI</title><link>https://www.html5gamedevs.com/topic/40781-rexui/</link><description><![CDATA[
<p>
	<strong><a href="https://github.com/rexrainbow/phaser3-rex-notes/blob/master/plugins/dist/rexuiplugin.min.js" rel="external nofollow">Package</a></strong><span> </span>
</p>

<p>
	 
</p>

<p>
	<strong>Sizer</strong>
</p>

<p>
	Layout children game objects.
</p>

<p>
	Links
</p>

<ul>
	<li>
		<a href="https://rexrainbow.github.io/phaser3-rex-notes/docs/site/sizer/" rel="external nofollow">Document</a>
	</li>
	<li>
		<a href="https://github.com/rexrainbow/phaser3-rex-notes/tree/master/examples/ui-sizer" rel="external nofollow">Sample code</a><span> </span>
	</li>
</ul>

<p>
	Live demo
</p>

<ul>
	<li>
		<a href="https://codepen.io/rexrainbow/pen/NOzorp" rel="external nofollow">Nested sizer</a> : Create a list by two level sizers.
	</li>
</ul>

<p>
	 
</p>

<p>
	<strong>Label</strong>
</p>

<p>
	A container with a icon, text, and background.
</p>

<p>
	Links
</p>

<ul>
	<li>
		<a href="https://rexrainbow.github.io/phaser3-rex-notes/docs/site/ui-label/" rel="external nofollow">Document</a>
	</li>
	<li>
		<a href="https://github.com/rexrainbow/phaser3-rex-notes/tree/master/examples/ui-label" rel="external nofollow">Sample code</a><span> </span>
	</li>
</ul>

<p>
	 
</p>

<p>
	<strong>Textbox</strong>
</p>

<p>
	A container with a icon, (typing and paging) text, and background.
</p>

<p>
	Links
</p>

<ul>
	<li>
		<a href="https://rexrainbow.github.io/phaser3-rex-notes/docs/site/ui-textbox/" rel="external nofollow">Document</a>
	</li>
	<li>
		<a href="https://github.com/rexrainbow/phaser3-rex-notes/tree/master/examples/ui-textbox" rel="external nofollow">Sample code</a><span> </span>
	</li>
</ul>

<p>
	Live demo
</p>

<ul>
	<li>
		<a href="https://codepen.io/rexrainbow/pen/MzGoJv" rel="external nofollow">Textbox</a>
	</li>
</ul>

<p>
	 
</p>

<p>
	<strong>Dialog</strong>
</p>

<p>
	A container with a title, content, buttons and background.
</p>

<p>
	Links
</p>

<ul>
	<li>
		<a href="https://rexrainbow.github.io/phaser3-rex-notes/docs/site/ui-dialog/" rel="external nofollow">Document</a>
	</li>
	<li>
		<a href="https://github.com/rexrainbow/phaser3-rex-notes/tree/master/examples/ui-dialog" rel="external nofollow">Sample code</a>
	</li>
</ul>

<p>
	Live demo
</p>

<ul>
	<li>
		<a href="https://codepen.io/rexrainbow/pen/MPZWZG" rel="external nofollow">Yes/No dialog</a>
	</li>
	<li>
		<a href="https://codepen.io/rexrainbow/pen/ePoRVz" rel="external nofollow">Single choice dialog</a>
	</li>
	<li>
		<a href="https://codepen.io/rexrainbow/pen/NEpjmP?editors=0010" rel="external nofollow">Pop-up dialog</a>
	</li>
</ul>

<p>
	 
</p>

<p>
	<strong>Grid table</strong>
</p>

<p>
	A container with a <a href="https://rexrainbow.github.io/phaser3-rex-notes/docs/site/gridtable/" rel="external nofollow">grid table</a>, slider, and scroller.
</p>

<p>
	Links
</p>

<ul>
	<li>
		<a href="https://rexrainbow.github.io/phaser3-rex-notes/docs/site/ui-gridtable/" rel="external nofollow">Document</a>
	</li>
	<li>
		<a href="https://github.com/rexrainbow/phaser3-rex-notes/tree/master/examples/ui-gridtable" rel="external nofollow">Sample code</a>
	</li>
</ul>

<p>
	Live demo
</p>

<ul>
	<li>
		<a href="https://codepen.io/rexrainbow/pen/XyJbWX" rel="external nofollow">Grid table</a>
	</li>
</ul>

<p>
	 
</p>

<p>
	<strong>Tabs</strong>
</p>

<p>
	A container with 4 groups of buttons around a center panel.
</p>

<p>
	Links
</p>

<ul>
	<li>
		<a href="https://rexrainbow.github.io/phaser3-rex-notes/docs/site/ui-tabs/" rel="external nofollow">Document</a>
	</li>
	<li>
		<a href="https://github.com/rexrainbow/phaser3-rex-notes/tree/master/examples/ui-tabs" rel="external nofollow">Sample code</a>
	</li>
</ul>

<p>
	Live demo
</p>

<ul>
	<li>
		<a href="https://codepen.io/rexrainbow/pen/BGKvXK" rel="external nofollow">Tabs-table</a>
	</li>
</ul>
]]></description><guid isPermaLink="false">40781</guid><pubDate>Sun, 21 Oct 2018 16:40:52 +0000</pubDate></item><item><title>Text on top of matter.js body</title><link>https://www.html5gamedevs.com/topic/47644-text-on-top-of-matterjs-body/</link><description><![CDATA[
<p>
	I've been looking through the examples, but there's nothing that does what I'm looking for.
</p>

<p>
	I have circular matter bodies with the texture of a ball. How do I put text on top of these balls while keeping the body round?
</p>

<p>
	I've looked into containers, but it only seems possible to have them in rectangular shape.
</p>

<p>
	I'm thinking whether generating my own sprites with the text already embedded there would be the best option. It's not that straightforward as the text/numbers/symbols I'll be presenting there will be fed by an API, so I can't generate the sprites beforehand.
</p>
]]></description><guid isPermaLink="false">47644</guid><pubDate>Sat, 14 Aug 2021 10:35:01 +0000</pubDate></item><item><title>Phaser 3. Importing phaser/src/core/Game produce error during runtime</title><link>https://www.html5gamedevs.com/topic/47625-phaser-3-importing-phasersrccoregame-produce-error-during-runtime/</link><description><![CDATA[
<p>
	The phaser game not starting error on <br /><br /><img alt="2pN7B.png.4eeb4a825294f4e49e8dc237bb1b3ca0.png" class="ipsImage ipsImage_thumbnailed" data-fileid="24889" data-ratio="53.19" width="502" src="https://www.html5gamedevs.com/uploads/monthly_2021_08/2pN7B.png.4eeb4a825294f4e49e8dc237bb1b3ca0.png" /></p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">import Game1 from "phaser/src/core/Game";
import { Game } from "phaser";
console.log(Game1, Game);
const app = new Game1(gameSettings);</span></pre>

<p>
	But when I tried to check the output of the console, it gives the same instance<br /><img alt="DRcfl.png.9ea6e9ad1808d6e1f6ea1523f1914bb5.png" class="ipsImage ipsImage_thumbnailed" data-fileid="24890" data-ratio="27.16" width="707" src="https://www.html5gamedevs.com/uploads/monthly_2021_08/DRcfl.png.9ea6e9ad1808d6e1f6ea1523f1914bb5.png" /></p>

<p>
	<span style="background-color:#ffffff;color:#242729;font-size:15px;text-align:left;">but when I tried to make use the one from the phaser js directly, no error found</span><br />
	 
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">import { Game } from "phaser";
const app = new Game(gameSettings);</span></pre>

<p>
	<span style="background-color:#ffffff;color:#242729;font-size:15px;text-align:left;">Thanks in advance for answers which part I do wrong.</span>
</p>
]]></description><guid isPermaLink="false">47625</guid><pubDate>Wed, 11 Aug 2021 10:35:30 +0000</pubDate></item><item><title>GAME_OVER event fires but GAME_OBJECT_OVER does not</title><link>https://www.html5gamedevs.com/topic/47567-game_over-event-fires-but-game_object_over-does-not/</link><description><![CDATA[
<p>
	I have a game with bubbles made using Matter as the physics engine illustrated by the image below.
</p>

<p>
	When the mouse is over a bubble I'm adding a tween to highlight it (and then another tween when the pointer goes out to remove that highlight). I'm using the events <strong>GAMEOBJECT_OVER</strong> and <strong>GAMEOBJECT_OUT</strong> to add those tweens.
</p>

<p>
	Everything works fine except one thing: when, for instance, I have the pointer over bubble 1 in the image below and then move the pointer down directly to the windows bar, and then move back the pointer again to bubble 1, the <strong>GAMEOBJECT_OVER</strong> event is not fired. On the other hand, if I move the pointer down from bubble 1 to the windows bar, and then to the left always through the bar, and then back up to bubble 2, the <strong>GAMEOBJECT_OVER</strong> event is fired for bubble 2. I've also checked and the <strong>GAME_OUT</strong> and <strong>GAME_OVER</strong> events are correctly fired when the pointer leaves and enters the game canvas, respectively.
</p>

<p>
	<u>Note</u>: the game canvas extends below the screen, so there's an overflow that's not visible. This is by design and I'm not sure if that's what's causing this.
</p>

<p>
	Is this a bug?
</p>

<p>
	Full list of events here for reference <a href="https://newdocs.phaser.io/docs/3.54.0/Phaser.Input.Events" rel="external nofollow">https://newdocs.phaser.io/docs/3.54.0/Phaser.Input.Events</a>
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" data-fileext="PNG" data-fileid="24851" href="https://www.html5gamedevs.com/uploads/monthly_2021_07/Capturar.PNG.63867bff9bb513d510abd7d60f226747.PNG" rel=""><img alt="Capturar.PNG" class="ipsImage ipsImage_thumbnailed" data-fileid="24851" data-ratio="54.1" width="1000" src="https://www.html5gamedevs.com/uploads/monthly_2021_07/Capturar.thumb.PNG.33220aa3e25423073a473b4f9f7fb115.PNG" /></a>
</p>
]]></description><guid isPermaLink="false">47567</guid><pubDate>Wed, 28 Jul 2021 16:50:40 +0000</pubDate></item><item><title>Interacting with Phaser from React</title><link>https://www.html5gamedevs.com/topic/47502-interacting-with-phaser-from-react/</link><description><![CDATA[
<p>
	I've been able to successfully initialize a game in my React project using:
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
<span class="pln">    const game = new Phaser.Game({
      type: Phaser.WEBGL,
      //backgroundColor: 0x000000,
      pixelArt: false,
      transparent: true,
      scale: {
          mode: Phaser.Scale.FIT,
          parent: 'engine',
          autoCenter: Phaser.Scale.CENTER_BOTH,
          width: 1200,
          height: 800
      },
      physics: {
          default: 'matter',
          matter: {
              gravity: {
                  y: -1
              },
              debug: true
          }
      },
      scene: {
        preload: this.preload,
        create: this.create,
        update: this.update
      }
    });</span></pre>

<p>
	But I'm having trouble interacting with it from React app. I initialize a websocket connection in useEffect() and want to add a body to my game every time that websocket connection receives data. I've looked into EventEmitter, but the documentation/examples on EventEmitters don't illustrate any case where the events are being sent from 'outside' Phaser.
</p>

<p>
	From what I understand, there is a "master" EventEmitter which I get from the game object and another EventEmitter connected to the scene. What's the appropriate way to access the EventEmitter connected to my scene using the game object I receive from `new Phaser.Game()`?
</p>
]]></description><guid isPermaLink="false">47502</guid><pubDate>Thu, 08 Jul 2021 13:43:08 +0000</pubDate></item></channel></rss>
