<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Katherine Hsu</title>
    <description>The latest articles on DEV Community by Katherine Hsu (@neverlandiz).</description>
    <link>https://dev.to/neverlandiz</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F422669%2F54af5cfc-7e24-4f12-b00a-033ff32455d2.png</url>
      <title>DEV Community: Katherine Hsu</title>
      <link>https://dev.to/neverlandiz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/neverlandiz"/>
    <language>en</language>
    <item>
      <title>Project Elpis #4: Checkpoints</title>
      <dc:creator>Katherine Hsu</dc:creator>
      <pubDate>Sun, 26 Jul 2020 02:53:54 +0000</pubDate>
      <link>https://dev.to/elpis/project-elpis-4-checkpoints-35jo</link>
      <guid>https://dev.to/elpis/project-elpis-4-checkpoints-35jo</guid>
      <description>&lt;p&gt;Hellooooooo &lt;/p&gt;

&lt;p&gt;This week I fixed some stuff and added a few new things.&lt;/p&gt;

&lt;p&gt;First, I fixed the jump attacks that I talked about last week. We decided to just limit the amount of jump attacks to once per jump. So, I added a attackLock variable that determines whether or not the player can attack. If the player has already attacked once after jumping, the attackLock is set to true until the player returns back to the ground.&lt;/p&gt;

&lt;p&gt;Then, I added checkpoints to our game. When the player reaches a checkpoint and presses the up arrow key, it restores the player’s health back to full. It’s pretty simple to make cuz I just changed the portal code up a little bit and used the corner notification system that Kevin made. I also adjusted the portal. Now, if the player wants to enter the portal, the player has to press the up arrow key as well.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F03p256qmm0rvqv171iz7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F03p256qmm0rvqv171iz7.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Lastly, I added dashing to the main character. Part of the reason that I decided to finish the dash movement this week was because whenever we had to test the game, it took too long to finish the level. Now that we have dashing, the character can move much faster, and we don’t have to walk for a long time when we just want to test a minor thing.&lt;/p&gt;

&lt;p&gt;Oh and I also reorganized the folders and deleted some levels that I created for testing cuz Kevin was complaining XD&lt;/p&gt;

&lt;p&gt;- Katherine :)&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Project Elpis #3: Parallax Backgrounds</title>
      <dc:creator>Katherine Hsu</dc:creator>
      <pubDate>Sun, 19 Jul 2020 00:13:25 +0000</pubDate>
      <link>https://dev.to/elpis/project-elpis-3-mysterious-forest-23ba</link>
      <guid>https://dev.to/elpis/project-elpis-3-mysterious-forest-23ba</guid>
      <description>&lt;p&gt;Hi again!!!&lt;/p&gt;

&lt;p&gt;This week I finished the attack movement for both the enemy and our main character, including the different hit/death effects and health stats.&lt;br&gt;
Right now, when the character jumps while attacking, it stays in the air until it finishes the attack animation, so I'll fix that next week  (͠≖ ͜ʖ͠≖)👌&lt;/p&gt;

&lt;p&gt;I also added knockback to the characters. At first, I had trouble making the knockback go in the correct direction. For example, when the slime hits the main character from the left side, we want the character to be knocked away to some distance to the right. The same applies to the slime. When the player attacks the slime, we want the slime to be knocked back as well. However, I couldn’t determine whether the characters were hit from the left or right side.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight gdscript"&gt;&lt;code&gt;&lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="n"&gt;playerPos&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;playerDetection&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;player&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;position&lt;/span&gt;
    &lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="n"&gt;dir&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;playerPos&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;position&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;dir&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;knockback&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;Vector2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;LEFT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;dir&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;knockback&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;Vector2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;RIGHT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;In the end, I decided to use the player detection system that I made last week to get access to the position of the player. Therefore I can subtract the position of the slime from the position of the player to get the distance between them, and then determine if the x-coordinate is positive or negative. If it’s positive, then the player is to the right side of the slime. If it’s negative, that means the player is to the left side of the slime.  In addition, I made an enemy detection system so that the player can also have access to the position of the slime.&lt;/p&gt;

&lt;p&gt;AND AND AND….&lt;br&gt;
I made a new world with parallax backgrounds!!!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OH9ec6BA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zhcsf8ot75z94dc2u6s2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OH9ec6BA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zhcsf8ot75z94dc2u6s2.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I placed five parallax layers in this world and the motion turned out much smoother than I thought it would be.&lt;br&gt;
This is my first time making a parallax background, so I had to spend some time researching, but it was totally worth the time!&lt;/p&gt;

&lt;p&gt;- Katherine :)&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Project Elpis #1</title>
      <dc:creator>Katherine Hsu</dc:creator>
      <pubDate>Sat, 04 Jul 2020 06:58:52 +0000</pubDate>
      <link>https://dev.to/elpis/project-elpis-1-2kip</link>
      <guid>https://dev.to/elpis/project-elpis-1-2kip</guid>
      <description>&lt;p&gt;So......&lt;br&gt;
This week, we added some basic things to our game. &lt;/p&gt;

&lt;p&gt;The basic movements that we have right now for our main character are run and jump. We also added a player camera, and the sprite sheets for the character. Personally, I like the idle one the most because it gives the game a windy effect. &lt;/p&gt;

&lt;p&gt;Additionally, we made three worlds and added “portals” that can transfer the character from one world to another. I’m not really satisfied with how the character enters the portal, so we will probably change it up later. &lt;/p&gt;

&lt;p&gt;Furthermore, we added our first enemy to the game - SLIMES. &lt;br&gt;
The states that they have are idle, wander, and chase. &lt;/p&gt;

&lt;p&gt;However, we faced a problem where when the “slimes” wander around, they would sometimes fall off the edge of the tiles and drop to another area. (Since the game is side-scrolling, the tiles are of different heights for players to jump around) We want each slime to be able to wander in their own specific area and also to stop chasing the player if it requires the slimes to jump down or up. &lt;/p&gt;

&lt;p&gt;So, I made another tile set, and set each cell to 4 * 4. (The world map tiles are 16 * 16) Using the mini tile set, I made boxes around each slime and assigned this tile set to the “barrier” layer, which only affects the enemies. Therefore, the slimes can’t leave the box because they would collide with the tiles, and the player can move around freely. I also made the tiles invisible so it doesn’t show in the game. Initially, I was going to make collision shapes on the edges to solve this problem, but then the tile set method worked much better. Now I can just draw tiles around enemies to limit their moving space, and the tile box size can be different for each enemy.&lt;/p&gt;

&lt;p&gt;- Katherine :)&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
