Permalink
Browse files

New engine

  • Loading branch information...
1 parent 5069a67 commit 6ea069aa6f16aaa975fd18c5e82bfa23d9bd2c58 @st33d committed Oct 26, 2011
Showing with 8,021 additions and 4,573 deletions.
  1. +5 −3 README
  2. +8 −104 TODO.txt
  3. BIN bin/game.swf
  4. +8 −4 bin/index.html
  5. +2 −1 game.as3proj
  6. +10 −7 obj/gameConfig.old
  7. +10 −7 obj/gameConfig.xml
  8. +246 −361 src/Game.as
  9. +37 −78 src/Library.as
  10. BIN src/assets/assets.swc
  11. BIN src/assets/assets.swf
  12. BIN src/assets/menu_sword.png
  13. BIN src/assets/overworld.png
  14. +86 −0 src/com/adobe/serialization/json/JSON.as
  15. +352 −0 src/com/adobe/serialization/json/JSONDecoder.as
  16. +323 −0 src/com/adobe/serialization/json/JSONEncoder.as
  17. +92 −0 src/com/adobe/serialization/json/JSONParseError.as
  18. +92 −0 src/com/adobe/serialization/json/JSONToken.as
  19. +69 −0 src/com/adobe/serialization/json/JSONTokenType.as
  20. +708 −0 src/com/adobe/serialization/json/JSONTokenizer.as
  21. +209 −166 src/com/robotacid/ai/Brain.as
  22. +91 −4 src/com/robotacid/ai/DungeonGraph.as
  23. +18 −1 src/com/robotacid/ai/Node.as
  24. +51 −59 src/com/robotacid/dungeon/Content.as
  25. +50 −52 src/com/robotacid/dungeon/DungeonBitmap.as
  26. +128 −71 src/com/robotacid/dungeon/Map.as
  27. +531 −510 src/com/robotacid/engine/Character.as
  28. +0 −188 src/com/robotacid/engine/CharacterAttributes.as
  29. +27 −19 src/com/robotacid/engine/Chest.as
  30. +40 −0 src/com/robotacid/engine/ColliderEntity.as
  31. +64 −103 src/com/robotacid/engine/Corpse.as
  32. +72 −79 src/com/robotacid/engine/Critter.as
  33. +84 −110 src/com/robotacid/engine/Effect.as
  34. +33 −34 src/com/robotacid/engine/Entity.as
  35. +48 −82 src/com/robotacid/engine/Head.as
  36. +179 −229 src/com/robotacid/engine/Item.as
  37. +32 −151 src/com/robotacid/engine/MapRenderer.as
  38. +91 −91 src/com/robotacid/engine/MapTileConverter.as
  39. +69 −29 src/com/robotacid/engine/Minion.as
  40. +101 −96 src/com/robotacid/engine/Missile.as
  41. +24 −20 src/com/robotacid/engine/Monster.as
  42. +14 −40 src/com/robotacid/engine/MouseMissile.as
  43. +182 −121 src/com/robotacid/engine/Player.as
  44. +67 −0 src/com/robotacid/engine/Portal.as
  45. +0 −70 src/com/robotacid/engine/Stairs.as
  46. +75 −30 src/com/robotacid/engine/Stone.as
  47. +56 −39 src/com/robotacid/engine/Trap.as
  48. +162 −0 src/com/robotacid/engine/characterStats.json
  49. +124 −0 src/com/robotacid/engine/itemStats.json
  50. +0 −86 src/com/robotacid/gfx/BlitBackgroundClip.as
  51. +0 −51 src/com/robotacid/gfx/BloodClip.as
  52. +0 −133 src/com/robotacid/gfx/Camera.as
  53. +110 −0 src/com/robotacid/gfx/CanvasCamera.as
  54. +33 −0 src/com/robotacid/gfx/CaptureBitmap.as
  55. +24 −30 src/com/robotacid/gfx/DebrisFX.as
  56. +14 −13 src/com/robotacid/gfx/FX.as
  57. +158 −0 src/com/robotacid/gfx/ItemMovieClip.as
  58. +39 −41 src/com/robotacid/gfx/LightMap.as
  59. +15 −13 src/com/robotacid/gfx/Lightning.as
  60. +1 −0 src/com/robotacid/gfx/Renderer.as
  61. +0 −158 src/com/robotacid/phys/Block.as
  62. +208 −157 src/com/robotacid/phys/Cast.as
  63. +738 −327 src/com/robotacid/phys/Collider.as
  64. +151 −0 src/com/robotacid/phys/CollisionWorld.as
  65. +0 −96 src/com/robotacid/phys/Particle.as
  66. +0 −66 src/com/robotacid/phys/Spring.as
  67. +1 −0 src/com/robotacid/sound/SoundLoop.as
  68. +486 −9 src/com/robotacid/sound/SoundManager.as
  69. +75 −0 src/com/robotacid/sound/SoundQueue.as
  70. +8 −3 src/com/robotacid/ui/Console.as
  71. +1 −1 src/com/robotacid/ui/Key.as
  72. +55 −49 src/com/robotacid/ui/MiniMap.as
  73. +37 −0 src/com/robotacid/ui/MinimapFeature.as
  74. +21 −39 src/com/robotacid/ui/QuickSave.as
  75. +262 −87 src/com/robotacid/ui/TextBox.as
  76. +15 −7 src/com/robotacid/ui/menu/EnchantmentList.as
  77. +143 −68 src/com/robotacid/ui/menu/GameMenu.as
  78. +179 −0 src/com/robotacid/ui/menu/GiveItemMenuList.as
  79. +8 −8 src/com/robotacid/ui/menu/HotKeyMap.as
  80. +16 −23 src/com/robotacid/ui/menu/InventoryMenuList.as
  81. +427 −130 src/com/robotacid/ui/menu/Menu.as
  82. +7 −0 src/com/robotacid/ui/menu/MenuList.as
  83. +6 −8 src/com/robotacid/ui/menu/MenuOption.as
  84. +5 −5 src/com/robotacid/ui/menu/MenuOptionStack.as
  85. +4 −4 src/com/robotacid/ui/menu/ToggleMenuOption.as
  86. +55 −0 src/com/robotacid/util/FPS.as
  87. +1 −1 src/com/robotacid/util/RLE.as
  88. +47 −0 src/com/robotacid/util/XorRandom.as
  89. +1 −1 src/com/robotacid/util/array/randomiseArray.as
View
8 README
@@ -2,8 +2,10 @@ Red Rogue is a platformer-roguelike written in Flex and compiled with FlashDevel
The game is played with arrow keys (or w,a,s,d) and the space bar.
-The arrow keys move the player in a fashion like loderunner (no jumping). This is because I have replicated classic Rogue's fighting method of shoving your opponent to death. With the added classic platformer mechanic that anyone can instantly be killed by jumping on their head.
+There is no jump. Landing on an opponent's head causes knockback-stun.
-For this reason, permadeath will not be a default option. (Permadeath can fuck right off as far as I'm concerned, it never improved any roguelike for me and never will. But I'll include an option for purists when it's finished. "Ooh, but it's not a roguelike if you even have an optional save mechanic!" you say. Tell you what, download the source, comment out the load option in GameMenu.as, recompile it and piss off you sanctimonious cunt.)
+The space bar opens a menu, from there the inventory can be accessed to equip you and your minion, to cast spells, search for traps and other things like saving and loading.
-The space bar opens a menu, from there the inventory can be accessed to equip you and your minion, to cast spells, search for traps and other things like saving and loading.
+There also default hot-key-bindings, go to the website and click on "instructions" to discover what they are.
+
+If you were more interested in the old revision of the code, you can work with the branch "old".
View
112 TODO.txt
@@ -1,39 +1,16 @@
-Rewrite hotkeys to allow binding to any key
+more ledges need padding
-Error when crushed after loading:
-
-TypeError: Error #1009: Cannot access a property or method of a null object reference.
- at com.robotacid.engine::Effect/dismiss()[C:\Documents and Settings\Aaron\My Documents\Flash\platform rogue\163\src\com\robotacid\engine\Effect.as:384]
- at com.robotacid.engine::Character/removeEffects()[C:\Documents and Settings\Aaron\My Documents\Flash\platform rogue\163\src\com\robotacid\engine\Character.as:585]
- at com.robotacid.engine::Character/death()[C:\Documents and Settings\Aaron\My Documents\Flash\platform rogue\163\src\com\robotacid\engine\Character.as:508]
- at com.robotacid.engine::Player/death()[C:\Documents and Settings\Aaron\My Documents\Flash\platform rogue\163\src\com\robotacid\engine\Player.as:167]
- at com.robotacid.engine::Character/processActions()[C:\Documents and Settings\Aaron\My Documents\Flash\platform rogue\163\src\com\robotacid\engine\Character.as:487]
- at com.robotacid.engine::Character/main()[C:\Documents and Settings\Aaron\My Documents\Flash\platform rogue\163\src\com\robotacid\engine\Character.as:221]
- at com.robotacid.engine::Player/main()[C:\Documents and Settings\Aaron\My Documents\Flash\platform rogue\163\src\com\robotacid\engine\Player.as:109]
- at Game/main()[C:\Documents and Settings\Aaron\My Documents\Flash\platform rogue\163\src\Game.as:565]
-
-either the effect target reference is null or the effects list for the target is null
-
-
-*the rune pass through has changed to a hit with no effect - still needs investigation
-
-*pickup bug - very rarely an item will not get removed from the map when being picked up. Error throwing in place
-
-thrown rune triggered wrong effect - investigate
-
-clip renderer on small levels (background tiles show through underneath on odd sized small levels)
-
-racial abilities - implement by having a personal effects list, add a new effect source - RACIAL:
- troll regeneration
- shadow monster - all walls are ledges
+AI issues:
+ walks into wall constantly when too close
+ monster AI jitter on ladder observed - investigate
+ can get stuck on the edge of a ledge where the character's center point is not inside a node
+ possible dithering when a monster may get caught between meta-heuristic paths of equal value
help on menu has not been fully written out
level generator overhaul:
distribution tactics -
- where to place monsters
- where to place chests
- where to place traps
+ distribution bubbles
the overworld (accessible from level 1 and portals):
backdrop - single screen full colour (contrast to black and white dungeon)
@@ -42,78 +19,5 @@ the overworld (accessible from level 1 and portals):
the healstone
code done - create graphic
-build demo 5
-
-elaborate on previous milestones:
- more monsters - new monsters each level
- more items - shoes, crying, etc
- more runes - as many as I can think of
- more traps - same again
- boss fights - room blocking trolls and the macguffin holding demon
- balancing - call out for play testers
- more easter eggs (konami code and collosal cave code need to have their effect assigned)
-
-move towards final build - update final build on a regular basis
-
-
-EXTRA ELEMENTS TO DO:
- tutorial:
- the game needs a teaching mode
-
- title screen:
-
-
- ui:
- more apple:
- fade in and out the menu
- roll the console printer and set an event queue for print
- smooth roll the options and smoothly move the current selection left and right
- for left and right, we can have a screen grab of the menulist that's being discarded fade out in the slide and have the new menulist fade in
- for this I would create a transistion menu change (as well as a state change - rendering and state change would need to be isolated from each other - probably for the best I think)
-
- spells:
- confusion (flip controls - will require changing the key constants to internal variables, for the player, flip the screen also) - this could work as a charm spell on monsters, making them additional minions
- haste (just need to boost attack times and movement speed)
- slow (just need to cripple attack times and movement speed)
- chaos (random effect, and will need to modify GameMenu to show random names)
- identify (detail information about monsters or the player or add a random ability to an item)
- thorns (reflect damage)
- power (attacks have a chance to throw the victim into a wall or other monsters)
- fear (overrides enemy AI - but what does it do to you? makes you hallucinate? that would be pretty funny)
-
- monsters:
- story - an old man that spouts lines of generative story to the console and bars the player's progress out of the first room until they kill him (story killed by rogue)
- wraiths - shadow monsters (can walk through walls)
- mimic (that chest just bit me!
- even better - high level mimics mimic stairways!)
- vampire (steals health and adds it to its own)
- leprechaun (steals items when it attacks)
- floating eyes (casts paralysis? - this is a dangerous effect to have as rune, maybe combo with slow)
- graded monsters (simply harder or weaker)
- ogre - big fucker, perhaps be bigger than corridors
- hobgoblins - bigger goblins
- umber hulk - insectoid monster with confusion attack
- slimes - worse than kobolds?
- tengu - teleporting demon
- balrog - a red character, players should shit themselves when confronted with one
-
- champion monsters (how do I illustrate this?), will possess magic items and can rally surrounding monsters to mob the player
-
- sounds:
- menu move - can get around chained menu actions by having a sound toggle in the menu code
-
- graphics:
- background wall features
- foreground (would I be able to render the fx before the tile layers? it seems the only way it could work)
- random detritus (could it go on the block layer without harming it?)
-
- ai:
- rally - a monster could see the character and could call other monsters to aid, there should be a rallying pose and a shockwave type graphic, implying he's just told everyone on screen to mob the player
-
- help:
-
- stats:
- should the items and characters be reading their base stats and per level stats from something
- like an xml file? Or am I just going to end up dumping all the xml into pretty much what I've got
- in the classes already?
+rally - a monster could see the character and could call other monsters to aid, there should be a rallying pose and a shockwave type graphic, implying he's just told everyone on screen to mob the player
View
Binary file not shown.
View
@@ -66,7 +66,7 @@
var attributes = {
id:"mappingdemo"
};
- swfobject.embedSWF("game.swf", "altContent", "640", "480", "10.0.0", "expressInstall.swf", flashvars, params, attributes);
+ swfobject.embedSWF("game.swf?nocache=" + Date.now().toString(), "altContent", "640", "480", "10.0.0", "expressInstall.swf", flashvars, params, attributes);
</script>
<link rel="stylesheet" type="text/css" href="styles.css"/>
</head>
@@ -85,13 +85,17 @@
</div>
<p><a href="javascript:toggleElement('#instructions');">Instructions</a></p>
<div id="instructions">
- <p>Use cursor keys or w,a,s,d to move. Press space bar to access the menu screen and pause the game. Keys can be redefined from there.</p>
- <p>Run into monsters to attack, or jump on their heads to instantly kill them. Press up to pick up loot.</p>
- <p>Equip loot from the inventory menu.</p>
+ <p>Use cursor keys or w,a,s,d to move. Press space bar to access the menu screen and pause the game. Keys and hot-keys can be redefined from there.</p>
+ <p>Default bindings for hot-keys are E:exit the level, F:shoot/throw current weapon, Z:search for traps, X:disarm trap, C:summon minion</p>
+ <p>Run into monsters to attack, or jump on their heads to knockback-stun them. If a character is stomped with no room to move, they are instantly killed (crushed).
+ <p>Press up to pick up loot.</p>
+ <p>Equip yourself and your minion with loot from the inventory menu.</p>
+ <p>Use magic by exploring the options available with runes you collect in your inventory menu. Runes have different effects on different things - it's up to you to figure it out.</p>
</div>
<p><a href="javascript:toggleElement('#log');">Log</a></p>
<div id="log"></div>
<p><a href="http://github.com/st33d/red-rogue">Source code</a></p>
+ <p><a href="http://forums.tigsource.com/index.php?topic=8467.0">Red Rogue is in a state of progressive development.</a></p>
</div>
</body>
View
@@ -26,6 +26,7 @@
<option optimize="True" />
<option showActionScriptWarnings="True" />
<option showBindingWarnings="True" />
+ <option showInvalidCSS="True" />
<option showDeprecationWarnings="True" />
<option showUnusedTypeSelectorWarnings="True" />
<option strict="True" />
@@ -42,7 +43,7 @@
</build>
<!-- SWC Include Libraries -->
<includeLibraries>
- <!-- example: <element path="..." /> -->
+ <element path="src\assets\assets.swc" />
</includeLibraries>
<!-- SWC Libraries -->
<libraryPaths>
View
@@ -4,25 +4,28 @@
<flex-config>
<target-player>10.0.0</target-player>
<compiler>
- <define>
+ <define append="true">
<name>CONFIG::debug</name>
<value>true</value>
</define>
- <define>
+ <define append="true">
<name>CONFIG::release</name>
<value>false</value>
</define>
- <define>
+ <define append="true">
<name>CONFIG::timeStamp</name>
- <value>'23/08/2010'</value>
+ <value>'25/10/2011'</value>
</define>
<source-path append="true">
- <path-element>C:\Documents and Settings\Aaron\My Documents\Flash\platform rogue\174_new_renderer\src</path-element>
- <path-element>C:\Program Files\FlashDevelop\Library\AS3\classes</path-element>
+ <path-element>C:\Users\st33d\Documents\rogue\219\src</path-element>
+ <path-element>C:\Program Files (x86)\FlashDevelop\Library\AS3\classes</path-element>
</source-path>
+ <include-libraries>
+ <library>C:\Users\st33d\Documents\rogue\219\src\assets\assets.swc</library>
+ </include-libraries>
</compiler>
<file-specs>
- <path-element>C:\Documents and Settings\Aaron\My Documents\Flash\platform rogue\174_new_renderer\src\Preloader.as</path-element>
+ <path-element>C:\Users\st33d\Documents\rogue\219\src\Preloader.as</path-element>
</file-specs>
<default-background-color>#FFFFFF</default-background-color>
<default-frame-rate>30</default-frame-rate>
View
@@ -4,25 +4,28 @@
<flex-config>
<target-player>10.0.0</target-player>
<compiler>
- <define>
+ <define append="true">
<name>CONFIG::debug</name>
<value>true</value>
</define>
- <define>
+ <define append="true">
<name>CONFIG::release</name>
<value>false</value>
</define>
- <define>
+ <define append="true">
<name>CONFIG::timeStamp</name>
- <value>'23/08/2010'</value>
+ <value>'25/10/2011'</value>
</define>
<source-path append="true">
- <path-element>C:\Documents and Settings\Aaron\My Documents\Flash\platform rogue\174_new_renderer\src</path-element>
- <path-element>C:\Program Files\FlashDevelop\Library\AS3\classes</path-element>
+ <path-element>C:\Users\st33d\Documents\rogue\219\src</path-element>
+ <path-element>C:\Program Files (x86)\FlashDevelop\Library\AS3\classes</path-element>
</source-path>
+ <include-libraries>
+ <library>C:\Users\st33d\Documents\rogue\219\src\assets\assets.swc</library>
+ </include-libraries>
</compiler>
<file-specs>
- <path-element>C:\Documents and Settings\Aaron\My Documents\Flash\platform rogue\174_new_renderer\src\Preloader.as</path-element>
+ <path-element>C:\Users\st33d\Documents\rogue\219\src\Preloader.as</path-element>
</file-specs>
<default-background-color>#FFFFFF</default-background-color>
<default-frame-rate>30</default-frame-rate>
Oops, something went wrong.

0 comments on commit 6ea069a

Please sign in to comment.