An open API service indexing awesome lists of open source software.

https://github.com/sashachabin/codeinthedark

Code In The Dark game app for LAN parties! πŸ‘¨β€πŸ’»πŸ‘©β€πŸ’»
https://github.com/sashachabin/codeinthedark

code-in-the-dark codeinthedark contest lan monaco-editor

Last synced: 11 months ago
JSON representation

Code In The Dark game app for LAN parties! πŸ‘¨β€πŸ’»πŸ‘©β€πŸ’»

Awesome Lists containing this project

README

          

# Code In The Dark

[![Inspired by codeinthedark/editor](https://img.shields.io/badge/inspired--by-codeinthedark/editor-blue)](https://github.com/codeinthedark/editor)

A client–server application of the Code In The Dark front-end game. Based on the original [Tictail](https://tictail.com/) challenge: recreate a UI from a single screenshot using HTML & CSS and don’t see the result until time’s up!

- 2-player coding in Monaco editor with Emmet
- Live updates on a TV screen
- Admin controls for rounds and timing


| Main `/` | TV `/tv` |
| -- | -- |
| ![image](https://github.com/user-attachments/assets/d131cfd2-5926-442b-a214-a64dfa346402) | ![image](https://github.com/user-attachments/assets/61b2df27-2a36-4d87-9ebc-a49637b7d46e) |

| Player editor `/game?player=1\|2` | Admin panel `/admin` |
| -- | -- |
| ![image](https://github.com/user-attachments/assets/66a1ef44-e9ee-4dbd-82ff-4a5fe8a727d5) | ![image](https://github.com/user-attachments/assets/3050bec3-0e05-48f5-bfde-b29c936e642e) |

## Host Your Own Contest

1. Make sure all computers are on the same LAN

2. [Install Node.js](https://nodejs.org/en/download)

3. Create `.env` file with `ADMIN_PASSWORD=yourpassword`. If you skip this, the default password is `pass`

4. Run `npm i && npm start`

5. On 2 laptops, open:

```
http:///game/?player=1
http:///game/?player=2
```

6. On the TV screen, open:

```
http:///tv/
```

## Custom tasks

There are 12 prepared tasks in [`/tasks`](https://github.com/sashachabin/code-in-the-dark/tree/master/tasks) folder:

- chat.png
- vote-checkbox.png
- calendar.png
- confirm.png
- payments.png
- …

To add a new task, put your own screenshot in [`/tasks`](https://github.com/sashachabin/code-in-the-dark/tree/master/tasks)

## Roadmap

- [x] Player editor with live preview
- [x] [Monaco Editor](https://github.com/microsoft/monaco-editor)
- [x] [Emmet](https://github.com/troy351/emmet-monaco-es)
- [x] Admin panel for rounds
- [x] Basic admin password
- [x] Real-time updates on TV screen
- [ ] Add Tailwind/Bootstrap options
- [ ] Tasks with assets & variables
- [ ] Switch code/preview on TV
- [ ] Pulling β†’ WebSockets
- [ ] Add extra time to the round
- [ ] End game & show confetti
- [ ] Support 4 players
- [ ] Prompt In The Dark β€” AI rounds with ChatGPT/Deepseek etc. πŸ€“

## Development

1. [Install Node.js](https://nodejs.org/en/download)

2. Install dependencies

```
npm i
```

3. Run client and server apps

```
npm run dev
```

## See also

- [codeinthedark.com](http://codeinthedark.com) β€” the Code In The Dark contest by [Tictail](https://tictail.com/)
- [codeinthedark/editor](https://github.com/codeinthedark/editor) β€” the original editor