<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Room navigation solutions?]]></title><description><![CDATA[<p>Has anyone found a good way to navigate through the rooms in code?  I tried looping through Game.rooms but was only getting rooms I already had creeps in.  I can't find a good way to get an adjacent room's name.  I also tried using Game.map.describeExits but I am only seeing the directions and cannot find a way to get the room name from it.</p>
<p>//only see rooms I already occupy<br>
for(var name in Game.rooms) {<br>
        var myRoom = Game.rooms[name];<br>
}</p>
<p>//not seeing the name property populated for exit object<br>
for(var exit in exits){<br>
        console.log(exit);<br>
        console.log(exit.name);<br>
    }</p>]]></description><link>http://screeps.com/forum/topic/1433/room-navigation-solutions</link><generator>RSS for Node</generator><lastBuildDate>Fri, 12 Jun 2026 17:36:42 GMT</lastBuildDate><atom:link href="http://screeps.com/forum/topic/1433.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 24 Aug 2015 01:51:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Room navigation solutions? on Invalid Date]]></title><description><![CDATA[<p>Has anyone found a good way to navigate through the rooms in code?  I tried looping through Game.rooms but was only getting rooms I already had creeps in.  I can't find a good way to get an adjacent room's name.  I also tried using Game.map.describeExits but I am only seeing the directions and cannot find a way to get the room name from it.</p>
<p>//only see rooms I already occupy<br>
for(var name in Game.rooms) {<br>
        var myRoom = Game.rooms[name];<br>
}</p>
<p>//not seeing the name property populated for exit object<br>
for(var exit in exits){<br>
        console.log(exit);<br>
        console.log(exit.name);<br>
    }</p>]]></description><link>http://screeps.com/forum/post/6372</link><guid isPermaLink="true">http://screeps.com/forum/post/6372</guid><dc:creator><![CDATA[GiantZoc_]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Room navigation solutions? on Invalid Date]]></title><description><![CDATA[<p>If you really need the room name you can just take the current room and manipulate the numbers/directions.</p>
<p>However Game.rooms for that room will not be accessible for you unless you have some sort of presence in it.</p>
<p>If you're trying to navigate to the room then using</p>
<p>creep.pos.findClosest(creep.room.findExitTo(roomName))</p>
<p>is sufficient. The findClosest function is intelligent enough to know it's a room direction and will move there.</p>]]></description><link>http://screeps.com/forum/post/6373</link><guid isPermaLink="true">http://screeps.com/forum/post/6373</guid><dc:creator><![CDATA[Hernanduer]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Room navigation solutions? on Invalid Date]]></title><description><![CDATA[<p>if (Game.spawns[spawn].memory.exitsfromhome[3] != undefined)<br> {<br> console.log(Game.spawns[spawn].memory.exitsfromhome[3]);<br> }</p>
<p>Puts out W7N3.</p>
<p>well, you have to get it with the [ ] is what I am saying. It's in my spawns memory, don't ask ^^</p>
<p> </p>
<p>It took you people 18 months to tell this poor sod that <img
      src="http://screeps.com/forum/plugins/nodebb-plugin-emoji/emoji/android/1f61e.png?v=a1k070tfs06"
      class="not-responsive emoji emoji-android emoji--disappointed"
      title=":("
      alt="😞"
    /></p>]]></description><link>http://screeps.com/forum/post/6374</link><guid isPermaLink="true">http://screeps.com/forum/post/6374</guid><dc:creator><![CDATA[Commandelicious]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Room navigation solutions? on Invalid Date]]></title><description><![CDATA[<p>Your data is coming from memory, which your code must populate from somewhere within your code.  It's not available to other people that aren't using your code base.</p>]]></description><link>http://screeps.com/forum/post/6375</link><guid isPermaLink="true">http://screeps.com/forum/post/6375</guid><dc:creator><![CDATA[roncli]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>