<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>GameSweetGame</title><link>https://gamesweetgame.com/en/</link><description>Recent content on GameSweetGame</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Fri, 20 Feb 2026 12:31:00 +0900</lastBuildDate><atom:link href="https://gamesweetgame.com/en/index.xml" rel="self" type="application/rss+xml"/><item><title>Fix Character Movement Stutter in Unity</title><link>https://gamesweetgame.com/en/p/fix-character-movement-stutter-in-unity/</link><pubDate>Fri, 20 Feb 2026 12:31:00 +0900</pubDate><guid>https://gamesweetgame.com/en/p/fix-character-movement-stutter-in-unity/</guid><description>&lt;p&gt;Check if &lt;strong&gt;Min Move Distance&lt;/strong&gt; is set to 0 in your Character Controller.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Min Move Distance setting" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;
&lt;p&gt;I spent a long time tweaking movement code trying to figure out why the character was stuttering. Turns out, setting Min Move Distance to 0 fixed it right away.&lt;/p&gt;</description></item><item><title>Adding Mixamo Control Rig in Blender</title><link>https://gamesweetgame.com/en/p/adding-mixamo-control-rig-in-blender/</link><pubDate>Thu, 19 Feb 2026 00:56:00 +0900</pubDate><guid>https://gamesweetgame.com/en/p/adding-mixamo-control-rig-in-blender/</guid><description>&lt;p&gt;There&amp;rsquo;s a Mixamo Control Rig addon for Blender.&lt;/p&gt;
&lt;p&gt;It makes editing animations super easy.&lt;/p&gt;
&lt;p&gt;Make sure to attach the control rig while the model is in T-Pose to minimize errors.&lt;/p&gt;</description></item><item><title>Extract Animation Clips from FBX in Unity</title><link>https://gamesweetgame.com/en/p/extract-animation-clips-from-fbx-in-unity/</link><pubDate>Tue, 10 Feb 2026 11:29:00 +0900</pubDate><guid>https://gamesweetgame.com/en/p/extract-animation-clips-from-fbx-in-unity/</guid><description>&lt;p&gt;Select the FBX file and press &lt;strong&gt;Ctrl+D&lt;/strong&gt; to duplicate just the animation clip.&lt;/p&gt;
&lt;p&gt;&lt;img alt="FBX animation extraction" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;
&lt;p&gt;Make sure to finalize all settings before extracting.&lt;/p&gt;</description></item><item><title>Unity Editor Crash Fix: D3D11 Swapchain Device Reset/Removed</title><link>https://gamesweetgame.com/en/p/unity-editor-crash-fix-d3d11-swapchain-device-reset/removed/</link><pubDate>Wed, 28 Jan 2026 00:00:00 +0900</pubDate><guid>https://gamesweetgame.com/en/p/unity-editor-crash-fix-d3d11-swapchain-device-reset/removed/</guid><description>&lt;p&gt;I was working in Unity when suddenly the editor crashed with a D3D11 swapchain error — &amp;ldquo;Failed to present D3D11 swapchain due to device reset/removed.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;After reopening, it would crash within 3 seconds every time.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Error screenshot" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;
&lt;p&gt;I tried everything — reinstalling Unity, changing versions — nothing worked.&lt;/p&gt;
&lt;p&gt;I initially suspected &lt;strong&gt;Wallpaper Engine&lt;/strong&gt; conflicting with DirectX in the background, but that wasn&amp;rsquo;t it either.&lt;/p&gt;
&lt;p&gt;The key symptom was that the editor was sluggish and unresponsive, but the scene and game view rendered fine before crashing. This suggested it wasn&amp;rsquo;t a rendering issue but something loading in the background.&lt;/p&gt;
&lt;p&gt;Then I noticed &lt;strong&gt;Windows Defender&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Defender" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The fix: Allow the Unity Editor and Unity Package Manager through Windows Defender Firewall.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Firewall settings" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;
&lt;p&gt;My theory: Unity tries to communicate with Package Manager and other services on startup. The firewall blocks these requests, stalling the main thread, causing GPU timing to slip, and eventually triggering the D3D11 device reset.&lt;/p&gt;</description></item><item><title>Edit Game Animations with Blender and Mixamo Rig</title><link>https://gamesweetgame.com/en/p/edit-game-animations-with-blender-and-mixamo-rig/</link><pubDate>Tue, 20 Jan 2026 12:00:00 +0900</pubDate><guid>https://gamesweetgame.com/en/p/edit-game-animations-with-blender-and-mixamo-rig/</guid><description>&lt;p&gt;I previously applied motion capture poses to a model, but they looked a bit awkward.&lt;/p&gt;
&lt;p&gt;(&lt;a class="link" href="https://gamesweetgame.com/en/posts/motion-capture-to-game/" &gt;Previous post: Applying Custom Animations to Your Game&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s edit the animation in Blender.&lt;/p&gt;
&lt;p&gt;After struggling with building bone controllers from scratch, I found something great — the &lt;a class="link" href="https://extensions.blender.org/add-ons/mixamo-rig/" target="_blank" rel="noopener"
 &gt;Mixamo Rig addon&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Control rig created" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;
&lt;p&gt;With just one click, a control rig was generated. Easy.&lt;/p&gt;</description></item><item><title>Applying Custom Motion Capture Animations to Your Game</title><link>https://gamesweetgame.com/en/p/applying-custom-motion-capture-animations-to-your-game/</link><pubDate>Tue, 20 Jan 2026 11:00:00 +0900</pubDate><guid>https://gamesweetgame.com/en/p/applying-custom-motion-capture-animations-to-your-game/</guid><description>&lt;p&gt;I want to make a polished action game. Let&amp;rsquo;s custom-make the attack animations.&lt;/p&gt;
&lt;p&gt;I referenced this motion capture project on GitHub:&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://github.com/SAKTHIVINASH2/3D-Motion-Capture-From-Video" target="_blank" rel="noopener"
 &gt;GitHub - 3D Motion Capture From Video&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Using a Python pose estimation library, you can extract keypoint coordinates for head, shoulders, arms, legs, etc. These coordinates are then converted for use in Unity.&lt;/p&gt;
&lt;h2 id="overall-flow"&gt;Overall Flow
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;External pose data (33 keypoints)&lt;/li&gt;
&lt;li&gt;Convert to Unity coordinate system&lt;/li&gt;
&lt;li&gt;Point objects (P0~P32)&lt;/li&gt;
&lt;li&gt;Estimate rotation relative to bind direction&lt;/li&gt;
&lt;li&gt;Root direction (yaw + slight tilt) estimation with smoothing&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="normalizing-file-values--axis-correction"&gt;Normalizing File Values + Axis Correction
&lt;/h2&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-csharp" data-lang="csharp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;float&lt;/span&gt; px = &lt;span style="color:#66d9ef"&gt;float&lt;/span&gt;.Parse(toks[i * &lt;span style="color:#ae81ff"&gt;3&lt;/span&gt; + &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;]) / scaleXY;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;float&lt;/span&gt; py = &lt;span style="color:#66d9ef"&gt;float&lt;/span&gt;.Parse(toks[i * &lt;span style="color:#ae81ff"&gt;3&lt;/span&gt; + &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;]) / scaleXY;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;float&lt;/span&gt; pz = &lt;span style="color:#66d9ef"&gt;float&lt;/span&gt;.Parse(toks[i * &lt;span style="color:#ae81ff"&gt;3&lt;/span&gt; + &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;]) / scaleZ;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;Different XY/Z scales: Video-based pose estimation has much more noise in depth (Z)&lt;/li&gt;
&lt;li&gt;invertZ: Corrects coordinate system difference between MediaPipe and Unity&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="storing-bind-rotation"&gt;Storing Bind Rotation
&lt;/h2&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-csharp" data-lang="csharp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;lUpperBind = lUpperArm.rotation;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Reference rotation from the T-Pose.&lt;/p&gt;
&lt;h2 id="automatic-bind-direction-estimation"&gt;Automatic Bind Direction Estimation
&lt;/h2&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-csharp" data-lang="csharp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;lUpperBindDir = (lLowerArm.position - lUpperArm.position).normalized;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The core concept: &lt;strong&gt;which direction was this bone originally facing?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;UpperArm → LowerArm direction = &lt;strong&gt;bone&amp;rsquo;s reference forward vector&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Motion capture result" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;
&lt;p&gt;A bit rough, but the motion came through. Now it&amp;rsquo;s time to refine it in Blender.&lt;/p&gt;</description></item><item><title>Visualize Character Field of View with Unity Gizmos</title><link>https://gamesweetgame.com/en/p/visualize-character-field-of-view-with-unity-gizmos/</link><pubDate>Thu, 13 Mar 2025 00:00:00 +0900</pubDate><guid>https://gamesweetgame.com/en/p/visualize-character-field-of-view-with-unity-gizmos/</guid><description>&lt;p&gt;Unity has built-in Gizmo functions that get called automatically.&lt;/p&gt;
&lt;h3 id="ondrawgizmos"&gt;OnDrawGizmos()
&lt;/h3&gt;&lt;p&gt;Always visible in the Scene view.&lt;/p&gt;
&lt;h3 id="ondrawgizmosselected"&gt;OnDrawGizmosSelected()
&lt;/h3&gt;&lt;p&gt;Only visible when the object is &lt;strong&gt;selected&lt;/strong&gt; in the Scene view.&lt;/p&gt;
&lt;p&gt;Great for visualizing field of view, attack range, and other debug shapes.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Blue lines drawn in scene" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;</description></item><item><title>Unity Sword Trail Effect</title><link>https://gamesweetgame.com/en/p/unity-sword-trail-effect/</link><pubDate>Fri, 21 Feb 2025 00:00:00 +0900</pubDate><guid>https://gamesweetgame.com/en/p/unity-sword-trail-effect/</guid><description>&lt;p&gt;I added basic attack animations to my character controller.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Basic attack" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;
&lt;p&gt;Swinging the sword felt empty. Games I&amp;rsquo;ve played always had that afterimage trail effect when swinging fast.&lt;/p&gt;
&lt;h2 id="implementation"&gt;Implementation
&lt;/h2&gt;&lt;p&gt;Generate a mesh along the sword&amp;rsquo;s trajectory.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Sword trajectory as mesh" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;
&lt;p&gt;Draw a texture on the mesh and push it with a shader. The timing needs to follow right behind the sword&amp;rsquo;s path.&lt;/p&gt;
&lt;p&gt;To sync the timing, adjust the shader texture Offset while watching the sword in the animation.&lt;/p&gt;
&lt;p&gt;After searching for how animation stores shader texture values, I found &lt;code&gt;Material._MainTex_ST&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Now I can control shader values through animation.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Sword trail texture following the blade" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;

 &lt;blockquote&gt;
 &lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; Set the shader texture mode to &lt;strong&gt;Clamp&lt;/strong&gt; instead of Wrap. Otherwise the texture keeps repeating. With Clamp, it extends the last pixel seamlessly.&lt;/p&gt;

 &lt;/blockquote&gt;
&lt;p&gt;&lt;img alt="Final result" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;
&lt;p&gt;Basic sword trail effect done. Next step: make it 3D and add more options for fancier effects.&lt;/p&gt;
&lt;h3 id="extra-tip"&gt;Extra Tip
&lt;/h3&gt;&lt;p&gt;&lt;img alt="Broken option" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;
&lt;p&gt;When keying the animation, use the &lt;strong&gt;Broken&lt;/strong&gt; tangent option to prevent the texture from visibly snapping back to the start when the attack animation ends.&lt;/p&gt;</description></item><item><title>Rendering a 3D Character — Transform Pipeline Order</title><link>https://gamesweetgame.com/en/p/rendering-a-3d-character-transform-pipeline-order/</link><pubDate>Thu, 04 Jan 2024 00:00:00 +0900</pubDate><guid>https://gamesweetgame.com/en/p/rendering-a-3d-character-transform-pipeline-order/</guid><description>&lt;h2 id="transform-order"&gt;Transform Order
&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;Polygon × World Matrix × View Matrix × Projection Matrix&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;World Matrix&lt;/strong&gt; — Place the model in world space (position, rotation, scale)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;View Matrix&lt;/strong&gt; — Transform relative to the camera&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Projection Matrix&lt;/strong&gt; — Project 3D onto 2D screen&lt;/li&gt;
&lt;/ol&gt;</description></item><item><title>DirectX Lighting Basics — Ambient, Diffuse, Specular</title><link>https://gamesweetgame.com/en/p/directx-lighting-basics-ambient-diffuse-specular/</link><pubDate>Wed, 03 Jan 2024 00:00:00 +0900</pubDate><guid>https://gamesweetgame.com/en/p/directx-lighting-basics-ambient-diffuse-specular/</guid><description>&lt;h2 id="lighting-calculation"&gt;Lighting Calculation
&lt;/h2&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-hlsl" data-lang="hlsl"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;float4&lt;/span&gt; fvTotalAmbient &lt;span style="color:#f92672"&gt;=&lt;/span&gt; fvAmbient &lt;span style="color:#f92672"&gt;*&lt;/span&gt; fvBaseColor;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;float4&lt;/span&gt; fvTotalDiffuse &lt;span style="color:#f92672"&gt;=&lt;/span&gt; fvDiffuse &lt;span style="color:#f92672"&gt;*&lt;/span&gt; fNDotL &lt;span style="color:#f92672"&gt;*&lt;/span&gt; fvBaseColor;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;float4&lt;/span&gt; fvTotalSpecular &lt;span style="color:#f92672"&gt;=&lt;/span&gt; fvSpecular &lt;span style="color:#f92672"&gt;*&lt;/span&gt; pow( fRDotV, fSpecularPower );
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;return&lt;/span&gt;( saturate( fvTotalAmbient &lt;span style="color:#f92672"&gt;+&lt;/span&gt; fvTotalDiffuse &lt;span style="color:#f92672"&gt;+&lt;/span&gt; fvTotalSpecular ) );
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="notes"&gt;Notes
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;saturate()&lt;/code&gt; clamps the value between 0 and 1&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Do NOT use saturate in HDR&lt;/strong&gt; (values above 1.0 are needed)&lt;/li&gt;
&lt;li&gt;Large capacity is possible due to texture compression&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rim lighting&lt;/strong&gt; technique: compute using the normal vector at the vertex stage&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Assimp FBX Model Loading &amp; Skinning Animation</title><link>https://gamesweetgame.com/en/p/assimp-fbx-model-loading-skinning-animation/</link><pubDate>Tue, 02 Jan 2024 00:00:00 +0900</pubDate><guid>https://gamesweetgame.com/en/p/assimp-fbx-model-loading-skinning-animation/</guid><description>
 &lt;blockquote&gt;
 &lt;p&gt;Current status: Implementing in a simple project structure first, then porting to the team engine.&lt;/p&gt;

 &lt;/blockquote&gt;
&lt;h2 id="version-issues"&gt;Version Issues
&lt;/h2&gt;&lt;p&gt;The bone count was way too high, so I tested by switching Assimp versions:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Latest version (v143)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Latest version - 67 bones" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;v140&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="v140 - 2 bones" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;
&lt;p&gt;This is from checking a single mesh. The latest version reports 67 bones, while the older version correctly shows 2.&lt;/p&gt;
&lt;h2 id="skinning-animation--head-and-arms-stretching-bug"&gt;Skinning Animation — Head and Arms Stretching Bug
&lt;/h2&gt;&lt;p&gt;Skinning animation works, but the head and arms stretch out way too long.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Head/arms stretching" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;
&lt;p&gt;&lt;del&gt;After debugging for a while, I found that the bones in the FBX file were sticking out above the head.&lt;/del&gt;&lt;/p&gt;
&lt;p&gt;I experimented in Blender and confirmed that when vertex positions are slightly above the bones on the Y axis, the arms and hands stretch. Since my animation causes stretching, the bones must be slightly offset downward.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Checking bone positions in Blender" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;
&lt;h2 id="model-lying-down-after-blender-export"&gt;Model Lying Down After Blender Export
&lt;/h2&gt;&lt;p&gt;Check the &lt;strong&gt;Y Up&lt;/strong&gt; option in the export settings.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Blender export settings" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;
&lt;p&gt;If the model is still lying down, try changing Y Up to something else, export, then switch back to Y Up and export again. That fixed it.&lt;/p&gt;</description></item><item><title>DirectX UI System Implementation</title><link>https://gamesweetgame.com/en/p/directx-ui-system-implementation/</link><pubDate>Mon, 01 Jan 2024 00:00:00 +0900</pubDate><guid>https://gamesweetgame.com/en/p/directx-ui-system-implementation/</guid><description>&lt;p&gt;When creating an entity, add UITestScript as a component. Pass the UI type during creation.&lt;/p&gt;
&lt;p&gt;Each type is implemented inside the Update function.&lt;/p&gt;
&lt;h2 id="ui-types"&gt;UI Types
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;STATIC&lt;/strong&gt; — A UI element that just sits there&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ONMOUSE&lt;/strong&gt; — A UI element that &amp;ldquo;breathes&amp;rdquo; when hovered&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GAUGE&lt;/strong&gt; — A gauge UI for time, hunger, mini-games, etc.&lt;/li&gt;
&lt;li&gt;If animation is needed, more types can be added&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="shader-code"&gt;Shader Code
&lt;/h2&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-hlsl" data-lang="hlsl"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;float4&lt;/span&gt; main(PixelIn input) &lt;span style="color:#f92672"&gt;:&lt;/span&gt; SV_TARGET
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;float4&lt;/span&gt; texColor &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;float4&lt;/span&gt;(&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;, &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;, &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;, &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;if&lt;/span&gt;(UItype &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// Use frac() to wrap texture coordinates within 0-1 range&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// for seamless repetition&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; input.tex.x &lt;span style="color:#f92672"&gt;=&lt;/span&gt; frac(input.tex.x);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; input.tex.y &lt;span style="color:#f92672"&gt;=&lt;/span&gt; frac(input.tex.y);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; texColor &lt;span style="color:#f92672"&gt;=&lt;/span&gt; shaderTexture.Sample(SampleType, input.tex);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; (texColor.a &lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0.01&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;discard&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;else&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;if&lt;/span&gt;(UItype &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;float2&lt;/span&gt; textureOffset &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;float2&lt;/span&gt;(&lt;span style="color:#ae81ff"&gt;0.0f&lt;/span&gt;, &lt;span style="color:#ae81ff"&gt;0.0f&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;float2&lt;/span&gt; textureSize &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;float2&lt;/span&gt;(&lt;span style="color:#ae81ff"&gt;1.0f&lt;/span&gt;, &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&lt;/span&gt; textureTranslation);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// Discard pixels outside the visible gauge area&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; (input.tex.x &lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt; textureOffset.x &lt;span style="color:#f92672"&gt;||&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; input.tex.x &lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt; textureOffset.x &lt;span style="color:#f92672"&gt;+&lt;/span&gt; textureSize.x &lt;span style="color:#f92672"&gt;||&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&lt;/span&gt; input.tex.y &lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt; textureOffset.y &lt;span style="color:#f92672"&gt;||&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&lt;/span&gt; input.tex.y &lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt; textureOffset.y &lt;span style="color:#f92672"&gt;+&lt;/span&gt; textureSize.y)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;discard&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;else&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; texColor &lt;span style="color:#f92672"&gt;=&lt;/span&gt; shaderTexture.Sample(SampleType, input.tex);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;else&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; texColor &lt;span style="color:#f92672"&gt;=&lt;/span&gt; shaderTexture.Sample(SampleType, input.tex);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; (texColor.a &lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0.01&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;discard&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;return&lt;/span&gt; texColor;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="key-points"&gt;Key Points
&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;UItype == 1 (ONMOUSE):&lt;/strong&gt; Uses &lt;code&gt;frac()&lt;/code&gt; to wrap texture coordinates for a breathing animation effect&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;UItype == 2 (GAUGE):&lt;/strong&gt; Controls the visible texture area via &lt;code&gt;textureTranslation&lt;/code&gt; to create a fill effect&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;else (STATIC):&lt;/strong&gt; Simple texture sampling with alpha discard below 0.01&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Math Fundamentals for 2D Physics Engines</title><link>https://gamesweetgame.com/en/p/math-fundamentals-for-2d-physics-engines/</link><pubDate>Mon, 01 Jan 2024 00:00:00 +0900</pubDate><guid>https://gamesweetgame.com/en/p/math-fundamentals-for-2d-physics-engines/</guid><description>&lt;p&gt;Drawing with D2D.&lt;/p&gt;
&lt;p&gt;Linear algebra, calculus, Taylor series.&lt;/p&gt;
&lt;h2 id="key-physics-terms"&gt;Key Physics Terms
&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;Impulse:&lt;/strong&gt; The product of force and the time it acts (force × time). Represents how much mass and velocity change.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Momentum:&lt;/strong&gt; A physics term for the quantity of motion. Calculated by multiplying mass by velocity, measured in kg⋅m/s.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Damping:&lt;/strong&gt; A force that resists motion, similar to friction.&lt;/p&gt;
&lt;h2 id="calculus"&gt;Calculus
&lt;/h2&gt;&lt;p&gt;A concept devised by Isaac Newton.&lt;/p&gt;
&lt;h3 id="differentiation"&gt;Differentiation
&lt;/h3&gt;&lt;p&gt;Think of it as finding the slope at any arbitrary point on a function.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Differentiation - slope of tangent line" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;
&lt;h4 id="power-rule"&gt;Power Rule
&lt;/h4&gt;&lt;p&gt;&lt;img alt="Power Rule" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;
&lt;h4 id="quotient-rule"&gt;Quotient Rule
&lt;/h4&gt;&lt;p&gt;&lt;img alt="Quotient Rule" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;
&lt;h4 id="product-rule"&gt;Product Rule
&lt;/h4&gt;&lt;p&gt;&lt;img alt="Product Rule" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;
&lt;h4 id="chain-rule"&gt;Chain Rule
&lt;/h4&gt;&lt;p&gt;&lt;img alt="Chain Rule" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;
&lt;h4 id="derivatives-of-exponential-and-logarithmic-functions"&gt;Derivatives of Exponential and Logarithmic Functions
&lt;/h4&gt;&lt;p&gt;&lt;img alt="Exponential/Log derivatives" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;
&lt;h3 id="integration"&gt;Integration
&lt;/h3&gt;&lt;p&gt;Finding the signed area under a curve.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Integration - signed area" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;
&lt;h2 id="torque"&gt;Torque
&lt;/h2&gt;&lt;p&gt;Calculated using the cross product of vectors.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Torque" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;
&lt;h2 id="eigenvalues"&gt;Eigenvalues
&lt;/h2&gt;&lt;p&gt;Needed for 3D physics engines (related to axes of rotation).&lt;/p&gt;
&lt;p&gt;&lt;img alt="Eigenvalues" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;</description></item><item><title>Python Star Pattern with While Loop</title><link>https://gamesweetgame.com/en/p/python-star-pattern-with-while-loop/</link><pubDate>Sun, 28 Nov 2021 00:00:00 +0900</pubDate><guid>https://gamesweetgame.com/en/p/python-star-pattern-with-while-loop/</guid><description>&lt;p&gt;Instead of a simple star pattern, let&amp;rsquo;s take user input to decide how many rows to print.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;☆
☆☆
☆☆☆
☆☆☆☆
☆☆☆☆☆
&lt;/code&gt;&lt;/pre&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;i &lt;span style="color:#f92672"&gt;=&lt;/span&gt; int(input(&lt;span style="color:#e6db74"&gt;&amp;#34;Enter the number of rows: &amp;#34;&lt;/span&gt;))
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;star &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;while&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;True&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; print(&lt;span style="color:#e6db74"&gt;&amp;#34;☆&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;*&lt;/span&gt; star)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; star &lt;span style="color:#f92672"&gt;==&lt;/span&gt; i:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;break&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; star &lt;span style="color:#f92672"&gt;+=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;input()&lt;/code&gt; returns a string by default. Convert it to &lt;code&gt;int&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;while True&lt;/code&gt; creates an infinite loop.&lt;/li&gt;
&lt;li&gt;Each iteration prints stars and increments by 1. When it matches the input, &lt;code&gt;break&lt;/code&gt; stops the loop.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img alt="Result" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;
&lt;p&gt;Entering 7 prints stars from 1 to 7 rows.&lt;/p&gt;</description></item><item><title>Python: Search Lists and Strings with the "in" Operator</title><link>https://gamesweetgame.com/en/p/python-search-lists-and-strings-with-the-in-operator/</link><pubDate>Wed, 24 Nov 2021 00:00:00 +0900</pubDate><guid>https://gamesweetgame.com/en/p/python-search-lists-and-strings-with-the-in-operator/</guid><description>&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;result1 &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; &lt;span style="color:#f92672"&gt;in&lt;/span&gt; [&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;, &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;, &lt;span style="color:#ae81ff"&gt;3&lt;/span&gt;]
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;result2 &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;5&lt;/span&gt; &lt;span style="color:#f92672"&gt;in&lt;/span&gt; [&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;, &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;, &lt;span style="color:#ae81ff"&gt;3&lt;/span&gt;]
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;result3 &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; &lt;span style="color:#f92672"&gt;not&lt;/span&gt; &lt;span style="color:#f92672"&gt;in&lt;/span&gt; [&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;, &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;, &lt;span style="color:#ae81ff"&gt;3&lt;/span&gt;]
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;result4 &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;5&lt;/span&gt; &lt;span style="color:#f92672"&gt;not&lt;/span&gt; &lt;span style="color:#f92672"&gt;in&lt;/span&gt; [&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;, &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;, &lt;span style="color:#ae81ff"&gt;3&lt;/span&gt;]
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;result5 &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;j&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;in&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;python&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;result6 &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;y&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;in&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;python&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;result7 &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;y&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;not&lt;/span&gt; &lt;span style="color:#f92672"&gt;in&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;python&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;print(result1) &lt;span style="color:#75715e"&gt;# True&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;print(result2) &lt;span style="color:#75715e"&gt;# False&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;print(result3) &lt;span style="color:#75715e"&gt;# False&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;print(result4) &lt;span style="color:#75715e"&gt;# True&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;print(result5) &lt;span style="color:#75715e"&gt;# False&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;print(result6) &lt;span style="color:#75715e"&gt;# True&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;print(result7) &lt;span style="color:#75715e"&gt;# False&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;img alt="Output" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;result1&lt;/code&gt;: Is 1 in &lt;code&gt;[1, 2, 3]&lt;/code&gt;? → Yes → &lt;code&gt;True&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;result2&lt;/code&gt;: Is 5 in &lt;code&gt;[1, 2, 3]&lt;/code&gt;? → No → &lt;code&gt;False&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;not in&lt;/code&gt; is simply the opposite&lt;/li&gt;
&lt;li&gt;Strings work just like lists&lt;/li&gt;
&lt;li&gt;&lt;code&gt;result5&lt;/code&gt;: Is &amp;ldquo;j&amp;rdquo; in &amp;ldquo;python&amp;rdquo;? → No → &lt;code&gt;False&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>