Skip to content

Commit

Permalink
revised sniping ai (discovered clause that makes snipers freeze when …
Browse files Browse the repository at this point in the history
…above targets, added defaulting to hand 2 hand combat when too close), added sanity check when destroying chaos walls (may not have solved invisible walls in Chaos), story tidied up post proof-reading
  • Loading branch information
st33d committed Nov 20, 2012
1 parent 98d343d commit 4c293d3
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 34 deletions.
10 changes: 5 additions & 5 deletions TODO.txt
@@ -1,11 +1,10 @@
Change log: fixed security restriction error when saving settings
Change log: fixed security restriction error when saving settings, revised sniping ai (discovered clause that makes snipers freeze when above targets, added defaulting to hand 2 hand combat when too close), added sanity check when destroying chaos walls (may not have solved invisible walls in Chaos), story tidied up post proof-reading

Bug hunt
balrog frozen after smite attack, stuck to wall - no further info (perhaps secret wall? or chaos wall?)
chaos walls frozen without graphics rendered and no walls beneath them (activated, not on chaos wall render list?)
sniper behaviour too cowardly
weapon on player and minion disappearing
catastrophic ai faliure with sniper - if sniper is above target it can get in a multiple path loop
fuck knows
chaos walls frozen without graphics rendered and no walls beneath them (activated, not on chaos wall render list?)
added collider.world check on death - cannot reproduce this AT ALL

website
banner
Expand All @@ -14,4 +13,5 @@ website
link to Windows
link to OSX.zip
link to swf.zip
FAQ

Binary file removed bin/game.swf
Binary file not shown.
8 changes: 4 additions & 4 deletions obj/gameConfig.old
Expand Up @@ -14,18 +14,18 @@
</define>
<define append="true">
<name>CONFIG::timeStamp</name>
<value>'17/11/2012'</value>
<value>'19/11/2012'</value>
</define>
<source-path append="true">
<path-element>C:\Users\st33d\Documents\rogue\459\src</path-element>
<path-element>C:\Users\st33d\Documents\rogue\460\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\459\src\assets\assets.swc</library>
<library>C:\Users\st33d\Documents\rogue\460\src\assets\assets.swc</library>
</include-libraries>
</compiler>
<file-specs>
<path-element>C:\Users\st33d\Documents\rogue\459\src\Preloader.as</path-element>
<path-element>C:\Users\st33d\Documents\rogue\460\src\Preloader.as</path-element>
</file-specs>
<default-background-color>#FFFFFF</default-background-color>
<default-frame-rate>30</default-frame-rate>
Expand Down
8 changes: 4 additions & 4 deletions obj/gameConfig.xml
Expand Up @@ -14,18 +14,18 @@
</define>
<define append="true">
<name>CONFIG::timeStamp</name>
<value>'17/11/2012'</value>
<value>'20/11/2012'</value>
</define>
<source-path append="true">
<path-element>C:\Users\st33d\Documents\rogue\459\src</path-element>
<path-element>C:\Users\st33d\Documents\rogue\460\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\459\src\assets\assets.swc</library>
<library>C:\Users\st33d\Documents\rogue\460\src\assets\assets.swc</library>
</include-libraries>
</compiler>
<file-specs>
<path-element>C:\Users\st33d\Documents\rogue\459\src\Preloader.as</path-element>
<path-element>C:\Users\st33d\Documents\rogue\460\src\Preloader.as</path-element>
</file-specs>
<default-background-color>#FFFFFF</default-background-color>
<default-frame-rate>30</default-frame-rate>
Expand Down
2 changes: 1 addition & 1 deletion src/Game.as
Expand Up @@ -74,7 +74,7 @@

public class Game extends Sprite {

public static const BUILD_NUM:int = 459;
public static const BUILD_NUM:int = 460;

public static const TEST_BED_INIT:Boolean = false;
public static const ONLINE:Boolean = true;
Expand Down
13 changes: 7 additions & 6 deletions src/com/robotacid/ai/Brain.as
Expand Up @@ -115,9 +115,11 @@
public static const FOLLOW_FLEE_EDGE_SQ:Number = FOLLOW_FLEE_EDGE * FOLLOW_FLEE_EDGE;

public static const SNIPE_CHASE_EDGE:Number = Game.SCALE * 5;
public static const SNIPE_FLEE_EDGE:Number = Game.SCALE * 2;
public static const SNIPE_FLEE_EDGE:Number = Game.SCALE * 2.5;
public static const SNIPE_HAND_2_HAND_EDGE:Number = Game.SCALE * 1;
public static const SNIPE_CHASE_EDGE_SQ:Number = SNIPE_CHASE_EDGE * SNIPE_CHASE_EDGE;
public static const SNIPE_FLEE_EDGE_SQ:Number = SNIPE_FLEE_EDGE * SNIPE_FLEE_EDGE;
public static const SNIPE_HAND_2_HAND_SQ:Number = SNIPE_HAND_2_HAND_EDGE * SNIPE_HAND_2_HAND_EDGE;

public static function initCharacterLists():void{
playerCharacters = new Vector.<Character>();
Expand Down Expand Up @@ -793,11 +795,13 @@
} else {
if(char.collider.state == Collider.HOVER){
avoid(target);
} else if(char.mapY >= target.mapY){
} else {
var vx:Number = targetX - charPos.x;
var vy:Number = targetY - charPos.y;
var distSq:Number = vx * vx + vy * vy;
if(distSq < SNIPE_FLEE_EDGE_SQ){
if(distSq < SNIPE_HAND_2_HAND_EDGE){
chase(target);
} else if(distSq < SNIPE_FLEE_EDGE_SQ){
avoid(target);
} else if(distSq > SNIPE_CHASE_EDGE_SQ){
chase(target);
Expand All @@ -812,10 +816,7 @@
shootWhenReady(target, 10, ignore);
}
}
} else {
clear();
}

}
}

Expand Down
2 changes: 1 addition & 1 deletion src/com/robotacid/engine/ChaosWall.as
Expand Up @@ -346,7 +346,7 @@ package com.robotacid.engine {
if(chaosWalls[target.y][target.x]) chaosWalls[target.y][target.x].callMain = true;
}
active = false;
collider.world.removeCollider(collider);
if(collider.world) collider.world.removeCollider(collider);
}

override public function render():void {
Expand Down
12 changes: 6 additions & 6 deletions src/com/robotacid/engine/Epilogue.as
Expand Up @@ -105,7 +105,7 @@ package com.robotacid.engine {
if(!UserData.settings.ascended){
lines = lines.concat([
"like her husband before her, red rogue was given a new name on her return",
"having heard of her use of the rune of time and her constant cheating of death, they named her...",
"hearing of her use of the rune of time and her constant cheating of death, they named her...",
"immortal"
]);
UserData.settings.ascended = true;
Expand All @@ -124,7 +124,7 @@ package com.robotacid.engine {
if(game.minion){
lines.push("offers of marriage were made to her, dying on their lips as they saw " + game.minion.nameToString() + " advance following her rebuttal");
}
lines.push("on her death bed her people were divided, those doubting her title rioting. those defending it becoming cruel vigilantes. it was not long before the kingdom was at war with neighbours who sought to take advantage.");
lines.push("on her death bed, her people were divided. those doubting her title rioting, those defending it becoming cruel vigilantes. it was not long before the kingdom was at war with its neighbours.");
} else {
lines.push("she travelled aimlessly across the kingdom she had once abandonned");
str = "using the amulet of yendor she ";
Expand All @@ -146,13 +146,13 @@ package com.robotacid.engine {
} else if(kids){
lines.push("they had " + kids + " children, whose lives were unremarkable, but gave joy to the married couple every day.");
} else {
lines.push("they chose not to have children. unsure of what would happen to them and this world when the rune of time finally pulled the immortal back to escape the chaos dungeon once again.");
lines.push("they had no children. their adventures had quelled any desire to grow a familiy.");
}
lines.push("thankful to merely have each other after being apart in flesh, they led simple lives until the end of their days. the immortal's husband was not fool enough to send his wife on yet another errand.");

} else if(type == EMPTY_HANDED){
lines.push("returning empty handed she was able to survive a few days before the calamity struck.");
lines.push("rng, seizing the power that had once held him hostage let loose catastrophic chaos.");
lines.push("returning empty handed, she was able to survive a few days before the calamity struck.");
lines.push("rng, seizing the power that had once held him hostage, let loose catastrophic chaos.");
deck = [
"he turned the seas to oatmeal porridge.", "he replaced all the stars with candles, destroying all warmth and light in the universe.", "he made turned every man whose name began with an \"s\" to lead.", "he replaced the world's fish with birds and world's birds with fish, leaving most to drown.", "he turned great swathes of land to honey, its peoples buried or mired.", "he changed everyone's name to bob, which surprisingly wasn't that harmful.", "he made every blade of grass a sharp as a knife, crippling many.", "he turned all the sand in the world to sodium. the seas exploded."
];
Expand All @@ -169,7 +169,7 @@ package com.robotacid.engine {
}
}
lines = lines.concat([
"when the immortal died the rune of time she had consumed took effect" + (UserData.settings.hasDied ? " again as it had when she had died in the dungeon" : "") + ".\n\nperhaps the world continued without her, or perhaps it was erased as she was pulled back through time.",
"when the immortal died, the rune of time took effect" + (UserData.settings.hasDied ? " again as it had when she had died in the dungeon" : "") + ".\n\nperhaps the world continued without her, or perhaps it was erased as she was pulled back through time.",
"the immortal looked into eternity, and descended..."
]);
}
Expand Down
14 changes: 7 additions & 7 deletions src/com/robotacid/engine/story.json
@@ -1,17 +1,17 @@
[
["arm yourself darling", "avenge me", "at least kobolds are weak here", "hearts, eat them", "sleep my love, restore your health", "i left you a present upstairs", "dive upon our enemies, literally"],
["a bug was fixed here", "use runes wisely", "goblins are bloody cowards", "you'd set off less traps if you'd look for them", "we can take their form with their faces", "death opened a door for me", "the underworld is outside of time"],
["a bug was fixed here", "use runes wisely", "goblins are bloody cowards", "you'd set off fewer traps if you'd look for them", "we can take their form with their faces", "death opened a door for me", "the underworld is outside of time"],
["i've not made friends with any of these monsters", "the overworld will be a sort of time bubble", "backstabbing's not cowardice, it's common sense", "eat not the bleed rune", "elbereth", "he's hiding, in chaos"],
["i like to know the names of things", "camping always refreshes me", "eat it, wear it, it's all the same to me", "i'm good with a throwing knife me", "trolls heal naturally, i hate them", "you sometimes smite them when you attack in the air"],
["if i die, use magic to open a portal for me", "don't give up my love", "elbereth", "summon me? a wife always", "leech magic is cursed", "i have a love-hate relationship with rng", "smite? it's like a punch of a god"],
["i like to know the names of things", "camping always refreshes me", "eat it, wear it, it's all the same to me", "i'm good with a throwing knife, me", "trolls heal naturally, i hate them", "you sometimes smite them when you attack in the air"],
["if i die, use magic to open a portal for me", "don't give up my love", "elbereth", "summon me? well that's wives for you", "leech magic is cursed", "i have a love-hate relationship with rng", "smite? it's like a punch of a god"],
["do not wear the balrog's face", "i miss being able to pee, but don't miss smells", "there's something funny about a chest I saw", "hah, you can't curse me, I'm dead!", "how do those gnolls find more treasure than me?"],
["the drow never need spectacles", "i'll blessed strike them into next week", "i've no blood to bleed", "a weapon forged of quickening?", "he can invade your dreams", "take two weapons into the fray for a whirlwind"],
["a leech can be destroyed and become armour", "get yendor, get it back", "chakrams come bouncing back, like me", "at last I'm beyond madness", "seriously, don't wear his face"],
["elbereth", "blood? smells like a leech", "it's the balrog that did it", "elbereth", "try making a healstone", "please don't make me wear that chaos helm"],
["these walls are alive", "i'm not touching a werewolf ever again", "bombs, apply directly to face", "three runes are all I could carry", "he's scared of you, i don't blame him"],
["i will escape this place", "blessed are the good leeches", "gun plus sword, i like it", "leeches can't take from blood wearers", "yendor is in chaos", "never a bad thing from a holy rune", "this dungeon is his weapon"],
["elbereth", "blood armour smells like leeches", "it's the balrog that did it", "elbereth", "try making a healstone", "please don't make me wear that chaos helm"],
["these walls are alive", "i'm not touching a werewolf ever again", "bombs - apply directly to face", "three runes are all I could carry", "he's scared of you - i don't blame him"],
["i will escape this place", "blessed are the good leeches", "gun plus sword - i like it", "leeches can't take from blood wearers", "yendor is in chaos", "never a bad thing from a holy rune", "this dungeon is his weapon"],
["elbereth", "i have no tongue, but these bones cut stone", "the balrog is my murderer", "i will be your guide, your minion", "I'll find you, I'll come back", "he's such a coward"],
["i was such a fool", "so weak, but not dead", "okay, technically dead", "i can live again, but it's complicated", "death holds my flesh to random", "why did i let myself get killed by that demon?","madness", "elbereth", "he who comes, he's to be feared", "chaos magic everywhere here", "these flying cogs power everything?"],
["i was such a fool", "so weak, but not dead", "okay, technically dead", "i can live again, but it's complicated", "death holds my flesh to random", "why did i let myself get killed by that demon?","madness", "elbereth", "he who comes, he's to be feared", "chaos magic everywhere here", "do these flying cogs power everything?"],
["elbereth", "i shouldn't have left you", "the rakshasa here have lost themselves to chaos", "i will find you red", "don't give up on me", "indifference? they can't touch you"],
["i have escaped the underworld", "freedom", "rodney was here", "what's that grinding noise?"]
]

0 comments on commit 4c293d3

Please sign in to comment.