-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotes
More file actions
487 lines (388 loc) · 12.3 KB
/
notes
File metadata and controls
487 lines (388 loc) · 12.3 KB
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
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
regl for three d rendering
choo because trains and also for ui
webrtc-swarm for networking
documentation:
https://github.com/choojs/choo#api
https://github.com/regl-project/regl/blob/gh-pages/API.md
http://glmatrix.net/docs/
http://pomax.github.io/bezierjs/
https://github.com/mourner/rbush
https://www.npmjs.com/package/ray-aabb
https://github.com/chimurai/http-proxy-middleware
https://github.com/shakiba/planck.js/tree/master/docs
https://model-railroad-hobbyist.com/node/25866
http://eu.idec.com/en/g/gLB2L-M1T14A/
http://webglstats.com/
for polish:
all sound effects
X place train cars?
remove objects
X disclaimers on networking
X fix springs/collision
X change inital layout
X fix flippy cars
packets of work:
Xhook up track placement again
X drag and drop default size track and then edit
networking pass
make sure turnouts sync correctly
make sure trains still sync correctly
make sure train placement still syncs correctly
make sure track placement still syncs
sync train colors
integrate audio
train collision sound effects
music blending, switching
train whistle + button
train engine sounds
ui sounds
finish models
tiles???
fuse with tracks??
trees
large rock
model editing
delete objects (right click)
move objects (drag while edit is open)
rotate objects (drag mouse wheel while edit is open)
edit mode indicator
trains
add remove train cars
misc
keyboard controls
fix spring forces
optimize vectors
differentiate train cars in low poly mode
switch engine buttons
clean up ui a bit?
mobile friendliness????????
etc:
tiles (place/delete/materials)
trains (place/delete/models/materials)
tracks (delete/models/materials)
scenery (delete/models/materials)
train customization
decal projection?
track create snap to arbitrary point on other track
sync turnouts
network data compression
optimize images
try to fix spring forces again
make use of vectors more efficient
ui polish pass
operate controls / layout
options page
X graphics setting
X bg music setting
save to localstorage current room, clear on new room, also save local game
info popups
q/e to rotate, etc
mobile friendliness (hopefully)
portrait mode
swipe between tabs
sound / musics (feat. li+d)
3 bg tracks
engine sounds
wheels over track ties
train whistle
train connect sound
ui boop
skybox options??
fade in shader??
descoped:
X camera controls
X save / load
X lakitu mode on abandoned cars
train models
engines
X berkshire https://www.modeltrainstuff.com/bachmann-n-50952-2-8-4-berkshire-steam-locomotive-with-tender-nickel-plate-road-railfan-version-with-mars-light-759-equipped-with-dcc-and-sound/
X switcher https://www.modeltrainstuff.com/broadway-limited-imports-n-3868-p3-nw2-diesel-locomotive-southern-pacific-1423-equipped-with-paragon3-sound-dc-dcc-with-rolling-thunder/
http://prr.railfan.net/diagrams/PRRdiagrams.html?diag=ES-6_5911-E412138.gif&sel=die&sz=sm&fr=
https://www.youtube.com/watch?v=PBKUWA-6EIo
freight GE https://www.modeltrainstuff.com/kato-n-1768930-ge-es44ac-gevo-burlington-northern-santa-fe-5873/
f-unit passenger https://www.modeltrainstuff.com/kato-n-1060422-f7a-b-locomotive-set-northern-pacific-6012a-6012b/
cars
X older passenger
http://prr.railfan.net/diagrams/PRRdiagrams.html?diag=P70b_P70c_P70r_P70_P70d-E94787-.gif&sel=coa&sz=sm&fr=
https://lombardhobby.com/broadway-limited-imports-n-3769-p70-passenger-car-heavyweight-coach-prr-1046/
newer passenger
X boxcar
hopper
X tank car
http://prr.railfan.net/diagrams/PRRdiagrams.html?diag=tm8.gif&sel=tnk&sz=sm&fr=
https://s3.amazonaws.com/marketplace.collector-modeltrains.com/107b43ba177d05fa4767933905ddb7f27aa99c91-20181113-105708-C1-Trainz-4195869-STILL-02.jpg
X gondola
http://prr.railfan.net/diagrams/PRRdiagrams.html?diag=g43.gif&sel=gon&sz=sm&fr=
http://fromthepanhandletothepalouse.blogspot.com/2017/01/2016-freight-car-updates.html
X caboose
http://prr.railfan.net/diagrams/PRRdiagrams.html?diag=N4-27231.gif&sel=cbn&sz=sm&fr=
http://www.rrpicturearchives.net/showPicture.aspx?id=2906951
buildings
X train house https://modeltrainstuff.com/walthers-n-933-3266-two-stall-130-brick-diesel-house-kit/
barn https://modeltrainstuff.com/woodland-scenics-n-br4932-built-and-ready-old-weathered-barn/
house https://modeltrainstuff.com/walthers-n-933-3839-cape-cod-house-kit/
donut store https://modeltrainstuff.com/walthers-n-933-3835-hole-in-one-donut-shop-kit/
factory https://modeltrainstuff.com/walthers-n-933-3211-allied-rail-rebuilders-kit/
X platform https://www.walthers.com/platform-121-5-x-5-5-x-6cm-9c2293
scenery
X small rock
large rock
cliff
X tunnel straight
tunnel curved
trees
X pine
birch
oak
tiles
grass
dirt
road?
pond
expansion packs:
Stations and Industries
automatically load / unload resources
stations with requests
rivers?
bridge
City Livin'
building models / lights
simulated traffic + pedestrians
roads
train lights
PHYSICS
matter-js
all i need is distance joints for spring simulation
turn off gravity
update:
apply external forces
apply friction
apply motor
apply rail correction perpendicular to rail times distance
step world
sync render to physics
set bogie rotation - train render defined by bogies
set bogie position
on train create:
local/network
make bogie 1
make bogie 2
make constraint between bogies
on train remove:
find bodies and remove them and all constraints attached to them
on connection
make constraint between bogies
side tabs switch pages
/------------------------------------------\
[==|
[|
[| O
[|
|
|
|
|
\------------------------------------------/
pages:
operate trains
the knob
forward, reverse
brake
horn, lights
edit world
add tracks, objects, trains, tiles
edit trains
name, logo, colors (primary, secondary)
multiplayer
connect to room
save load
object picker!
visual icons of objects to place in the world
make it 3d why not
soon as i make it 3d tho, its probably not choo anymore?
ground tiles:
heightmap displaced highres plane
rails through tile replace material on tile with rail material
todo:
~ fix spring forces
sync turnouts?
what to do about cars that go off track, fully or partially ->> mario lakitu mode on em
figure out a clever way to hide z-fighting
~ rubberband state on update
non-connection collision
touch-position package for supporting touch events
gif generator?
ON MIPMAPS
the prefiltered map needs extra mipmap levels generated
regl/webgl1 doesn't support incomplete mipmaps and cmft exports them incomplete by default
TODO: detect number of mipmaps by images.length / 6
skybox workflow:
find high res hdr environment map
open in cmft
tonemap skybox, output as rgba32f cubemap dds
generate radiance, output same
generate irradiance, output same
open _pmrem in PVRTexTool
generate mipmaps
save as rgba32f
copy all to materials folder
libraries to look into
touch-position
gl-gif
gl-render-cubemap
gl-sprite-text
make use of vectors more efficient
? selecting trains
? move a train from x to yz
render a geometry track
reorder tracks in turnout based on arbitrary line intersection through curves
build a module
saving / exporting modules
loading modules
track options: straight, 45, 90, S, switch, cubic bezier
static modules??
unpowered train cars
connect/disconnect (shouldn't be able to connect to another full train, maybe?)
mass considerations?
loading/unload resources
buildings
signals?
stations
track ends
The Networking Integration
voting:
array of voting members, set to current users (ignore anyone who joins during the voting process)
try for consensus until max attempts, and then take the value with most votes, and then local value
welcome to room
vote on placement
place neutral track
X sync train positions, rotations, speed
X sync tracks
button to toggle train collision
events:
switch train controlled
vote request: type
vote response: accept, revision
vote result: type, data
data compression (make ids smaller) (do this last or only if an issue comes up)
train: pos, rot, speed, id
turnout init: list of track ids, open
turnout state: list of bool
track: id, 4 points
don't need yet probably:
sync turnout state harder
blend avg of player updates but rewind and extrapolate, window of 10 updates (60 frames)
sync networking on regl tick
Create Your Own Train Line
customize train color
logo procedurally generated from random shapes
four letters: JNCO line
i definitely need to make up a bunch of fake train companies / generate them
The Train Car Conjuction
train to train collision
X raycast boxes
spawn cars
X connect / disconnect cars
stations
The Modular Track Invention
skyboard
standards: minimum two through tracks
create a layout
carcassone tiles
The Shader Construction
make some models, maybe??
get tracks rendering as actual tracks with ties
make some pbr materials, learn to paint them
SOUND EFFECTS????
tunnel echo
train whistle button
background music
gameplay:
choose a room name
you're given a bunch of random track module tiles
place the tiles to create a layout
random exits from your layout are joined to the common layout (random roundabout)
speed control
speed when not actively controlled?
interaction with collision
switch control
N just a direction indicator that automatically flips switches in front of your train (can have turnouts with 8 tracks output??)
click on switches to toggle them
train control
multiple trains?
control transfer btwn players?
camera control
kite
conductor
bird
tower
in game
train speed knob
project mouse pos along tangent of first click to spin knob
leave room button
reset train button
what if the first part of joining a room is playing carcassone
shader noise fade in
dynamic lines using preallocated buffer
make trains tilt when they turn
models:
start off with everything being a colored box
uvs on palette texture
engine, several cars, tracks, trees, rocks, water, station, station equipment, signals, terrain
animation? probably not
ambient occlusion and hella tilt shift
networking:
first player starts a room by putting in a name
everyone else connects to that name
gameplay:
start off with a loop, each player can connect their railyard to the loop
stations that will load cars with resource
stations that will unload cars of resource
train whistle
bonus:
hook it up to midi input so we can use knobs!!!
pull request esm modules for peerjs and choo https://github.com/rollup/rollup/wiki/pkg.module
https://www.wired.com/2014/06/how-do-you-get-a-train-moving/
done:
X index.html
X script.js
X serve libraries
X set up camera params
X render a box
X render a train
X i think i need browserify, BUT just for libraries
X initial network connections
X simple input
X simple ui
X connect tracks
X figure out switches (disable a segment in a direction?)
X pbr shader
X fix choo routing issue
X clicking ground
X drawing tracks dynamically
X camera controls
X snap to track endpoints
X use endpoint tangents
X creating switches
X move debug stuff to separate file
X switch to cubic bezier
X fix switches
X fix moveBogie
X refactoring pass
X throttled log
X render canvas from choo to use state
X reset train button
X send messages to all players
X cube map
X train linking
X player join
X player leave
X data update (all trains state, all turnouts state)
X turnout activation
X tracks placement
X disconnect conditions
X initial state sharing
X don't join with remote trains??
X sync tracks
X sync positions
X sync movement