scribble-rs / scribble.rs Goto Github PK
View Code? Open in Web Editor NEWA skribbl.io alternative - Play at https://scribblers.fly.dev
License: BSD 3-Clause "New" or "Revised" License
A skribbl.io alternative - Play at https://scribblers.fly.dev
License: BSD 3-Clause "New" or "Revised" License
Hello, I prepared ubuntu virtual machine, and tried to run my own Scribble server at local lan.
First, I downloaded as described, but some errors appeared:
@ubuntu:~$ go get github.com/scribble-rs/scribble.rs
go: finding github.com/scribble-rs/scribble.rs latest
go: downloading github.com/scribble-rs/scribble.rs v0.0.0-20191020175806-9e43418cec98
go: extracting github.com/scribble-rs/scribble.rs v0.0.0-20191020175806-9e43418cec98
go get: github.com/scribble-rs/[email protected]: parsing go.mod:
module declares its path as: github.com/Bios-Marcel/scribble.rs
but was required as: github.com/scribble-rs/scribble.rs
Later, I installed go-lang with, "sudo apt install golang-go"
Then I entered folder and tried to run Scribble by:
@ubuntu:~/Projects/Skrible/pkg/mod/github.com/scribble-rs/[email protected]$ go run main.go
Then I tried to open in Firefox following: localhost, localhost/lobby.html, localhost/create_lobby.html, but none is working, any help?
In order to easily make drawings, the following things are necessary:
Unfortunately I can't draw anything when I open a new lobby. I'm currently using Mozilla Firefox 74.0
on Ubuntu 19.10
.
A public API pretty much allows developers to create (custom) clients to connect to scribble.rs.
Eventually you have to implement an API to communicate with browser clients, which can be generalized for all software that can perform HTTP/HTTPS requests.
For example I could make a client in Unity or Godot that can be built for Android or iOS or any desktop platform, where drawing could happen at GPU level by drawing on textures.
Currently the drawing uses simple lines. The downside is, that you are unable to easily change the size of your "brush".
Here is a resource that will guide me through creating a better drawing capability, while also allowing me to understand everything:
http://www.williammalone.com/articles/create-html5-canvas-javascript-drawing-app/
All the elements (Round, time left, player names & scores, draw canvas, color palette, chat box) are alligned from top to bottom (in this order). This causes to make the game unplayable on this setup.
Also, some ui elements seem to not be displayed correctly.
Javascript errors:
SCRIPT1002: Syntaxfehler
Datei: lobby, Zeile: 260, Spalte: 32
The player should be able to make his lobby public, allowing other players to join a random lobby.
On lobby creation the creator should be able to decide how many players the lobby can hold at max, how much time a player has to make his drawing and how many rounds there should be.
Progress:
Tool to fill with (i.e. flood areas with colour).
The creator of a lobby should be able to decide a certain amount of custom words.
The custom words should either be used exclusively or additionally with a 50%/50% chance to appear. This decision can be made via a simple checkbox in the UI. In case there are not enough words, there can't be a 50%/50% chance, since no word should appear twice within the same lobby.
When a player submits a guess or chat message, we could get the Levenshtein distance between the guess and actual answer. This result could be used to produce several messages hinting how close the guess was.
Answer: Ricky Bobby
Guess: Bobby Bouchee
Distance: 14 (-"Ricky ", -" Bouchee")
Message: "Brr... Cold", "Not even close!"
Answer: Ricky
Guess: Vicky
Distance: 1 (-"R", +"V")
Message: "One letter off!", "Scolding hot!"
EDIT Maybe this requires a general rate-limiting logic that works per API-Call-Type. This way for example player X could send an event of type "Y" up to Z times per W second. This would prevent spam and it would also prevent guess botting. As the word-lists are open, it's technically possible to spam the whole word list. Especially when #2 gets implemented, this will become a problem. On top of that, some people might experience lag when chat-spamming too hard. There was one case for example where one's password manager was manipulating the document on each document update. While this isn't exactly our problem, it's apparently something we could look out for.
When making a private lobby with my friends, !start in the chat section doesn't start the game. In fact, no messages show up at all. Also, new players joining doesn't emit to the other players, meaning that the creator of the lobby only sees 1 person until they refresh.
Currently the canvas has a fixed size that doesn't really work well unless you got a 1920 x 1080 screen. The canvas should be growing and shrinking depending on the size of the browser window. Since drawing happens on the client, each client can up-/down- scale the drawing information given by the backend. Meaning the server only knows one size and it doesn't matter whether the client has a smaller or a bigger canvas.
The canvas probably needs to be resized via javascript, as the actual component size and the size of the drawing context differ from eachother.
The same logic will have to apply to the filling feature when it gets imlemented.
When a player gets kicked and all other players have guessed the word, the round should end. Otherwise the players have to wait until the timer counts to 0, which is really annoying.
Add a setting to enable/disable advanced drawing capabilities such as drawing lines, shapes, and polygons (lines with connected points).
Disabled by default.
And the game is meant to be scrappy drawings, I'd recommend setting the draw time lower when using these.
Even though you can already erase pixels by just using white color, a rubber would be better, since the current color selection would be preserved. You wouldn't have to remember what color you had before erasing something.
Players should be able to play in their own language, since not every player is able to speak english. The official word-lists should be curated within the repository itself.
It works for the local player but others see nothing seemingly
Add a command that sets player status to Away From Keyboard. Then a player can go to toilet without a worry of being kicked cuz of being inactive. Also skip a player's turn if AFK. Clear status if a player rewrites that command or sends anything in chat.
Add an option when creating a new lobby for allowed time amount of being AFK
Currently all of the messages from the start of the game are visible.
I believe after some time they start to cause performance issues (the game starts lagging hard, I assume because of these messages).
Try limiting it to, say, 50 messages or less. Not really a point in any more since that many won't fit onscreen.
Suppose I copy-paste a word list, I will be able to glance through words, which will make game unfair. So instead of that, it will be nicer if we can add a file containing list of words.
We should highlight the own playername, so you are not confused, who you are, cause of the random generated names.
Hold Shift to draw straight line
Currently all playernames are auto-generated. Any player should be able to decide to change his name at any point during the game.
at the end of the game, it would be helpful to open a new window (as the one used to choose words) to show the points obtained by each player and the final ranking.
After certain fractions of the drawing time, the game should start hinting random letters of the chosen word, in order to make the guessing easier.
The chat allows players to guess the current word. Every message is taken as a guess-attempt. Casing should be irrelevant. On top of using the chat to guess, players can also talk to each-other. After a player guess correctly, only the drawing player and the other players that have already guessed can see his messages. The drawing player can't talk to the ones guessing.
Gorilla Websockets doesn't support multiple writes at the same time. If the server tries to send one client two messages at the same time, gorilla websocket pisses itself and crashes the whole application. The idea here is have a mutex for each player that makes sure only one message a time is being sent.
On top of that, update events should be sent in additional goroutines, in order to prevent long waitingtimes due to high player ping.
I haven't figured out, when this happens, ye(eeeee)t.
Add a direct link to here to add new issues instantly.
I get this error:
(the below line thousands of times)
2020/03/23 20:17:12 Error reading from socket: read tcp 192.168.1.3:8008->80.196.9.102:57534: use of closed network connection
2020/03/23 20:17:12 Error reading from socket: read tcp 192.168.1.3:8008->80.196.9.102:57534: use of closed network connection
2020/03/23 20:17:12 Error reading from socket: read tcp 192.168.1.3:8008->80.196.9.102:57534: use of closed network connection
panic: repeated read on failed websocket connection
goroutine 142 [running]:
github.com/gorilla/websocket.(*Conn).NextReader(0xc000378580, 0x54f280, 0xc0000e0000, 0x2, 0xc0005a59d0, 0x6b)
/build/go/pkg/mod/github.com/gorilla/[email protected]/conn.go:967 +0x353
github.com/gorilla/websocket.(*Conn).ReadMessage(0xc000378580, 0x1e, 0xc000473f68, 0x1, 0x1, 0x906a00, 0xc0000e0e60)
/build/go/pkg/mod/github.com/gorilla/[email protected]/conn.go:1028 +0x2f
main.wsListen(0xc0000f2000, 0xc000148080, 0xc000378580)
/build/scribble.rs/lobby.go:190 +0x43
created by main.wsEndpoint
/build/scribble.rs/lobby.go:177 +0x2cf
On top of the minimal drawing capabilities mentioned in #7 , there should be additional features in order to allow the player to draw faster, more accurate and make up for his mistakes:
Lobbies should optionally be able to have a password. The password will be asked as soon as a player tries joining the lobby.
I think we should use wss instead of ws if the website was served via https.
Otherwise most browsers will not allow the websocket connection.
Workaround for right now: I got scribble.rs running by replacing "ws" with "wss" in lobby.html,
While I'm choosing a word to draw, the timer is already running. It should start as soon as a word has been chosen.
As a player I want to see how many points I got after answering, so that I know how quick I need to be to catch up, how much faster/slower I was than anyone else.
If you implement it as a system message
Pros - can at a glance see who was faster, the message persists through rounds
Cons - useless information spam for others
Solution for con - scribbl.io does this and it doesn't seem problematic
If you implement it as an extra bit of information in the player card
Pros - Looks cleaner, uses some of the whitespace on the cards
Cons - Likely will be wiped between rounds (if I was last I would not be able to see the data, etc) Solution for con - persist between rounds with a different color shade and disappear after the next round/guess or appear for a set timer, e.g. 10secs; queue the next data blob if you answer the next round quickly and the previous one is still active
It would be useful to define a simpler standard for the colors of the words:
^
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.