Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

First stab at implementing separate H/V collision detection so Marvin…

… can "wallbang"...
  • Loading branch information...
commit 471e09d0e11da7d06893c4d085adeb499b8321b0 1 parent 4a1a5bd
@dylanbeattie authored
View
181 .idea/workspace.xml
@@ -2,113 +2,19 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="7317696f-fc4e-428e-a525-03340f4ecdb5" name="Default" comment="Removed all hardcoded references to &quot;localhost&quot;. server.js will now listen on all available IPs on the specified port, and the KaboomClient passes window.location.hostname and window.location.port into the SocketClient init() routine. This means Kaboom now runs cleanly on remote servers.">
- <change type="DELETED" beforePath="Q:\KaboomJS\client.js" afterPath="" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/BOMBPAL.jpg" afterPath="$PROJECT_DIR$/etc/BOMBPAL.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/BOMBDUDE.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/BOMBDUDE.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/BONUS.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/BONUS.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/CREDBAR.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/CREDBAR.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/DRAW.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/DRAW.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/FIELD0.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/FIELD0.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/FIELD1.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/FIELD1.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/FIELD10.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/FIELD10.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/FIELD2.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/FIELD2.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/FIELD3.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/FIELD3.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/FIELD4.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/FIELD4.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/FIELD5.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/FIELD5.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/FIELD6.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/FIELD6.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/FIELD7.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/FIELD7.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/FIELD8.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/FIELD8.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/FIELD9.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/FIELD9.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/GLUE0.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/GLUE0.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/GLUE1.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/GLUE1.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/GLUE2.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/GLUE2.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/GLUE3.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/GLUE3.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/GLUE4.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/GLUE4.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/GLUE5.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/GLUE5.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/GLUE6.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/GLUE6.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/HSLOGO.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/HSLOGO.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/IPLOGO.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/IPLOGO.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/JERM.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/JERM.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/KURT.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/KURT.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/KURTHEAD.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/KURTHEAD.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/MAINMENU.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/MAINMENU.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/POWBAD.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/POWBAD.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/POWBOMB.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/POWBOMB.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/POWDISEA.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/POWDISEA.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/POWEBOLA.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/POWEBOLA.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/POWFAST.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/POWFAST.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/POWFLAME.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/POWFLAME.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/POWGOLD.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/POWGOLD.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/POWGRAB.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/POWGRAB.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/POWJELLY.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/POWJELLY.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/POWKICK.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/POWKICK.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/POWPUNCH.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/POWPUNCH.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/POWRAND.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/POWRAND.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/POWSKATE.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/POWSKATE.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/POWSLOW.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/POWSLOW.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/POWSPOOG.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/POWSPOOG.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/POWTRIG.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/POWTRIG.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/QALOGO.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/QALOGO.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/RESULTS.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/RESULTS.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/ROULETTE.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/ROULETTE.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/TEAM0.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/TEAM0.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/TEAM1.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/TEAM1.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/TITLE.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/TITLE.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/VICTORY0.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/VICTORY0.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/VICTORY1.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/VICTORY1.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/VICTORY2.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/VICTORY2.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/VICTORY3.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/VICTORY3.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/VICTORY4.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/VICTORY4.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/VICTORY5.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/VICTORY5.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/VICTORY6.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/VICTORY6.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/VICTORY7.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/VICTORY7.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/VICTORY8.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/VICTORY8.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/VICTORY9.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/VICTORY9.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/RawResources/Graphics/WINZ.jpg" afterPath="$PROJECT_DIR$/etc/RawResources/Graphics/WINZ.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/sounds/bomb.mp3" afterPath="$PROJECT_DIR$/etc/sounds/bomb.mp3" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/sounds/bomb.wav" afterPath="$PROJECT_DIR$/etc/sounds/bomb.wav" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/sounds/die1.mp3" afterPath="$PROJECT_DIR$/etc/sounds/die1.mp3" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/sounds/die1.wav" afterPath="$PROJECT_DIR$/etc/sounds/die1.wav" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/sounds/menu.mp3" afterPath="$PROJECT_DIR$/etc/sounds/menu.mp3" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/sounds/menu.wav" afterPath="$PROJECT_DIR$/etc/sounds/menu.wav" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/images/blank.png" afterPath="$PROJECT_DIR$/public/images/blank.png" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/images/bomb.png" afterPath="$PROJECT_DIR$/public/images/bomb.png" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/images/clear4way.png" afterPath="$PROJECT_DIR$/public/images/clear4way.png" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/images/destroyable-block.png" afterPath="$PROJECT_DIR$/public/images/destroyable-block.png" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/images/field0.jpg" afterPath="$PROJECT_DIR$/public/images/field0.jpg" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/images/player-1.png" afterPath="$PROJECT_DIR$/public/images/player-1.png" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/images/player-2.png" afterPath="$PROJECT_DIR$/public/images/player-2.png" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/images/player-3.png" afterPath="$PROJECT_DIR$/public/images/player-3.png" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/images/player-4.png" afterPath="$PROJECT_DIR$/public/images/player-4.png" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/images/solid-block.png" afterPath="$PROJECT_DIR$/public/images/solid-block.png" />
+ <change type="DELETED" beforePath="D:\WebStorm\KaboomJS\public\images\blank.png" afterPath="" />
+ <change type="DELETED" beforePath="D:\WebStorm\KaboomJS\public\images\destroyable-block.png" afterPath="" />
+ <change type="DELETED" beforePath="D:\WebStorm\KaboomJS\public\images\solid-block.png" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/data/level.txt" afterPath="$PROJECT_DIR$/data/level.txt" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/etc/client_hax.txt" afterPath="$PROJECT_DIR$/etc/client_hax.txt" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/broadcaster.js" afterPath="$PROJECT_DIR$/lib/broadcaster.js" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/package.json" afterPath="$PROJECT_DIR$/package.json" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/css/bomber.css" afterPath="$PROJECT_DIR$/public/css/bomber.css" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/index.html" afterPath="$PROJECT_DIR$/public/index.html" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/js/game/client.js" afterPath="$PROJECT_DIR$/public/js/game/client.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/js/game/kaboom.game.js" afterPath="$PROJECT_DIR$/public/js/game/kaboom.game.js" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/js/game/kaboom.player.js" afterPath="$PROJECT_DIR$/public/js/game/kaboom.player.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/js/game/kaboom.renderer.js" afterPath="$PROJECT_DIR$/public/js/game/kaboom.renderer.js" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/js/game/level.js" afterPath="$PROJECT_DIR$/public/js/game/level.js" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/js/libs/jquery-1.6.1.js" afterPath="$PROJECT_DIR$/public/js/libs/jquery-1.6.1.js" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/js/libs/json2.js" afterPath="$PROJECT_DIR$/public/js/libs/json2.js" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/js/libs/key_status.js" afterPath="$PROJECT_DIR$/public/js/libs/key_status.js" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/js/libs/socket.io.min.js" afterPath="$PROJECT_DIR$/public/js/libs/socket.io.min.js" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/levelTest.htm" afterPath="$PROJECT_DIR$/public/levelTest.htm" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/server/config.json" afterPath="$PROJECT_DIR$/server/config.json" />
- </list>
- <list id="07e85f89-abd1-48f0-9afd-84fa67e279d7" name="Failed commit: Default" comment="Removed all hardcoded references to &quot;localhost&quot;. server.js will now listen on all available IPs on the specified port, and the KaboomClient passes window.location.hostname and window.location.port into the SocketClient init() routine. This means Kaboom now runs cleanly on remote servers.">
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/js/game/client.js" afterPath="$PROJECT_DIR$/public/js/game/client.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/js/game/kaboom.socket.js" afterPath="$PROJECT_DIR$/public/js/game/kaboom.socket.js" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/server.js" afterPath="$PROJECT_DIR$/server.js" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/levelTest.htm" afterPath="$PROJECT_DIR$/public/levelTest.htm" />
</list>
+ <list id="07e85f89-abd1-48f0-9afd-84fa67e279d7" name="Failed commit: Default" comment="Removed all hardcoded references to &quot;localhost&quot;. server.js will now listen on all available IPs on the specified port, and the KaboomClient passes window.location.hostname and window.location.port into the SocketClient init() routine. This means Kaboom now runs cleanly on remote servers." />
<ignored path="KaboomJS.iws" />
<ignored path=".idea/workspace.xml" />
- <file path="$PROJECT_DIR$/server.js" changelist="7317696f-fc4e-428e-a525-03340f4ecdb5" time="1307269827519" ignored="true" />
- <file path="$PROJECT_DIR$/public/js/game/kaboom.socket.js" changelist="7317696f-fc4e-428e-a525-03340f4ecdb5" time="1307280853960" ignored="true" />
- <file path="$PROJECT_DIR$/public/js/game/client.js" changelist="7317696f-fc4e-428e-a525-03340f4ecdb5" time="1307280647328" ignored="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -140,25 +46,34 @@
<file leaf-file-name="client.js" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/public/js/game/client.js">
<provider selected="true" editor-type-id="text-editor">
- <state line="75" column="0" selection-start="1443" selection-end="1443" vertical-scroll-proportion="0.0">
+ <state line="45" column="55" selection-start="1582" selection-end="1582" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="kaboom.socket.js" pinned="false" current="true" current-in-tab="true">
+ <file leaf-file-name="kaboom.socket.js" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/public/js/game/kaboom.socket.js">
<provider selected="true" editor-type-id="text-editor">
- <state line="11" column="26" selection-start="332" selection-end="332" vertical-scroll-proportion="0.3566553">
+ <state line="19" column="29" selection-start="589" selection-end="589" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="kaboom.game.js" pinned="false" current="false" current-in-tab="false">
+ <file leaf-file-name="kaboom.game.js" pinned="false" current="true" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/public/js/game/kaboom.game.js">
<provider selected="true" editor-type-id="text-editor">
- <state line="11" column="2" selection-start="317" selection-end="317" vertical-scroll-proportion="0.0">
+ <state line="18" column="2" selection-start="481" selection-end="481" vertical-scroll-proportion="0.37438422">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="kaboom.renderer.js" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/public/js/game/kaboom.renderer.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="44" column="31" selection-start="1517" selection-end="1517" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
@@ -193,10 +108,11 @@
<option value="$PROJECT_DIR$/public/index.html" />
<option value="$PROJECT_DIR$/public/js/game/kaboom.player.js" />
<option value="$PROJECT_DIR$/public/js/game/level.js" />
- <option value="$PROJECT_DIR$/public/js/game/kaboom.game.js" />
<option value="$PROJECT_DIR$/server.js" />
- <option value="$PROJECT_DIR$/public/js/game/client.js" />
<option value="$PROJECT_DIR$/public/js/game/kaboom.socket.js" />
+ <option value="$PROJECT_DIR$/public/js/game/client.js" />
+ <option value="$PROJECT_DIR$/public/js/game/kaboom.renderer.js" />
+ <option value="$PROJECT_DIR$/public/js/game/kaboom.game.js" />
</list>
</option>
</component>
@@ -226,7 +142,6 @@
<sortByType />
</navigator>
<panes>
- <pane id="Favorites" />
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
@@ -310,26 +225,31 @@
</PATH>
</subPane>
</pane>
+ <pane id="Favorites" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="FileHistory.git4idea.history.GitHistoryProvider_treeOrder0" value="0" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_flatWidth0" value="215" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_flatWidth1" value="233" />
+ <property name="options.splitter.main.proportions" value="0.3" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_treeOrder3" value="3" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_treeOrder1" value="1" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_treeOrder2" value="2" />
+ <property name="options.lastSelected" value="preferences.keymap" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_flatOrder1" value="1" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_treeWidth0" value="230" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_flatOrder0" value="0" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_flatWidth2" value="235" />
- <property name="FileHistory.git4idea.history.GitHistoryProvider_treeWidth3" value="904" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_flatWidth3" value="909" />
+ <property name="FileHistory.git4idea.history.GitHistoryProvider_treeWidth3" value="904" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_treeWidth2" value="230" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_treeWidth1" value="228" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_flatOrder2" value="2" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_flatOrder3" value="3" />
+ <property name="options.splitter.details.proportions" value="0.2" />
+ <property name="options.searchVisible" value="true" />
</component>
<component name="RunManager">
<list size="0" />
@@ -373,23 +293,23 @@
</servers>
</component>
<component name="ToolWindowManager">
- <frame x="-1688" y="-8" width="1696" height="1066" extended-state="6" />
+ <frame x="-8" y="-8" width="1696" height="1004" extended-state="6" />
<editor active="false" />
<layout>
- <window_info id="Messages" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32858709" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Phing Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
- <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.56626505" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.5652174" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" />
<window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
- <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.21187997" sideWeight="0.67141294" order="0" side_tool="false" content_ui="tabs" />
+ <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.21800368" sideWeight="0.74735606" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
- <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25301206" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
+ <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25264394" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+ <window_info id="Messages" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32858709" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
@@ -451,9 +371,7 @@
</entry>
<entry file="file://$PROJECT_DIR$/public/index.html">
<provider selected="true" editor-type-id="text-editor">
- <state line="24" column="49" selection-start="607" selection-end="607" vertical-scroll-proportion="0.1">
- <folding />
- </state>
+ <state line="24" column="49" selection-start="607" selection-end="607" vertical-scroll-proportion="0.1" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/js/game/level.js">
@@ -463,42 +381,43 @@
</entry>
<entry file="file://$PROJECT_DIR$/public/js/game/kaboom.player.js">
<provider selected="true" editor-type-id="text-editor">
- <state line="47" column="21" selection-start="1003" selection-end="1003" vertical-scroll-proportion="0.22428331">
- <folding />
- </state>
+ <state line="47" column="21" selection-start="1003" selection-end="1003" vertical-scroll-proportion="0.22428331" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/server.js">
<provider selected="true" editor-type-id="text-editor">
- <state line="19" column="0" selection-start="573" selection-end="573" vertical-scroll-proportion="0.0">
- <folding />
- </state>
+ <state line="19" column="0" selection-start="573" selection-end="573" vertical-scroll-proportion="0.0" />
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/public/js/game/kaboom.game.js">
+ <entry file="file://$PROJECT_DIR$/data/level.txt">
<provider selected="true" editor-type-id="text-editor">
- <state line="11" column="2" selection-start="317" selection-end="317" vertical-scroll-proportion="0.0">
+ <state line="13" column="0" selection-start="234" selection-end="234" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/public/js/game/kaboom.socket.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="19" column="29" selection-start="589" selection-end="589" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/data/level.txt">
+ <entry file="file://$PROJECT_DIR$/public/js/game/client.js">
<provider selected="true" editor-type-id="text-editor">
- <state line="13" column="0" selection-start="234" selection-end="234" vertical-scroll-proportion="0.0">
+ <state line="45" column="55" selection-start="1582" selection-end="1582" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/public/js/game/client.js">
+ <entry file="file://$PROJECT_DIR$/public/js/game/kaboom.renderer.js">
<provider selected="true" editor-type-id="text-editor">
- <state line="75" column="0" selection-start="1443" selection-end="1443" vertical-scroll-proportion="0.0">
+ <state line="44" column="31" selection-start="1517" selection-end="1517" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/public/js/game/kaboom.socket.js">
+ <entry file="file://$PROJECT_DIR$/public/js/game/kaboom.game.js">
<provider selected="true" editor-type-id="text-editor">
- <state line="11" column="26" selection-start="332" selection-end="332" vertical-scroll-proportion="0.3566553">
+ <state line="18" column="2" selection-start="481" selection-end="481" vertical-scroll-proportion="0.37438422">
<folding />
</state>
</provider>
View
BIN  public/images/blank.png
Deleted file not rendered
View
BIN  public/images/destroyable-block.png
Deleted file not rendered
View
BIN  public/images/solid-block.png
Deleted file not rendered
View
2  public/js/game/client.js
@@ -37,6 +37,7 @@ KaboomClient.prototype = {
var key = $.hotkeys.specialKeys[event.which] || String.fromCharCode(event.which).toLowerCase();
var playerActuallyChanged = window.player.go(key);
if (playerActuallyChanged) this.notifyPlayerChanged();
+ console.log("KEY_DOWN" + window.player.toString());
return (this.sendKeyToBrowser(key));
},
@@ -49,6 +50,7 @@ KaboomClient.prototype = {
var key = $.hotkeys.specialKeys[event.which] || String.fromCharCode(event.which).toLowerCase();
window.player.stop(key);
this.notifyPlayerChanged();
+ console.log("KEY_UP" + window.player.toString());
return (this.sendKeyToBrowser(key));
},
notifyPlayerChanged: function() {
View
40 public/js/game/kaboom.game.js
@@ -12,7 +12,7 @@ if (typeof require == "function") {
};
var KaboomGame = function (levelMap) {
- this.level = new Level(levelMap);
+ this.level = new KaboomLevel(levelMap);
this.players = [];
this.DISTANCE = 5;
this.TILE_SIZE = 48;
@@ -23,7 +23,7 @@ KaboomGame.prototype = {
copyStateFrom : function(gameState) {
this.DISTANCE = gameState.DISTANCE;
this.TILE_SIZE = gameState.TILE_SIZE;
- this.level = this.level || new Level();
+ this.level = this.level || new KaboomLevel();
this.level.copyStateFrom(gameState.level);
for (var i = 0; i < gameState.players.length; i++) {
var sourcePlayer = gameState.players[i];
@@ -99,18 +99,28 @@ KaboomGame.prototype = {
y: game.DISTANCE * p.velocity.dy
});
- var hitTestRect = playerRect.contract(4);
- var canMove = true;
+ // We need to handle horizontal and vertical collision detection separately
+ // so that Marvin can run ALONG walls but not run THROUGH them
+ var verticalHitTestRect = playerRect.contract(4);
+ verticalHitTestRect.left += 8;
+ verticalHitTestRect.width -= 16;
+
+ var horizontalHitTestRect = playerRect.contract(4);
+ horizontalHitTestRect.left += 8;
+ horizontalHitTestRect.width -= 16;
+
+ var canMoveVertically = true;
+ var canMoveHorizontally = true;
- game.level.forEachIntersectingTile(hitTestRect, game, function(tile) {
- if (tile.solid) {
- canMove = false;
- }
+ game.level.forEachIntersectingTile(verticalHitTestRect, game, function(tile) {
+ if (tile.solid) canMoveVertically = false;
});
-
- if (canMove) {
- p.position = playerRect.topLeft;
- }
+
+ game.level.forEachIntersectingTile(horizontalHitTestRect, game, function(tile) {
+ if (tile.solid) canMoveHorizontally = false;
+ });
+ if (canMoveHorizontally) p.position.x = playerRect.x;
+ if (canMoveVertically) p.position.y = playerRect.y;
});
}
};
@@ -125,7 +135,7 @@ TileType = {
Blank: 2
};
-function Level(initialTileMap) {
+function KaboomLevel(initialTileMap) {
/*this.rows = 13;
this.cols = 17;*/
@@ -246,7 +256,7 @@ function Tile (solid, tileType, row, col) {
this.tileType = tileType;
this.row = row;
this.col = col;
-};
+}
Tile.prototype = {
getBounds: function(game) {
@@ -289,7 +299,7 @@ Rectangle.prototype = {
translate: function(point) {
return new Rectangle(this.x + point.x, this.y + point.y, this.width, this.height);
},
-
+
contract: function(amount) {
return new Rectangle(this.x + amount, this.y + amount, this.width - (amount * 2), this.height - (amount * 2));
},
View
6 public/js/game/kaboom.renderer.js
@@ -38,9 +38,9 @@ Tile.prototype.showBoundingBox = function(layer, game) {
function KaboomRenderer(opts) {
var game = opts.game;
- this.itemImages = ["images/solid-block.png",
- "images/destroyable-block.png",
- "images/blank.png" ];
+ this.itemImages = ["images/" + game.TILE_SIZE + "/solid-block.png",
+ "images/" + game.TILE_SIZE + "/destroyable-block.png",
+ "images/" + game.TILE_SIZE + "/blank.png" ];
this.initialise = function() {
var level = game.level;
View
2  public/js/game/kaboom.socket.js
@@ -91,9 +91,7 @@ KaboomSocket.prototype = {
this.client.playerChangedDirection(msg.playerState);
break;
}
- ;
}
- ;
},
join : function() {
View
2  public/levelTest.htm
@@ -32,7 +32,7 @@
'*4 ----------- 2*\n' +
'*****************';
- var level = new Level();
+ var level = new KaboomLevel();
level.parseLevel(levelMap);
game = new KaboomGame(level);
Please sign in to comment.
Something went wrong with that request. Please try again.