GithubHelp home page GithubHelp logo

scribble-rs / scribble.rs Goto Github PK

View Code? Open in Web Editor NEW
368.0 368.0 180.0 2.69 MB

A skribbl.io alternative - Play at https://scribblers.fly.dev

License: BSD 3-Clause "New" or "Revised" License

HTML 36.68% CSS 5.53% Go 55.30% Dockerfile 0.62% JavaScript 1.26% Shell 0.61%
drawing drawing-game guessing-game montagsmaler multiplayer pictionary scribble self-hosted selfhosted sketchful skribbl

scribble.rs's People

Contributors

0xflotus avatar amyrahmady avatar andrazznidar avatar bbjake avatar bigeti avatar bios-marcel avatar bixilon avatar bttrs avatar dmytroshuba avatar fabiangeissler avatar fuwn avatar hija avatar kaiffeetasse avatar kingtoadz avatar larsfu avatar lorenzbischof avatar luni-4 avatar maquis196 avatar mueller-patrick avatar piteur avatar pstienem avatar skick1234 avatar szabodanika avatar thecodeah avatar zouglou avatar zznidar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scribble.rs's Issues

Installation and running - help needed

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?

Minimal drawing capabilities

In order to easily make drawings, the following things are necessary:

  • Free-Hand drawing
  • Selecting colors
  • Clear canvas

Can't draw anything

Unfortunately I can't draw anything when I open a new lobby. I'm currently using Mozilla Firefox 74.0 on Ubuntu 19.10.

Public API

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.

Grid design and UI elements are broken in IE on Win 8

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.
2019-07-10 08_44_41-Scribble rs - Game - Internet Explorer

Javascript errors:
SCRIPT1002: Syntaxfehler
Datei: lobby, Zeile: 260, Spalte: 32

Public lobbies

The player should be able to make his lobby public, allowing other players to join a random lobby.

Limiting Max-Players, Drawing-Time and Rounds

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:

  • Rounds
  • Max-Players
  • Drawing time

Fill tool

Tool to fill with (i.e. flood areas with colour).

Custom words

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.

Guess proximity

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!"

Add start and nick buttons

In addition to the !start and !nick commands, it would be helpful for users to press buttons.
They could be added inside the red circles, in this way the content of the green circle is no more necessary.

Senzanome

Chat spam protection

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.

Game can't start

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.

Scalable canvas

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.

Geometry drawing capabilities

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.

Rubber

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.

Better Layout

Current layout is so huge, like i've zoomed all sites to 85% by default and here is a result
image

i set 75% zoom level for scribble.rs and now it's fine, but it's should be fine out of box.

Game doesn't start

It freezes when you create the room and the time left is infinity.

Edit: Didn't know !start starts the game.

Sorry

Captura de pantalla 2020-03-15 a las 23 24 56

AFK Status

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

Limit message history

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.

Option to add Word List files from desktop

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.

Highlight the own playername

We should highlight the own playername, so you are not confused, who you are, cause of the random generated names.

Word hints

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.

Chat

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.

Concurrency problems writing messages to players

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.

Issue link

Add a direct link to here to add new issues instantly.

Votekicking the creator of the lobby crashes the server

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

Extended drawing capabilities

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:

  • Undo
  • Defining custom colors
  • Define stroke width

Password protected lobbies

Lobbies should optionally be able to have a password. The password will be asked as soon as a player tries joining the lobby.

Support of wss

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,

Show your score from this round

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

Define a standard for the colors of the words

It would be useful to define a simpler standard for the colors of the words:

  • Black if the written word is wrong
  • Green if the written word is correct
  • Swamp green but more transparent for words written by a user that has already guessed the correct word
  • Red for information written by the server

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.