<?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: enchantedForest</title>
    <description>The latest articles on DEV Community by enchantedForest (@enchantedforest).</description>
    <link>https://dev.to/enchantedforest</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%2Forganization%2Fprofile_image%2F2520%2F8febeae1-7c67-4933-b53c-4ee9853c76a9.png</url>
      <title>DEV Community: enchantedForest</title>
      <link>https://dev.to/enchantedforest</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/enchantedforest"/>
    <language>en</language>
    <item>
      <title>"In that enchanted place on top of the forest..." [9]</title>
      <dc:creator>Kevin Hsu</dc:creator>
      <pubDate>Mon, 31 Aug 2020 10:19:40 +0000</pubDate>
      <link>https://dev.to/enchantedforest/9-in-that-enchanted-place-on-top-of-the-forest-225p</link>
      <guid>https://dev.to/enchantedforest/9-in-that-enchanted-place-on-top-of-the-forest-225p</guid>
      <description>&lt;p&gt;*&lt;em&gt;After a lengthy fight with a mob that has 10k+ health&lt;/em&gt;*&lt;br&gt;
"Ahh... back to the comfort of the Levancer's Keep."&lt;br&gt;
*&lt;em&gt;Gets swarmed by mobs and dies&lt;/em&gt;*&lt;/p&gt;




&lt;p&gt;Hello dear readers. Although it pains me deeply to say this, I am here today to deliver the final post of the enchantedForest dev blog. This has been A Grand Journey, and we are finally at its destination. The game now contains 4 major areas, quest dealers, merchants, multiple mob types, a user account system, and... a boss fight. &lt;/p&gt;




&lt;p&gt;* spoiler warning *&lt;/p&gt;

&lt;p&gt;In the final stage of the game, our protagonist is stripped of their mana supply upon entry, and faces off against the Final Enemy. &lt;/p&gt;

&lt;p&gt;And no, this wouldn't be a proper "&lt;em&gt;Alek and Kevin coding session&lt;/em&gt;" without some grumbling about ridiculous implementations. Alek whipped up some code to set default quick access items, while I created a boss room for the gigantic "jumpydudeBoss". The background of it is a blurred screenshot of the codebase in Neovim, as it is the editor that we usually code in. Alek's instance of the boss was hanging on to the last threads of its life, with 1hp remaining before he accidentally teleported out of the room. A tragic story, considering how it took 5+ mins of constantly launching fireballs to get to that point (the boss respawns with full health if you leave). &lt;/p&gt;




&lt;p&gt;I have to say, this is quite the project. &lt;br&gt;
I'm rather fond of it, and so is Alek (I think). He says it's &lt;em&gt;"almost comparable"&lt;/em&gt; to &lt;a href="https://theland.herokuapp.com/"&gt;theLand&lt;/a&gt;, a game he created back in our sophomore year. &lt;/p&gt;

&lt;p&gt;August 31, 2020 marks the end of this summer vacation, the completion of the enchantedForest, and a long (but hopefully temporary) pause to Alek and Kevin coding projects. Also, Hogwarts starts the school year tomorrow. Just sayin'.&lt;/p&gt;

&lt;p&gt;Go play the game! Star the &lt;a href="https://github.com/awestover/enchantedForest"&gt;repository&lt;/a&gt; on Github, read our story, and see for yourself the project that we put so much time and effort into. As always, thanks for hanging out with us! &lt;/p&gt;

&lt;p&gt;Signing off for the last time; Byeeeee~&lt;br&gt;
- Kevin&lt;/p&gt;




&lt;p&gt;"&lt;em&gt;Wherever they go, and whatever happens to them on the way, in that enchanted place on the top of the forest, a little boy and his Bear will always be playing.&lt;/em&gt;"&lt;/p&gt;

&lt;p&gt;“&lt;em&gt;But, of course, it isn't really Good-bye, because the Forest will always be there... and anybody who is Friendly with Bears can find it.&lt;/em&gt;" - A.A. Milne&lt;/p&gt;




&lt;p&gt;P.S. &lt;br&gt;
Alek says we should add wings. With HJKL controls. &lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>enchantedForest[8]</title>
      <dc:creator>Kevin Hsu</dc:creator>
      <pubDate>Sat, 15 Aug 2020 01:06:39 +0000</pubDate>
      <link>https://dev.to/enchantedforest/enchantedforest-9-1c3f</link>
      <guid>https://dev.to/enchantedforest/enchantedforest-9-1c3f</guid>
      <description>&lt;p&gt;Hello. &lt;/p&gt;

&lt;p&gt;Short developer PSA here (Walkthrough post): You will have to jump off a cliff, or be horrendously mauled by a mob before being able to respawn and proceed to the next section of the Llama Plains. Worry not, for this is a feature, not a map-design bug. It is our mirrored implementation of Harry Potter being required to die before being able to destroy all of Voldemort's Horcruxes. Or at least that's what our official statement is XD. &lt;/p&gt;

&lt;p&gt;- Kevin&lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>enchantedForest[7]</title>
      <dc:creator>Alek Westover</dc:creator>
      <pubDate>Mon, 10 Aug 2020 01:30:46 +0000</pubDate>
      <link>https://dev.to/enchantedforest/enchantedforest-7-5dn5</link>
      <guid>https://dev.to/enchantedforest/enchantedforest-7-5dn5</guid>
      <description>&lt;p&gt;today, we wrote 3 lines of code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;logout&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"username"&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;del&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"username"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;redirect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url_for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"index"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;ok not really, &lt;br&gt;
&lt;a class="comment-mentioned-user" href="https://dev.to/kaisucode"&gt;@kaisucode&lt;/a&gt;
 actually did some stuff.&lt;/p&gt;

&lt;p&gt;I'll probably do some stuff and maybe update this blog post.&lt;/p&gt;

&lt;p&gt;But we did find a lot of bugs. So that's something!&lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>enchantedForest [6]</title>
      <dc:creator>Kevin Hsu</dc:creator>
      <pubDate>Mon, 27 Jul 2020 09:46:51 +0000</pubDate>
      <link>https://dev.to/enchantedforest/enchantedforest-6-2787</link>
      <guid>https://dev.to/enchantedforest/enchantedforest-6-2787</guid>
      <description>&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%2F4a0gyhw40e8wgziqaqpv.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%2F4a0gyhw40e8wgziqaqpv.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After a 3.5-hour conference call of intense programming (dubbed war council by yours truly), the enchantedForest now has proper background images (the ones posted here were drawn by me) AND plot-relevant dialogue written by Alek. Although it is debatable whether the in-game dialogue is canon to our 20,000-word WIP story. Or maybe the game is canon and our novel with a 20k word-count is fanfic. It's open to the reader's interpretation I guess. Anyway, in those 3.5 hours, we accomplished A Great Deal of Thingamabobs, as Alek would say. &lt;/p&gt;

&lt;p&gt;There were many mentions of using "very hacky methods" and terrifying the crap out of each other, an intro message with code taken from the questBanner functions, and implementation of coin caps cuz you can't &lt;em&gt;possibly&lt;/em&gt; carry that many coins (no we don't talk about credit cards here). We also came to the realization that the mobs weren't actually reading from the stats JSON and fixed that. &lt;/p&gt;

&lt;p&gt;One issue we encountered was that the players could kill the mobs in the room BEFORE receiving the quest from an NPC, and completing that quest is the requirement for accessing the portal to exit the tutorial room. Some ideas we came up with include: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Player does 0 damage before talking to the npc&lt;/li&gt;
&lt;li&gt;Cancelling attack keys&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Temporarily replacing the player.projectiles array with a -1, causing a trivial error whenever the game tries to insert a fireball object into player.projectiles&lt;/p&gt;

&lt;p&gt;(^ the last idea is absolutely horrible I'm so proud of myself for coming up with that)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the end we implemented two solutions. Alek disabled the attack keys prior to the acceptance of the tutorial quest, while I made the server grant the admin account a completed quest list that included "tutorial" on player spawn (this is to allow more convenient testing). &lt;/p&gt;




&lt;p&gt;Notable dialogue during the war council: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Alek: no actually making the if statement check for typeof strings won't wor-&lt;br&gt;
Kevin: try catch&lt;br&gt;
Alek: ...&lt;br&gt;
Alek: fine but only this one time&lt;br&gt;
Kevin: only this one time huh. Oh wait you had another try catch statement in that line there&lt;br&gt;
Alek: that's not me I did NOT write that&lt;br&gt;
Kevin: oh... in that case i am so, so sorry *laughs guiltily*&lt;/p&gt;

&lt;p&gt;*me while writing the try-catch statement*: i am just &lt;em&gt;indulging&lt;/em&gt; in ALL the bad practices today &lt;em&gt;yeaaaahhhhhhhh&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;blockquote&gt;
&lt;p&gt;Alek: wait no restart the server&lt;br&gt;
Kevin: *restarts the server*&lt;br&gt;
Alek: log the output from the developer console&lt;br&gt;
Kevin: *logs output from the developer console*&lt;br&gt;
Alek: now restart it again&lt;br&gt;
Kevin: okay now you're just in denial *restarts again without changing anything*&lt;br&gt;
Alek: did you type the variable correctly?&lt;br&gt;
Kevin: you know what? to satisfy your paranoia i'm even going to open this up in incognito mode and cycle through the whole process again&lt;br&gt;
Alek: at this point I'm just desperate&lt;/p&gt;

&lt;p&gt;me freaking out over another bug and realizing: &lt;br&gt;
"huh its my turn to be in denial now isn't it"&lt;/p&gt;
&lt;/blockquote&gt;




&lt;blockquote&gt;
&lt;p&gt;Kevin: at our current rate of committing stupid things we're going to end up with about a thousand commits on the repo&lt;br&gt;
Alek: i'm fine with that honestly&lt;/p&gt;
&lt;/blockquote&gt;




&lt;blockquote&gt;
&lt;p&gt;Alek: *pushes to master without testing his changes*&lt;br&gt;
Kevin: did you actually just do that&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;And yes, the war council thing is a reference to Madoc from &lt;em&gt;The Cruel Prince&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;Lastly, here is a &lt;em&gt;gorgeous&lt;/em&gt; screenshot of a bug I accidentally created: &lt;br&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%2Fg4z72a3ut4amob9x8jtk.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%2Fg4z72a3ut4amob9x8jtk.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for hanging out with us~&lt;br&gt;
- Kevin&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>developer</category>
    </item>
    <item>
      <title>enchantedForest[5]</title>
      <dc:creator>Alek Westover</dc:creator>
      <pubDate>Sat, 18 Jul 2020 03:13:45 +0000</pubDate>
      <link>https://dev.to/enchantedforest/enchantedforest-4-c2k</link>
      <guid>https://dev.to/enchantedforest/enchantedforest-4-c2k</guid>
      <description>&lt;p&gt;&lt;strong&gt;SAVING SYSTEM&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Today we wrote a saving system for our game. &lt;br&gt;
It's really starting to feel like a real game now!&lt;br&gt;
Once we add real quests, and you can save your quests and level up and stuff it's going to be super epic!&lt;/p&gt;

&lt;p&gt;In writing the saving system we had some adventures.&lt;/p&gt;

&lt;p&gt;Most notably our .git file got corrupted somehow, resulting in massive panic, and &lt;code&gt;cp -r&lt;/code&gt;ing and &lt;code&gt;scp -r&lt;/code&gt;ing. In the end we found a pro solution though: &lt;code&gt;rm -rf .git&lt;/code&gt;, and then &lt;code&gt;cp -r .git&lt;/code&gt; from a different clone of the project. As they say "high quality".&lt;/p&gt;

&lt;p&gt;Anyways, as expressed I'm super hyped about the checkpoints saving your progress.&lt;/p&gt;

&lt;p&gt;For the curious people out there here's what our &lt;code&gt;createAccount&lt;/code&gt; function looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight python"&gt;&lt;code&gt;    &lt;span class="n"&gt;mongo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;users&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;insert_one&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="s"&gt;"username"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"pwd_hash"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;pwd_hash&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"data"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s"&gt;"checkpoint_room"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"llamaPlains"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
        &lt;span class="s"&gt;"health"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s"&gt;"coins"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s"&gt;"mana"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
        &lt;span class="s"&gt;"completedQuests"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt; &lt;span class="p"&gt;],&lt;/span&gt; 
        &lt;span class="s"&gt;"level"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
        &lt;span class="s"&gt;"xp"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
        &lt;span class="s"&gt;"items"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt; &lt;span class="p"&gt;]&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;Also, another really nice thing that we did is we kind of messed around with the stats and stuff. Like we made the mana generation rate more reasonable.&lt;/p&gt;

&lt;p&gt;Also, &lt;a class="comment-mentioned-user" href="https://dev.to/kaisucode"&gt;@kaisucode&lt;/a&gt;
 made an absolutely epic health bar, that is way better than hearts imo. &lt;/p&gt;

&lt;p&gt;Also a little comic strip for your enjoyment:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Alek: yo how do you update something in MongoDB?&lt;br&gt;
Kevin: let me look it up &lt;br&gt;
Alek: wait no I can just drop the database&lt;br&gt;
Alek: how do you insert something into a database?&lt;br&gt;
&lt;em&gt;presses up arrow 100 times&lt;/em&gt;&lt;br&gt;
Alek: found it!&lt;br&gt;
Alek: Aw crap we're hashing the pwds&lt;br&gt;
Alek: loolllll &lt;em&gt;creates account with same pwd, copies hash&lt;/em&gt;&lt;br&gt;
Alek: drops database again&lt;br&gt;
Alek: wait should I drop the database again? ok&lt;br&gt;
Alek: hmmm. &lt;br&gt;
Alek: &lt;code&gt;db.dropDatabase()&lt;/code&gt;&lt;br&gt;
Alek: &lt;code&gt;db.dropDatabase()&lt;/code&gt;&lt;br&gt;
Alek: &lt;code&gt;db.dropDatabase()&lt;/code&gt;&lt;br&gt;
Alek: &lt;code&gt;db.dropDatabase()&lt;/code&gt;&lt;br&gt;
Alek: Why can't I press tab to autocomplete filenames when I'm &lt;code&gt;scp&lt;/code&gt;ing. oh wait. lolll.&lt;br&gt;
Alek: &lt;code&gt;db.dropDatabase()&lt;/code&gt;&lt;br&gt;
Alek: &lt;code&gt;db.dropDatabase()&lt;/code&gt;&lt;br&gt;
Alek: &lt;code&gt;db.dropDatabase()&lt;/code&gt;&lt;br&gt;
Alek: &lt;code&gt;db.dropDatabase()&lt;/code&gt;&lt;br&gt;
Alek: ayy it works! ok we're never allowed to modify the database btw.  &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Next time we're gonna be making the game more legit. In particular, we will be&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;adding the first boss&lt;/li&gt;
&lt;li&gt;adding some more rooms &lt;/li&gt;
&lt;li&gt;making the quests real&lt;/li&gt;
&lt;li&gt;making the npcs real&lt;/li&gt;
&lt;li&gt;making the merchants real&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's going to feel like a real game!&lt;br&gt;
Get ready!!!!!&lt;/p&gt;

&lt;p&gt;Finally, I would like to close with an inspirational thought.&lt;br&gt;
When testing the game saving stuff, we made it save health first. In order to get the test to pass we had to lose health, and then reload the page and have the low health. Getting to a checkpoint took a while though. This prompted the following brilliant realization: if the player died, it respawned close to the checkpoint. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You would kill yourself to get to the checkpoint faster?&lt;br&gt;
Some things are worth dying for.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;pretty much.&lt;/p&gt;

&lt;p&gt;Ah, what an &lt;em&gt;enchanting forest&lt;/em&gt;. &lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>enchantedForest[4]</title>
      <dc:creator>Kevin Hsu</dc:creator>
      <pubDate>Fri, 03 Jul 2020 00:17:36 +0000</pubDate>
      <link>https://dev.to/enchantedforest/enchantedforest-4-29d5</link>
      <guid>https://dev.to/enchantedforest/enchantedforest-4-29d5</guid>
      <description>&lt;p&gt;Today (well technically last night) I dumped most of the Neovim plugins we use into the server configs. Originally I tried to keep the dotfiles on the server to a bare minimum since it had limited storage, buuuuut I decided to just screw that and install ALLLLLLL DE pLUgInS. As Genya Safin from the Grishaverse once said, &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I also shouldn’t have a second buttered roll with my breakfast every morning, but sometimes one must indulge."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;However, I didn't feel like installing everything twice for both of our accounts, so I followed &lt;a href="https://jdhao.github.io/2019/11/10/install_config_neovim_system_wide/"&gt;this link&lt;/a&gt; and set the configs across the system for all users. Cheers to deoplete and Ctrl-/ commenting. &lt;/p&gt;

&lt;p&gt;Anyways. &lt;/p&gt;

&lt;p&gt;In today's session, Alek and I created a Trello board to have actual task management, as our README.md at this point is about 450 lines. Found a bug on the merchant pop-up dialogue disabling movement, filed it on the Trello board, and (very unfortunately) labelled "clean up code" under the "Nice to have" category. Alek got started on adding checkpoints and portals to the tilemap using Tiled, while I worked on revamping our HUD for a more pleasant interface. &lt;/p&gt;

&lt;p&gt;Initially I wanted to jump back to 4 months ago and punch myself in the face for writing the monstrosity that exists in the code base, but then I realized that besides a few naming issues it honestly wasn't THAT bad. Most of the HUD migration could be done by simply moving around the html, with some JQuery portions that required minor tweaks, and then a bit of re-purposing old functions to group the item and quest systems together. Overall it went okayyyyyy. &lt;/p&gt;

&lt;p&gt;Lastly, Alek mentioned something about some strands of code being "a work of art", so stay tuned for an art exhibit with that sweet, gorgeous code in our next developer journal *thumbs up*. &lt;/p&gt;

&lt;p&gt;Signing off for now&lt;br&gt;
- Kevin&lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>enchantedForest[3]</title>
      <dc:creator>Alek Westover</dc:creator>
      <pubDate>Tue, 30 Jun 2020 23:45:11 +0000</pubDate>
      <link>https://dev.to/enchantedforest/enchantedforest-3-1793</link>
      <guid>https://dev.to/enchantedforest/enchantedforest-3-1793</guid>
      <description>&lt;p&gt;Today we did some more work on the enchanted forest&lt;/p&gt;

&lt;p&gt;Pretty much are just setting up the database stuff.&lt;/p&gt;

&lt;p&gt;So we made a little login / create account page, &lt;br&gt;
and it sends a post request to python &lt;br&gt;
hashes your password checks if there are users with the same username, etc etc. &lt;/p&gt;

&lt;p&gt;And eventually you get redirected to the game site with all your user data&lt;/p&gt;

&lt;p&gt;Then our idea is, in the game there will be these things called checkpoints.&lt;/p&gt;

&lt;p&gt;They are physical locations that you can go to &lt;/p&gt;

&lt;p&gt;And save your game state.&lt;/p&gt;

&lt;p&gt;So yeah, there you go. &lt;/p&gt;

&lt;p&gt;When working with a new library I find it's really helpful to use &lt;code&gt;ipdb&lt;/code&gt;, for me its a nice complement to reading the docs, cuz I can play around with the objects and get a feel for them. &lt;/p&gt;

&lt;p&gt;Unfortunately I had some problems with &lt;code&gt;ipdb&lt;/code&gt;, like cancelling stuff after it got a bunch of requests. ¯_(ツ)_/¯ . not really sure what that was about &lt;a class="comment-mentioned-user" href="https://dev.to/kaisucode"&gt;@kaisucode&lt;/a&gt;
's server&lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>enchantedForest[2]</title>
      <dc:creator>Alek Westover</dc:creator>
      <pubDate>Wed, 24 Jun 2020 02:18:20 +0000</pubDate>
      <link>https://dev.to/enchantedforest/enchantedforest-2-2j23</link>
      <guid>https://dev.to/enchantedforest/enchantedforest-2-2j23</guid>
      <description>&lt;p&gt;Today we added Vue to our project!&lt;/p&gt;

&lt;p&gt;We felt like this was going to be better than integrating something like React or Angular with Flask. &lt;/p&gt;

&lt;p&gt;Vue is pretty cool. &lt;/p&gt;

&lt;p&gt;Basically what you do is something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://cdn.jsdelivr.net/npm/vue"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;style &lt;/span&gt;&lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text/css"&lt;/span&gt; &lt;span class="na"&gt;media=&lt;/span&gt;&lt;span class="s"&gt;"screen"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nf"&gt;#blah2&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="no"&gt;red&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt; 
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;


&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;

  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"hmmm"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h1&lt;/span&gt; &lt;span class="na"&gt;v-for=&lt;/span&gt;&lt;span class="s"&gt;"i in asdf"&lt;/span&gt; &lt;span class="na"&gt;:id=&lt;/span&gt;&lt;span class="s"&gt;"'blah'+i"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;i&amp;gt;&lt;/span&gt;
      blah {{ i }}
      &lt;span class="nt"&gt;&amp;lt;/i&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"app"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h1&lt;/span&gt; &lt;span class="na"&gt;v-for=&lt;/span&gt;&lt;span class="s"&gt;"item in items"&lt;/span&gt; &lt;span class="na"&gt;:key=&lt;/span&gt;&lt;span class="s"&gt;"item.message"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;b&amp;gt;&lt;/span&gt;
    {{ item.message }}
    &lt;span class="nt"&gt;&amp;lt;/b&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;myObject&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;Vue&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;el&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#app&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Hello Vue!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;isComplete&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Hello Vue!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;isComplete&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Hello Vue!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Hello Vue!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Hello Vue!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Bar&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;


&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;blah&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;Vue&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;el&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#hmmm&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;asdf&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Pretty cool! (to run it, just do &lt;code&gt;python3 -m http.sever&lt;/code&gt;, we're using CDNs so no installs necessary)&lt;/p&gt;

&lt;p&gt;One thing that we ran into while doing this was&lt;br&gt;
how to integrate Vue with Flask.&lt;br&gt;
In particular, jinja template stuff collides with Vue (both use "mustaches" i.e. &lt;code&gt;{{ }}&lt;/code&gt; for stuff). &lt;/p&gt;

&lt;p&gt;So the way we fixed this, was we just loaded the js thing as a static page. Vue is a tool for making static pages, so this works fine!&lt;br&gt;
Here's the code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;send_static_file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'index.html'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;And, something that I found kind of surprising is that we were still able to do jquery requests even though the page is static!&lt;/p&gt;

&lt;p&gt;So yay! probably next time we can integrate mongodb with our game.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;copolla&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>enchantedForest[1]</title>
      <dc:creator>Kevin Hsu</dc:creator>
      <pubDate>Thu, 18 Jun 2020 20:15:37 +0000</pubDate>
      <link>https://dev.to/enchantedforest/enchantedforest-1-4aol</link>
      <guid>https://dev.to/enchantedforest/enchantedforest-1-4aol</guid>
      <description>&lt;div class="highlight"&gt;&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;ipdb&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="n"&gt;blah&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;blah&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;blah&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;doc&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;blah&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="s"&gt;"_id"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;doc&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;mongo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;users&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;find&lt;/span&gt;&lt;span class="p"&gt;()]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This beautiful, coherent piece of code is what makes up the foundation of our MongoDB back-end. &lt;/p&gt;

&lt;p&gt;We've decided on using MongoDB paired with Flask as our back-end to store user data and provide game-state saving. Players will be able to interact with a "monolith" at certain predetermined save points and send their game state in JSON format to our server, which is another reason why we decided to go with MongoDB instead of MySQL. &lt;/p&gt;

&lt;p&gt;As Alek said: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"What is MongoDB? So it's like you have a json. And then there is a json inside of that (those are called collections). And then inside of the collection, it's like, there's another json inside of it. And in the json spec, it literally says, if &lt;code&gt;x&lt;/code&gt; is a json, then &lt;code&gt;{"x": x}&lt;/code&gt; is a json, so you can have jsons all the way down."  &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;(Our server is a Digital Ocean droplet running CentOS 7)&lt;/p&gt;




&lt;p&gt;In addition, as a PSA to all other fellow MongoDB beginners out there, please note that database names are case-sensitive (this took us a while to figure out). &lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>enchantedForest[0]</title>
      <dc:creator>Alek Westover</dc:creator>
      <pubDate>Fri, 12 Jun 2020 07:41:42 +0000</pubDate>
      <link>https://dev.to/enchantedforest/enchantedforest-init-50bn</link>
      <guid>https://dev.to/enchantedforest/enchantedforest-init-50bn</guid>
      <description>&lt;p&gt;Hey!&lt;br&gt;
Me and Kevin are making a cool game called "The Enchanted Forest"&lt;/p&gt;

&lt;p&gt;It's a single-player RPG.&lt;br&gt;
We're writing pretty much the entire game from scratch, using the really minimal p5.js graphics library.&lt;/p&gt;

&lt;p&gt;So far my favorite features are the weather particle effects (especially lightning) and the boar path finding algorithm!&lt;br&gt;
The collision detection for the player staying on blocks is pretty nice too.&lt;br&gt;
I also really like how we are able to import our maps directly from the Tiled map editor.&lt;/p&gt;

&lt;p&gt;In addition to coding this game, we're also going to be writing the plot for the RPG!&lt;/p&gt;

&lt;p&gt;The project is a WIP. Our code so far can be found &lt;a href="https://github.com/awestover/enchantedForest"&gt;on github&lt;/a&gt; and we have a static version of the game up &lt;a href="http://enchantedforest.surge.sh/"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This blog post series will be about our adventures in making this adventure.&lt;br&gt;
It's going to be a fun time!&lt;/p&gt;

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