-
Notifications
You must be signed in to change notification settings - Fork 1
/
CHANGELOG
398 lines (316 loc) · 16.9 KB
/
CHANGELOG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
# nodegame-client change log
## 7.1.0
- Widget steps supports flattened options inside widget object.
## 7.0.0
- New method: Timer.isDetroyed.
- Widget steps add widgetStep option = true.
- Improved ErrorManager.
- Redirect messages for bots gracefully handled.
- New alias: node.on.done.
- New properties added to every DONE msg: stepId and stageId.
- Frame appears at once, waiting for the callback to be executed.
- Stager.require: lets split stages across files.
- Stager.share: shares some variables with all requires.
- Fixed: game scrolls up when a new frame is not loaded.
## 6.2.0
- DONE is async with respect to node.game.step to let other listeners on DONE
finish first.
- missValues from widgets does not block next step execution.
- Widgets' action required is not checked if the timer is expired.
- Fixed node.once.data removing all node.once data listeners after first exec.
- Fixed step-rule OTHERS_SYNC_STAGE.
- Improved error-checkings with stager.stageBlock and stager.stepBlock.
- Added stager.extendSteps and stager.extendStages.
- Improved stager.skip and stager.unskip: support for arrays.
- Improved stager.isSkipped: checks if all steps inside a stage are skipped to
determine if a stage is skipped.
- Fixing typos, improving doc.
## 6.1.0
- Fixed exit callback of stages leaked into steps.
- Fixed non-required widgets to halt widget steps.
- Widgets can prevent scrollIntoView behavior by passing _scrolledIntoView =
true in the return object of getValues. E.g., ChoiceManger is already
scrolling down to the right nested widget.
## 6.0.1
- From warning to silly messages if GamePlot receives invalid game stages.
## 6.0.0
- Timer API reworked:
- Timer.random|wait[done|emit|fire|exec|timeup].
- GameTimer fires hooks with params: timeLeft and reference to itself.
- GameTimer timers are cleared in stage or step in which they are created
- Timer.setTimeout method mimicks JS setTimeout.
- GameTimer.create alias GameTimer.createTimer
- GameTimer.createTimer accepts validity parameter to know when to destroy.
- Game new methods:
- isStep, isStage, isRound, isWidgetStep
- getStepId, getStageId
- Matcher:
- role=true executes the roles, like in the function return (before
was just keeping the role set).
- no errors thrown on get methods if no matches are set.
- Reconnect
- Step property true on logic resends messages sent in current step.
- Reconnecting client receives role and partner.
- Database:
- GameDB add defaults options for saving CSV.
- Logic's session name is added to every item in db.
- Done procedure:
- Simplified node.done (accepts only one param, removed backword-compatible checks)
- Widgets with required/requiredChoice flag can block node.done
- Role and partner added to set messages
- Widgets:
- Widget step: classname centered and root container (before widget-container)
- Auto scroll into view for widget steps requiring action
- Miscelleaneous:
- From warning to error: stages/steps names cannot contain numbers or dots.
- GameMsgGenerator: default data is empty object (before null).
- LOG messages of errors from clients are printed to console by logic by
default.
## 5.7.0
- GamePlot.getProperty accepts a fourth parameter specifying which locations
to skip when searching for properties.
- Fixed bug executing stage init callback every step introduced in previous
release.
## 5.6.1
- Fixed 'init' step property set by setDefaultProperty.
- Fixed assignerCb not correctly assigned to Matcher.
## 5.6.0
- Game.stepBack steps the game back.
- Game.getPreviousStep updated to accept new options.
## 5.5.3
- Fixed execution of exit callback for widget steps.
## 5.5.2
- All widgets created in widget steps have the correct "ref" value.
## 5.5.1
- Fixed PlayerList array2groups calls.
## 5.5.0
- Done callback of a widget step does not overwrite done parameters, if the
return value is undefined (same behavior as in done callback of normal steps).
## 5.4.0
- Timer objects by default do not stopOnDone or startOnPlay.
## 5.3.0
- Game.getPreviousStep falls back on GamePlot.jump in case of necessity, such
as a reconnection.
## 5.2.0
- Game.execStep order of options to reload the frame has been updated. First,
it checks if frame uri is different, and then looks if there is an option to
force reload.
## 5.1.0
- Step property frame===true keeps the same frame (useful in widget steps).
- Game.execStep calls W.adjustFrameHeight even when no new frame is loaded. This fixes the problem of incorrect frame height in some cases.
- Widget-step exit callback is correctly called.
- `#GamePlot.tmpCache()` called with no parameter returns the whole cache.
## 5.0.1
- Stager methods cleanup and better error messages.
- Fixed tests.
## 5.0.0
- `#node.game.getProperty()` simplified. Does not distinguish between return values undefined and null. Developer must specified 'not found' return value.
- `#Stager.getState()` has a finalize parameter.
- `#node.say()` accepts an array as TO parameter (note: the maximum lenght recipients is controlled by the server).
- Minor cleanup and fixes.
## 4.1.1
- `#node.redirect` accepts arrays for recipients.
## 4.1.0
- Antispoofing option.
## 4.0.1
- Better remote error logging (window.onerror).
## 4.0.0
- Supporting `beDone` option to make game done immediately when going to a step (no frame loaded, no callback executed like in `willBeDone`).
## 3.5.4
- Fixed `#node.setup('lang')`.
- Fixed widget step markAttempt parameter type.
- `#node.setLanguage()` accepts also a string that converts into an object automatically.
## 3.5.3
- MatcherManager.replaceId, Matcher.replaceId, Roler.replaceId.
## 3.5.2
- Widget step properties updated: checkAnswers -> checkValues.
- Widget step check values only if a value is returned.
- Timer makes sure objects with step settings are manually cloned.
- PlayerList.add accept optional parameter to control the type of updates triggered.
## 3.5.1
- Step rule `SOLO_STEP` to step through all steps of a stage.
- `#GamePlot.nextStage` (previousStage still to be done).
- `#GamePlot.stepsToNextStage` and `#GamePlot.stepsFromPreviousStage` accepts a parameter to control for round repetitions.
## 3.5.0
- Introduced role: the same step can have sub-step properties organized in roles. Current role saved in: `node.game.role`.
- Introduce partner: the ID (or full obj) of another client.
- New step properties: role, partner, roles, matcher.
- Backward incompatible: `#Game.getProperty(property, notFound)`. The second parameter is a value that should be returned in case the property is not found (was a gameStage).
- `#GamePlot.getProperty(gameStage, property, notFound)`. Third parameter can specify what value should be returned when the property is not found.
- `#Game.setRole(role, force)`, `#Game.setPartner(role, force)`;
- Fixed bug of timer step property being an object with a callback on the milliseconds property.
## 3.2.1
- node.get timeout erroneously not clearing the event listener if executeOnce was set. Fixed.
- SocketDirect does not stringify/unstringify the messages now. Just passes the plane object.
## 3.1.1
- SizeManager.setHandler.
## 3.1.0
- SizeManager.
## 3.0.1
- Improved pushManager.
## 3.0.0
02/10/2016 NodeGame Version Upgrade.
## 2.4.0
- Avoiding resending SET message on reconnect and willBeDone.
## 2.3.1
- Cleanup.
## 2.3.0
- Fixed bug in comparison of game stages of different rounds.
## 2.2.0
- Avoiding infinite loop in socket.reconnect.
- Errors in incoming game commands are turned into warnings.
## 2.1.0
- Improved Socket disconnection/reconnection handler.
- Added timeout for connecting.
## 2.0.5
- GameTimer can handle functions that returns functions at initialization.
## 2.0.4
- Socket.js start session does not set uriChannel if server returns undefined channel (for default channel).
## 2.0.3
- Fixed wrong reference to node.emit in Socket.js.
## 2.0.2
- Cleanup debugger statements.
## 2.0.1
- `node.connect()` parameters are interpreted correctly if channel is omitted.
## 2.0.0
- Push Manager: Unresponsive clients are checked and tried to be pushed to the next stage. If no answer is received within a specified timeout, they are diconnected.
- Matcher: matching algorithms available: roundrobin
- `#node.get()` has now an option to specify a different target than DATA.
- SERVERCOMMAND disconnect
- `#node.set()` accepts a third optional parameter specifying the text of the message. This way it is possible to define on.data listeners on receiver.
- Stager: steps accept widget property.
- The return value of the done callback function changed meaning. If it is strictly equal to FALSE, it stops the procedure. If it is equal to any other value different from undefined, then the return value replacesthe arguments of node.done to be sent to server. For retro-compatibility TRUE is not sent to server (for the moment).
- `#Game.getNextStep() returns the next game stage (if no loops are involved).
- `#Game.getPreviousStep() returns the past game stage (if no loops are involved).
- `#Game.updateGlobals()` globals attributes of step objects are automatically added to the windows object in the browser.
- GameDB select queries can now select stages by name/id and not only hash-string (e.g. 3.1.1).
- The endpoint of the channel in `#node.connect()` is automatically taken from the name of the game (window.location.pathname), if none is specified (only in the browser). This is consistent with the change in nodegame-server that sets the default value of the endpoint to the game name.
- Query parameters are automatically passed to `#node.connect()` when node is executed in the browser. They can still be overridden by passing a configuration object.
- `#GameDB.add() replaces the checkings done by on('insert').
- Stager: `frame.autoParse` option will parse the DOM of loaded frames to substitute .innerHTML elements properties of elements matching ids or class names.
- `#node.timer.randomDone()` and `#node.timer.randomExec accepts context parameter.
- Fixed bug for default context of `#node.env()` in Node.js.
- Fixed bug with node.done with more than 2 parameters.
- Removed prepublish script.
## 1.0.0
- Enhanced stager, builds blocks and randomize blocks, stages, and steps.
- Optimized EventEmitter.
- `#node.done()` is asynchronous to avoid calling multiple node.done() in the same step.
- `#node.done()` evaluates the done handler immediately, and then eventually emit 'DONE'. This makes node.done and emit('DONE') different, because emit('DONE') does not evaluate the done handler any more.
- After 'PLAYING' is emitted, if a frame is loaded by `#GameWindow.loadFrame()` the game level will not change again to 'WINDOW_LOADED` and then `PLAYING`. That was causing issues with sychronization.
- `#Game.isReady()` does not look anymore at the status of the GameWindow. Once PLAYING has been emitted, if the game is not paused or done was called it return TRUE.
- New game levels: 'LOADING_FRAME' (reserved, not used), 'FRAME_LOADED' (reserved, not used)..
- Removed game level: 'WINDOW_LOADED'.
- `node.emitAsync()` emits event asynchrounosly (does not return a value).
- `#node.get()` uses a nodeGame timer instead of Javascript timeOuts, so it can synchronize with game events, such as pause and resume.
- `#node.get()` checks the id of the message to make sure that only the actual recipient can reply to it.
- Fixed bug on parameter timeout of `node.get`.
- `#EventEmitterManager.printAll()` and `#EventEmitterManager.getAll()`
- Avoiding multiple calls to `#node.socket.disconnect()`
- It is possible to use the name of a function to remove it from the event emitter.
- Remote logging is enabled. By default only errors are sent to server as LOG messages.
- Default level for logged message is 'info'. Before it was 'warn'.
- More support for IE8.
- 'SOCKET_CONNECTING' event when a socket start the connecting procedure.
- Removed group event-listeners.
- Check if there are more than 1 node instances on the browser.
- `#Game.pause()` and `#Game.resume()` accept a parameter to be passed along the emitted events.
- `#NodeGameClient.getCurrentEventEmitter()` improved to return the stage event emitter.
- `#Game.shouldStep()` accepts the stageLevel as parameter.
- `#Game.setStageLevel()`, `#Game.setStateLevel()` and `#Game.setCurrentGameStage()` accept a modifier to force or skip the publish of the update.
- Enhanced checks for avoiding clients getting out of sync.
- 'GETTING_DONE' stage level introduced to signal that the DONE procedure is being executed.
- Travis Integration.
- Version number correctly added to build file.
- `publishLevel` and `syncOnLoaded` are properties of the stager and not of `game.game_settings`.
- `game.game_metadata` -> `game.metadata`.
- `game.game_settings` -> `game.settings`.
- `game.settings` contains treatment's settings now.
- `#node.socket.reconnect()` reconnects with same settings.
- Improved logged output.
- `#node.deregisterSetup()`.
- `#node.isGameover()`.
- EventEmitter and EventEmitterManager can track changes. See `#setRecordChanges()` and `#getChanges()`.
- `#EventEmitter.remove() returns removed listeners or empty array.
- `Socket.emitOutMsg` option.
- Frame loading can be defined directly in the game stage/step definition.
- New stage properties can be defined globally: `frame` and `cb`.
- Parameters given to `#node.done()` are automatically sent to server with `#node.set()`; the time from the beginning of the step, and a flag indicating if it was timeup are added to the parameters, if not already specified.
- Flattened down the structure of entries in `node.game.memory`. Removed GameBit.
- `#node.set(obj, to) takes only one object and a recipient (was node.set(key, value, to).
- `autoSet` option specifies whether a SET message should be sent to SERVER when node.done() is called.
- Game message target `BYE` causes a client side disconnection.
- `#node.get()` syntax changed. Fourth parameters is `options` and contains more options.
- Removed `node.fs` object. Developers should use native NDDB methods to save to csv format.
- `#Stager.loop()` and `#Stager.doLoop()` must have a loop function, no default provided.
- `#node.setLanguage() takes a second parameter to automatically set W.setUriPrefix to node.lang.path.
- Removed property .on from stages and steps.
- Added property .exit in stages and steps. It is a callback that is executed before entering the next stage/step.
## 0.9.9
- Error Manager removed in Node.JS (use ServerNode instead).
## 0.9.8
- Updated FS lib to latest NDDB.
## 0.9.7
- `node.game.globals` added.
- Documentation for Sockets added.
- Several documentation fixes.
## 0.9.6
- Stager.extendStage fixed
## 0.9.5
- Standardized msg log with the server (same as winston now)
- Fixed bug caused by alias on the server
- Refactored Stager api
- Socket Direct Messagging is asynchronous
## 0.9.4
- LANG added to the list of targets.
- node.player.lang contains the preferred language of the client
- `#node.setLanguage()`, '#node.on.lang()`
- GET messages fire in the receiver an event like "get.<label>". Previously was just "<label>", where "<label>" is the string passed by the get caller.
## 0.9.3
- Stager refactored to build the sequence first and add stages later.
- Globals defined in the stager are added to _game.globals_ and updated at each step.
- `#Game.getCurrentStepProperty() added.
- `#GamePlot.getGlobals() added.
- Fixed problem with timer resuming.
- Other minor fixes.
## 0.9.1
- GameMsg id and session fields are not write-protected any more.
- `#GameTimer.start()` and `#GameTimer.stop()` do more robust checkings on initial conditions.
## 0.9.0
- Change log new version starts here
## Above 0.6.2
- Full msg listeners are attached immediately after receiving a HI msg, that could lead to losing the first messages.
## 0.6.2
- Docker is optional dev
- Fixed bug in GameLoop.size() when no state was added
- Fixed possible memory leak in GameLoop limits object
- Command copyto copies all files in build directory to another folder in make.js
- In the configuration object url key is not read anymore, host parameter is optional
# 0.6.0
- Remote setup of clients
- setup method to configure all important properties of the game
- connect and play methodsare now separated. It is possible
to play without connecting, and connecting without playing
- nodegame-client can connect to the server via the Socket interface: direct or sio
- GameSession object enhanced
- Automated tests on integration server travis-ci
- Standardized variable naming:
node.iss -> node.is,
node.actions -> node.action
## 0.4.5
- events.dumpEvents added to configuration object
- added examples folder
- added solo_mode
## 0.4.0
- events.history added to configuration object
- fixed bug onDATA
- several bug fixing
- PCONNECT, PDISCONNECT, MCONNECT, MDISCONNECT, MLIST events added
- node.ee -> node.events
- node.gsc -> node.socket
## 0.2.10
- node.redirect (for monitor only)
- better make file
- cleanup
## 0.2.0
- Major refactoring