More wandering sprite work

This commit is contained in:
2014-06-11 21:56:46 -07:00
parent 561d09dcdb
commit cf6929c570
2 changed files with 53 additions and 5 deletions

View File

@@ -48,10 +48,6 @@ I really liked how Thief would let you sit aroud and voyeuristically listen in o
The "Chase", "Run", and "Looking" AI states need to all have different lines of dialog that they spout. The "Chase", "Run", and "Looking" AI states need to all have different lines of dialog that they spout.
## TODO : Apply dynamic lighting effects to the player and other actors, not just the map
Nothing to add here
## TODO : Make player harder to "see" when they are in shadows or far away ## TODO : Make player harder to "see" when they are in shadows or far away
The dynamic lighting effect will make certain areas of the map "darker" than others. When the player stands in them, they get darker as well. This "darkness" factor, as well as how far away the player is, should be taken into account when determining if an AI can "see" the player The dynamic lighting effect will make certain areas of the map "darker" than others. When the player stands in them, they get darker as well. This "darkness" factor, as well as how far away the player is, should be taken into account when determining if an AI can "see" the player

View File

@@ -1,4 +1,3 @@
var moonlightSettings = { var moonlightSettings = {
'map' : { 'map' : {
'tilesets': [ 'tilesets': [
@@ -141,6 +140,54 @@ var moonlightSettings = {
} }
}; };
var moonlightDialog = {
"status": {
"townsfolk-male": {
STATE_UNAWARE : [
Id rather be fishing.,
Different day, same old stuff.,
Oi! Whered that trouble run off to now then?,
"The missus is off shoppin', and here I am sittin' on me Jack Jones.",
"Oy I'm gonna have a butchers at that new tailor's knickers he has for sale.",
Im off to the pub to see the lads and chew the fat.,
Whistling
],
STATE_CONCERNED : [],
STATE_ALERTED : [],
STATE_LOSTHIM: []
},
"townsfolk-female": {
STATE_UNAWARE : [],
STATE_CONCERNED : [],
STATE_ALERTED : [],
STATE_LOSTHIM: []
},
"townsfolk-guard": {
STATE_UNAWARE : [],
STATE_CONCERNED : [],
STATE_ALERTED : [],
STATE_LOSTHIM: []
}
},
"conversations": {
"townsfolk-male": {
"townsfolk-female": [],
"townsfolk-male": [],
"townsfolk-guard": []
},
"townsfolk-female": {
"townsfolk-male": [],
"townsfolk-female": [],
"townsfolk-guard": [],
},
"townsfolk-guard": {
"townsfolk-male": [],
"townsfolk-female": [],
"townsfolk-guard": []
}
}
};
// Create torch objects // Create torch objects
// Light constructor // Light constructor
var Light = function(game, x, y, radius, fade, color, flicker) { var Light = function(game, x, y, radius, fade, color, flicker) {
@@ -164,6 +211,11 @@ var Light = function(game, x, y, radius, fade, color, flicker) {
Light.prototype = Object.create(Phaser.Sprite.prototype); Light.prototype = Object.create(Phaser.Sprite.prototype);
Light.prototype.constructor = Light; Light.prototype.constructor = Light;
STATE_UNAWARE = 1 << 1;
STATE_CONCERNED = 1 << 2;
STATE_ALERTED = 1 << 3;
STATE_LOSTHIM = 1 << 4;
SPRITE_TOWNSFOLK_MALE1 = 1; SPRITE_TOWNSFOLK_MALE1 = 1;
SPRITE_TOWNSFOLK_MALE2 = 2; SPRITE_TOWNSFOLK_MALE2 = 2;
SPRITE_TOWNSFOLK_MALE3 = 3; SPRITE_TOWNSFOLK_MALE3 = 3;