-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
321 lines (239 loc) · 9.96 KB
/
index.html
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
<!--
Lengthen kick out time
Fuck it, number on your hand
Bugs
Lots of text boxes have their background behind other things
ghost suspect with black square and loads of bests on them?????
For sure you want a "just give your probabilities" controller
This can also let you purchase half-bets
And can make sure your probabilities add to one
You might also want what is probably a hedge fund
Eg you know that ONE of the "anti sexism policies" will lead to better mental health
But you don't know which, so you want your bets spread in a way that gives that
vibrate the white flash
Streamer mode
No ID
Only the original player can take pictures
Auto-refresh also puts in the game id
Going into debt
Starting with 0
Quite awful bug if you... hit the new suspect button twice at the start? On mobile?
Refund when suspect is deleted?
That's more for "unresolved" rather than "resolved in the negative"
Want to incentivize them to sell, and in a certain order, selling is part of the game
If you were to do this, it would be a case of tracking who still has some cash in there
and giving them the most you can give them
Could make it so ctrl+v puts a pasted image in the camera feed, useful for desktop
Even text could go in, could use drop down window
probably best not to scale up cash width because think about initial cash
Lobbyist mode
With lobbyist mode, you also have a lot of bets more expensive than what the person gets for them. Then, a strategy: if you know someone is trying to manipulate the price of X to be >80p at 1pm, but the true price of X is 20p, you can:
-buy a load of bets on X at <80p
-wait until 12:59pm when the price is 81p
-sell a bet, price goes down to 79p
-watch the manipulator buy so price goes back to 81p
-sell again
-manipulator buys again
etc. Only problem is, you have to buy when
Yes, key thing is that there should be unlimited bets, so that the manipulator is forced to make the price extraordinarily high so that when everyone sells it's still above the watermark
If you can figure out how much the manipulator gains from having the price be past the watermark, you can pump all that money out of them
No reason why it should be secret really. Say how much cash the manipulator gets, and who they are, and what suspect they're going for.
Easter egg: open console and set newGameButton.manipulatorMode = true before clicking it
-how much money they get
-how much extra money they start with
-When the suspect appears, a 25-second timer starts. If the suspect's bets are trading at 1:1 when it's done, the manipulator gets N dollars.
Alt
Manipulator will get 1 googol dollars from the market price being above 1
So they're willing to lose .9999 = 1 googol dollars
To bet, if there are 10 bets
Another fun thing would be a bot mode where you see that wealth gets reallocated pretty quickly
-->
<html>
<html>
<head>
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:creator" content="@hamish_todd">
<meta property="og:type" content="website">
<meta property="og:url" content="https://murdershebet.com">
<meta name="title" content="Murder, She Bet" />
<meta itemprop="name" content="Murder, She Bet">
<meta name="twitter:title" content="Murder, She Bet">
<meta property="og:site_name" content="Murder, She Bet">
<meta property="og:title" content="Murder, She Bet">
<meta itemprop="description"
content="A game about putting your money where you'd usually put your mouth">
<meta name="description"
content="A game about putting your money where you'd usually put your mouth" />
<meta name="twitter:description"
content="A game about putting your money where you'd usually put your mouth" />
<meta property="og:description"
content="A game about putting your money where you'd usually put your mouth" />
<meta property="og:image" content="https://murdershebet.com/screenshot.jpg" />
<meta name="twitter:image" content="https://murdershebet.com/screenshot.jpg" />
<meta itemprop="image" content="https://murdershebet.com/screenshot.jpg">
<meta
charset="utf-8"><meta
name="viewport" content="width=device-width, initial-scale=1">
<title>Murder, She Bet [BETA]</title>
<link href="generalStyle.css" rel="stylesheet" type="text/css">
</head>
<body>
<header>
<h1><center>Murder, She Bet</center></h1>
</header>
<br></br>
<div>
<p></p>
<center><button type="button" id="newGameButton">Start a new game!</button></center>
<p></p>
<center>Or enter the ID of a game started by a friend:</center>
<center><textarea id="gameIdBox" name="gameIdBox" rows="1" cols="26"></textarea></center>
<center><button type="button" id="enterGameButton">Submit</button></center>
<p></p>
</div>
<br></br>
<center>
<h3>Rules:</h3>
</center>
<ol>
<li>2-8 players will <b>sign into a game using the box above</b>, each on a different device</li>
<li>The players will watch a <b>murder mystery</b> TV show such as Poirot or Scooby Doo</li>
<li>The show must have multiple <b>suspects</b> who may turn out to be <b>guilty</b> at the end</li>
<li>Players will add suspects to the board, with their phone's camera</li>
<li>Players buy and sell <b>bets</b> on the suspects' guilt</li>
<li>When the credits roll, if a suspect is guilty, <b>their bets will be turned into money</b></li>
<li>Try to have as much money as possible at the end!</li>
</ol>
<br></br>
<center>
<h3>How to play, using a suggested <a href='https://www.youtube.com/watch?v=z-VuX2kcaCY'>practice murder mystery video</a>:</h3>
</center>
<center>
<iframe width="100%" height="51.1%" src="https://www.youtube.com/embed/wlERXS77fr0" frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen="false"></iframe>
</center>
<br></br>
<center>
<h3>Advanced: Rule Clarifications and FAQ</h3>
</center>
<center>
<iframe width="100%" height="51.1%" src="https://www.youtube.com/embed/8IHBtfEX8iU" frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen="false"></iframe>
</center>
<br></br>
<center><a href='https://github.com/hamishtodd1/msb/'>Github</a>
</center>
<center>This game is an adaptation by <a href='https://twitter.com/hamish_todd'>@hamish_todd</a> of a design/discovery
by <a href='http://overcomingbias.com/'>Robin Hanson</a></center>
<center>More information on the game and its philosophy can be found <a
href='https://github.com/hamishtodd1/msb/blob/main/README.md'>here</a>.</center>
<body>
<script src="/socket.io/socket.io.js"></script>
<script src="three.min.js"></script>
<script src="variables.js"></script>
<script src="miscFunctions.js"></script>
<script src="mouse.js"></script>
<script src="camera.js"></script>
<script src="cashBits.js"></script>
<script src="bets.js"></script>
<script src="suspects.js"></script>
<script src="board.js"></script>
<script src="sound.js"></script>
<script src="judgement.js"></script>
<script>
const module = { exports: {} }
</script>
<script src="shared.js"></script>
<script src="rectangle.js"></script>
<script src="windowResize.js"></script>
<script src="text.js"></script>
<script src="buttons.js"></script>
<script src="socketStuffAndPageInitialization.js"></script>
<script>
let initted = false
async function init(socket, gameId) {
if(initted)
return
initted = true
initRectangles()
renderer = new THREE.WebGLRenderer({ antialias: true });
renderer.setClearColor(bgColor)
initSuspectConfirmationWaitingSign()
initButtons()
let updateMouse = initMouse()
await initBoard()
//could move this up to get rid of some initial movement
initWindowResize()
await initJudgement(gameId)
{
const connectionLostBox = Rectangle({
label: "Connection shaky...",
h: 2.,
getScaleFromLabel: true,
haveFrame: true,
z: 4.9
})
connectionLostBox.visible = false
socket.onclose = () => {
connectionLostBox.visible = true
if(reloadAttempted === false) {
location.reload()
reloadAttempted = true
}
//could check, from the server, if this is being called
}
//could zoom with camera?
//It keeps going to the
let timeSinceLastPongReception = 0.
socket.on("pongAA",()=>{
timeSinceLastPongReception = 0.
})
let reloadAttempted = false
updateFunctions.push(()=>{
let justAboutToPass2 = timeSinceLastPongReception < 2. &&
timeSinceLastPongReception + frameDelta >= 2.
if( justAboutToPass2 )
socket.emit("pingAA")
connectionLostBox.visible = timeSinceLastPongReception > 10.5
// if(timeSinceLastPongReception > 10.5) {
// socket.close()
// connectionLostBox.visible = true
// }
// if (timeSinceLastPongReception > 13. && reloadAttempted === false) {
// location.reload()
// reloadAttempted = true
// }
timeSinceLastPongReception += frameDelta
})
}
socket.emit("ready for suspect portraits")
function loop() {
let clockDelta = clock.getDelta()
frameDelta = clockDelta < .1 ? clockDelta : .1 //clamped because debugger pauses create weirdness
// log(1./frameDelta)
mouse.updateFromAsync()
// let now = Date.now()
updateFunctions.forEach(uf => uf())
// log((Date.now()-now)/1000.)
++frameCount
renderer.render(scene, camera)
setTimeout(() => {
requestAnimationFrame(loop)
}, 1000. / 60.);
}
roundOffRectangleCreation()
loop()
}
</script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-G8Q1WDCR2B"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-G8Q1WDCR2B');
</script>
</body>
</html>