<?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: Tre</title>
    <description>The latest articles on DEV Community by Tre (@trevsh).</description>
    <link>https://dev.to/trevsh</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1115256%2F68a4dad9-c148-400e-8c9a-d2d589dab12e.png</url>
      <title>DEV Community: Tre</title>
      <link>https://dev.to/trevsh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/trevsh"/>
    <language>en</language>
    <item>
      <title>Why I Coded Wall Detection in my Game</title>
      <dc:creator>Tre</dc:creator>
      <pubDate>Thu, 23 Jul 2026 08:30:35 +0000</pubDate>
      <link>https://dev.to/trevsh/why-i-coded-wall-detection-in-my-game-2o3g</link>
      <guid>https://dev.to/trevsh/why-i-coded-wall-detection-in-my-game-2o3g</guid>
      <description>&lt;p&gt;For the past week I've been building a topdown sandbox game in Javascript and Phaser. &lt;/p&gt;

&lt;p&gt;Im sorry if this image is tiny, I will not pretend Im good at these kinds of blogs. Next time I'll bring a bigger one.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fydcfb9c7j3x5ikkoofik.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fydcfb9c7j3x5ikkoofik.gif" alt="My phaser game after implementing wall detection" width="80" height="60"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While doing this project, I've learned alot about not only Phaser but problem solving altogether. &lt;br&gt;
Lately I began to worry AI has been hijacking my critical thinking skills. This project has been my way to combat that notion.&lt;br&gt;
Everytime I encounter an issue, I've began following a workflow in order to plan my solutions. &lt;br&gt;
I begin by articulating the problem and the goal. Today, my problem was how can I grab data from the tiles around my characters?&lt;br&gt;
I want my player and npcs to be able to interact with the tiles around them even if they're just knocking on wood or inspecting a table.&lt;/p&gt;

&lt;p&gt;All I have so far in my world are walls so I started with detecting those.&lt;/p&gt;

&lt;p&gt;I studied the way Cataclysm Dark Days Ahead did it and noticed they stored all their data in json files that are later interpreted. I figured I could do the same&lt;br&gt;
with object in Javascript (So I dont end up writing an interpreter language).&lt;/p&gt;

&lt;p&gt;To get the tiles around my player, I had to grab my player's tile location. Then I stored locations in each cardinal direction using this code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;collisions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;TopWallTile&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;wallsLayer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTileAtWorldXY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;tileSize&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
      &lt;span class="na"&gt;BottomWallTile&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;wallsLayer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTileAtWorldXY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;tileSize&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
      &lt;span class="na"&gt;LeftWallTile&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;wallsLayer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTileAtWorldXY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;tileSize&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
      &lt;span class="na"&gt;RightWallTile&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;wallsLayer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTileAtWorldXY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;tileSize&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Its probably not the best way but its honest work. Lots of brain juice went into this.&lt;br&gt;
I used this object to get... wall data... and send it to my UIScene to display.&lt;br&gt;
In hindsight, this was me just trying to figure out how tiles work and how I can grab and access tile data.&lt;br&gt;
I didnt have much useful data on my tiles as of now but I plan to add more properties the player could mess with like "breakable", or "inspectable" (Most everything will be inspectable. Thats only proper for these kinds of games).&lt;/p&gt;

&lt;p&gt;So we made a small (3 hour long) step today. &lt;br&gt;
I feel more confident tackling the rest of this interaction system. &lt;br&gt;
I promise in the future I'll have more interesting things to share but for now I need to start slow and try to understand everything. I anticipate this game to have alot of systems and if im going to work on this, I dont want to navigate something I cant understand. &lt;br&gt;
Working in tech has taught me the importance of being able to articulate not only your projects, but your problems and proposed solutions. And In that regard, I've learned a ton.&lt;/p&gt;

&lt;p&gt;Till next time!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>gamedev</category>
      <category>showdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Im a Self-Teaching C++ Dev on the road to an internship!</title>
      <dc:creator>Tre</dc:creator>
      <pubDate>Tue, 25 Jul 2023 00:39:18 +0000</pubDate>
      <link>https://dev.to/trevsh/im-a-self-teaching-c-dev-on-the-road-to-an-internship-39aj</link>
      <guid>https://dev.to/trevsh/im-a-self-teaching-c-dev-on-the-road-to-an-internship-39aj</guid>
      <description>&lt;p&gt;Hello Dev.to! &lt;/p&gt;

&lt;p&gt;My name is Tre and I am attempting (And will accomplish... eventually) learning C++ in order to land a better job in my area.&lt;/p&gt;

&lt;p&gt;I have a bit of experience in Unity and love video games, but Im really interested i the inner working of an engine and coding in general! I have struggled immensely with learning due to ADHD but Im pushing through it and hoping the community could help me on my journey!&lt;/p&gt;

&lt;p&gt;I am currently halfway done with Beginning C++ Through Game Programming and learned about vectors and iterators aswell as making a Hangman clone with book assistance. I have the code in my github and would like to invite you guys to come check out my notes and leave me feedback! I would be immensely grateful and maybe other beginners could get some contributions by helping me! This is a link to my github!:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/TrevSh" rel="noopener noreferrer"&gt;https://github.com/TrevSh&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have all my book code under "ClassAssignmentX_Assignment" and will add more assignment code as I go through the book!&lt;/p&gt;

&lt;p&gt;I would be deeply indebted to any programmer willing to help assist me and am open to hiring C++ tutors but I am low on money at the moment (Hopefully not for long lol) so I cant afford much but would totally be open to the idea!&lt;/p&gt;

&lt;p&gt;I hope this post comes off correctly and not like Im begging or anything, Im just really eager to learn this great language so I can land a good job and make some awesome small games in the near future!&lt;/p&gt;

&lt;p&gt;Many blessings and thank you for welcoming me to your community and hope you all stay amazing!&lt;/p&gt;

</description>
      <category>cpp</category>
      <category>opensource</category>
      <category>codenewbie</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Those who didn't go to college, What steps did you take to land an internship?</title>
      <dc:creator>Tre</dc:creator>
      <pubDate>Fri, 21 Jul 2023 17:35:53 +0000</pubDate>
      <link>https://dev.to/trevsh/those-who-didnt-go-to-college-what-steps-did-you-take-to-land-an-internship-3leg</link>
      <guid>https://dev.to/trevsh/those-who-didnt-go-to-college-what-steps-did-you-take-to-land-an-internship-3leg</guid>
      <description>&lt;p&gt;Trying my hardest to get my foot into the tech industry. Id love to know what resources you used and books you read that gave you the confidence and competency to apply to a company.&lt;/p&gt;

&lt;p&gt;C++ in specific since there's tons of jobs in my area that hire for C++ programmers (Austin) but I'm unqualified as of the moment for all of them lol.&lt;/p&gt;

</description>
      <category>codenewbie</category>
    </item>
  </channel>
</rss>
