Commit Graph

44 Commits

Author SHA1 Message Date
jorsi c1f0e70233 fix jshint warning about leading decimals confused for dot properties 2020-09-03 20:33:07 -04:00
jorsi 783886b9b2 fix space music fading in when ending game by adding separate background volume function 2020-06-03 18:22:48 -04:00
jorsi 3b43a2754a refactor audio engine: simplified gain channels, improve fading between audio, rename functions 2020-06-03 17:44:27 -04:00
jorsi 740204de85 lower volume as altitude increases 2020-06-02 16:02:25 -04:00
jorsi 8e5f8bbae6 add space sounds 2020-06-02 14:23:33 -04:00
jorsi 18e8af9809 refactor audio-related code to use AudioLibrary module 2020-05-30 23:33:10 -04:00
jorsi a340584136 create AudioLibrary module to consolidate audio 2020-05-30 23:03:46 -04:00
jorsi 1d84e5f85c connect majority actions to sound effects;add more placeholder loops and effects 2020-05-30 19:48:44 -04:00
jorsi 21267e383d add outline of space sounds 2020-05-29 19:13:34 -04:00
Dee Newcum 7548e8cced doubleTime is harmful during space.js, it makes it much harder 2017-06-16 15:22:42 -05:00
Lucas Lois fb9e39bbaf Merge branch 'master' into jshint-compliance 2017-01-25 11:44:18 -03:00
Continuities 5f13d94cdf Marketing stuff, mostly 2016-12-17 14:53:21 -05:00
Lucas Lois 36b01a78b6 Made scoring.js, space.js and world.js jshint compliant 2016-10-02 17:57:17 -03:00
Continuities fba203cea1 conversion tweaks 2015-11-09 18:36:55 -05:00
Travis Weston 6ee6470972 Merging updates 2015-02-11 18:55:27 -05:00
Blake Grotewold c87541b8b9 Merge pull request #222 from anubisthejackle/issue80 2015-02-09 19:37:10 -05:00
Travis Weston 6e044292ae Add in doubleTime capabilities
Add hyper / classic to menu
2015-02-09 19:31:24 -05:00
Robert Gravina 67b3c7fb7e Low-risk fixes suggested by JSHint. 2015-02-09 19:20:29 -05:00
Travis Weston 674d44f6a8 Fixing whitespace conformity in space.js 2014-07-13 11:24:44 -04:00
Michael b7d539abbb Slight styling issues on language menu option 2014-05-19 13:27:21 -04:00
Vanadar c7ad5384f4 suite des trads 2014-02-07 18:26:03 +01:00
Blake Grotewold c78689f2c7 Add reverse color scheme. 2013-11-14 12:29:27 -06:00
Michael! c27430f29e A few small tweaks, and added link to the iOS app. 2013-11-13 22:18:27 -05:00
Michael ebee3be4d1 Sometimes I'm dumb. 2013-11-01 23:03:50 -04:00
Michael 994f01c78c Some refactoring and some bug fixes. 2013-11-01 23:00:51 -04:00
Vermilingua e60abd0153 end screen looks nicer 2013-11-01 23:12:06 +11:00
Vermilingua d7fc109554 made store collection routine in SM, and updated everything to suit 2013-11-01 17:01:21 +11:00
Vermilingua a68f58e648 scoring system 100% complete 2013-11-01 16:35:20 +11:00
Vermilingua 3b3755cda9 started scoring system, yet to be populated 2013-11-01 16:35:19 +11:00
Michael 1ffe8f8aeb A bit of cleanup. 2013-10-16 17:45:41 -04:00
Vermilingua 83bf266a29 prestige system now absolutely complete 2013-10-16 21:43:40 +11:00
Vermilingua f952b4def1 completed save/load 2013-10-16 21:43:14 +11:00
Vermilingua 1be4d5edc5 started backup/loading mechanic 2013-10-16 21:43:12 +11:00
Vermilingua acc04d0780 set down framework, storage/map gen/etc. 2013-10-16 21:41:47 +11:00
Michael dde477aade Some general code cleanup. 2013-10-10 20:53:53 -04:00
LucidCrux 766d3879c7 Merge remote-tracking branch 'origin/master' into state_manager_2
Conflicts:
	script/events.js
2013-07-24 21:01:59 -06:00
LucidCrux 2018ca3ae8 create and configure callback handlers for state updates
add $.Dispatch to handle object events
add subscribe calls to files
update SM fireUpdate to use new Dispatch

There are some NaN issues right now, no time to bug hunt right now, it
does kind of function though
2013-07-24 18:33:06 -06:00
LucidCrux dee7cbb9b3 refactor Engine.js for use with $SM
====functions removed====
//I just removed these because most were simpler or at least equal as
	direct $SM get/set/add calls, I realize the store ones are kind of
	subjective since calls were about equal, but oh well. If someone
	really 	feels we need the shortcut/named functions for manipulating
	stores specifically, it shouldn't be crazy to reimplement in $SM 
Engine.setStore >> $SM.set
Engine.setStores >> $SM.setM
Engine.addStore >> $SM.add
Engine.addStores >> $SM.addM
Engine.getStore >> $SM.get(requestZero = true)
Engine.storeAvailable >> $SM.get;
Engine.removeIncome >> $SM.remove //updates moved to handler


====functions moved====
//Any moved function I felt was more directly related to States or
	didn't belong where it was
Engine.addPerk > $SM.addPerk //kept function for now because of notify
	call inside, 'deep' state
Engine.hasPerk > $SM.hasPerk //kept function because of 'deep' state
	name
Engine.setIncome > $SM.setIncome //kept because it has internal logic
**Engine.getIncome > $SM.getIncome //**easily removable with
	Outside.updateVillageIncome refactor
Engine.openPath > Path.openPath //Since I'm refactoring anyways
Engine.addStolen > $SM.addStolen //internal logic
Engine.startThieves > $SM.startThieves //not sure $SM is a better place,
	but Engine should be nice and clean by the end of this, handling
	only engine mechanics
Engine.num > $SM.num //after Outside refacter, this is basically just a
	fancy $SM.get
Engine.upgradeState > $SM.updateOldState


====functions refactored====
$SM.addPerk; //updates moved to event handler, no check/create new perk
$SM.hasPerk; //don't need to check exist and ==true
$SM.collectIncome //removed changed check, update calls now handled by
	'stateUpdate' event listening
$SM.addStolen //fix to set stolen items in case a partial steal happens
$SM.startThieves //updates in handler
$SM.updateOldState //use $SM calls, add placeholder for updating to post
$SM state when more finalized 


====functions affected (by removed)====
Engine.init (Engine.getStore, Engine.storeAvailable)
Engine.collectIncome (Engine.addStores)
Engine.num (Engine.getStore)
Engine.travelTo (Engine.storeAvailable)

Room.init (Engine.getStore)
Room.unlockForest (Engine.setStore)
Room.lightFire (Engine.setStore, Engine.getStore, Engine.storeAvailable)
Room.stokeFire (Engine.setStore, Engine.getStore, Engine.storeAvailable)
Room.coolFire (Engine.setStore)
Room.buy (Engine.setStores, Engine.addStore, Engine.getStore)
Room.build (Engine.setStores, Engine.getStore)
Room.craftUnlocked (Engine.getStore, Engine.storeAvailable)
Room.buyUnlocked (Engine.storeAvailable)
Room.updateButton (Engine.storeAvailable)

Outside.gatherWood (Engine.addStores)
Outside.checkTraps (Engine.addStores, Engine.getStore)
Outside.updateVillage (Engine.getStore)

Path.embark (Engine.addStore)
Path.getCapacity (Engine.getStore)
Path.updateOutfitting (Engine.getStore)
Path.createOutfittingRow (Engine.getStore)
Path.increaseSupply (Engine.getStore)

World.goHome (Engine.addStore)
World.updateSupplies (Engine.getStore)
World.checkDanger (Engine.getStore)
World.getMaxHealth (Engine.getStore)
World.getMaxWater (Engine.getStore)

Ship.reinforceHull (Engine.addStore, Engine.getStore)
Ship.upgradeEngine (Engine.addStore, Engine.getStore)

Events.loadScene (Engine.addStores)
Events.updateButtons (Engine.getStore)
Events.buttonClick (Engine.getStore)

Events.Global (Engine.addStores, Engine.removeIncome)
Events.Room (Engine.addStore, Engine.addStores, Engine.getStore,
Engine.storeAvailable)
2013-07-24 17:41:36 -06:00
Steve Hayes 253f946dbd IE<8 Fixes: Removed trailing commas in string literals and renamed variable char to chara 2013-07-23 23:54:06 -04:00
LucidCrux db4a346d21 create StateManager, change all State calls to managed calls
Introduced state_manager.js almost all State gets/sets are now run
through the manager (alias $SM). For now it was a simple, mostly
straightforward replacement of calls. This means that there are
redundancies and a lot of now unneeded code for things the SM will
handle. However, since I had trouble with making those changes as well
as introducing the manager all at once my first attempt, I am taking the
wiser approach and making "one change" at a time like I should have
instead of being too sure of myself.

At this point, it seems to work, but there may be bugs I didn't catch.
There was also no attempt made to update old saves to work with this. In
theory, it shouldn't be too hard. (included is a list of all state
changes)

TODO:
Save Update.
Refactor: a lot, many many redundancies now.
Refactor: "location centric" to "global centric".
Relocate all calls to different update functions to event listeners
where possible.

======================================================

The changes to State are as follows:

.room (exists) > features.location.room
.room > game.room
.room.builder > game.room.builder
.room.temperature > game.room.temperature
.room.fire > game.room.fire
.room.buttons > game.room.buttons

.outside (exists) > features.location.outside
.outside > game.outside
.outside.population > game.outside.population
.outside.buildings > game.outside.buildings
.outside.workers > game.outside.workers
.outside.seenForest > game.outside.seenForest

.world (exists) > features.location.world
.world > game.world
.world.map > game.world.map
.world.mask > game.world.mask
.starved > character.starved
.dehydrated > character.dehydrated

.ship (exists) > featuers.location.spaceShip
.ship > game.spaceShip
.ship.hull > game.spaceShip.hull
.ship.thrusters > game.spaceShip.thrusters
.ship.seenWarning > game.spaceShip.seenWarning
.ship.seenShip > game.spaceShip.seenShip

.punches > character.punches
.perks > character.perks

.thieves > game.thieves
.stolen > game.stolen
.cityCleared > game.cityCleared

.stores > stores
.income > income
2013-07-23 01:24:47 -06:00
Michael Townsend 05fef5664d Merge pull request #27 from toofarapart/fade_to_black
(SPOILERS) A nice fade to black...
2013-07-09 19:47:45 -07:00
Matt Rasmus 0b6144660f Fixed a bug in which the share/restart buttons would disappear in certain situations. 2013-07-07 13:25:30 -07:00
Matt Rasmus 4326b2aa2a Game fades to black at the end, and stays that way until the player clicks restart. 2013-07-07 11:41:51 -07:00
Michael Townsend 19abccfcc4 Adding ADR to Github 2013-07-03 07:56:13 -07:00