<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How can I make collision?]]></title><description><![CDATA[<p dir="auto">How can I make collision with a sprite and on screen "border"?</p>
]]></description><link>http://fuzearena.com/forum//topic/2134/how-can-i-make-collision</link><generator>RSS for Node</generator><lastBuildDate>Sun, 15 Nov 2026 05:39:04 GMT</lastBuildDate><atom:link href="http://fuzearena.com/forum//topic/2134.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 24 May 2023 00:58:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How can I make collision? on Thu, 25 May 2023 07:15:37 GMT]]></title><description><![CDATA[<p dir="auto">Normally what I do is a bunch of ‘if player x position &lt; 0 then player xspeed = - player xspeed<br />
If player x &gt; screenwidth then player xspeed = - player xspeed<br />
If player y position &lt; 0 then player y speed = - player y speed<br />
If player y position &gt; screen height then player y speed = - player y speed.’</p>
<p dir="auto">This has the effect of bouncing you off walls. To stop dead, you’d put speed = 0, and laso probably shift the players position a bit to put them back jnside the screen if they go over by a few pixels.</p>
<p dir="auto">There’s a clever example in the tutorials using clamp() which looks neater. It’s at <a href="https://fuzearena.com/help/view/Sprite%20Game" target="_blank" rel="noopener noreferrer">https://fuzearena.com/help/view/Sprite Game</a> - scroll down to the part ‘creating boundaries’</p>
<p dir="auto">You can also use maps, probably, and use the map collision. All sorts of ways to skin a cat. Hope this helps!</p>
]]></description><link>http://fuzearena.com/forum//post/19358</link><guid isPermaLink="true">http://fuzearena.com/forum//post/19358</guid><dc:creator><![CDATA[PickleCatStars]]></dc:creator><pubDate>Thu, 25 May 2023 07:15:37 GMT</pubDate></item></channel></rss>