Scrabble-like game

The idea of making Scrabble came from the code by @Chrisir - Scrabble code. However, since it wasn't meant for having multiple players or especially not for having an AI, and we felt that we could do better if we started from scratch again.

Now, @Chrisir and myself are collaborating on making the game Scrabble using Processing (Java), and preferably without using any third party libraries (built in Java libraries don't count as third party). You can follow our progress here -
Currently, we're working on adding a framework for building an AI here -, but you can test out a working version without AI here -

Recently, We found out that @akenaton is also building his own version now.

Now, coming to the reason behind this post. We wish to ask if anyone is -

  • currently working on making a version of Scrabble
  • interested in helping us build an AI for Scrabble, or improve the game itself
  • interested in using our Scrabble for any purpose


  • I follow you to learn something ;)
    Maybe i'll be able to give some hints :)
    Thanks for share

  • edited April 2017

    @cameyo Thanks for supporting us!

  • edited April 2017

    For a number of the recent discussions that @Lord_of_the_Galaxy is referring to:

  • edited April 2017

    @jeremydouglass Thanks!
    So, does that mean you're interested in using it?

  • edited April 2017


    work in progress... i have the grid which works now i can move letters change player (2) (but why not 3 or 4)

    and i can get a score for each of them (not for for created words adding a letter)

    it works (can be accelerated i think, i think to that)

    tomorrow perhaps i can solve something

    not AL, that is for next week-end! ..........................

  • So, does that mean you're interested in using it?

    Yes. I can't contribute right now, but any framework for letter-based games played on grids (such as Scrabble, Upwards, Bananagrams, Snatch etc. etc.) is of great interest to me. As are novel ways of interacting with text in general.

  • novel ways of interacting with text in genral.

    Would love to hear your ideas as well :)>-

  • @Lord_of_theGalaxy===

    i have added the dictionnary; it works but i get a stupid question (because i dont play to Scrabble!!!) - When Player1 puts a word which is not valid (dictionnary) what is supposed to happen? Can this player try again or is it Player2 to play and player1 looses his game turn?????

  • He must try again

  • Indeed

    @akenaton, note that you don't need to mention me, I get notification anyway as I'm the author of this thread. Instead, mention @Chrisir as he may be more likely to be able to help you.

  • edited April 2017

    @akenaton -- re:

    When Player1 puts a word which is not valid (dictionnary) what is supposed to happen?

    Some automatic systems simply prevent that as a valid play -- the player must continue to try until they place tiles that are a valid word (e.g. otherwise the "submit" button is not highlighted).

    However, many forms of Scrabble simply allow the player to play anything, and then allow the second player to "challenge" if they believe it is not a word. If the challenger is correct that it is not a word, the person who played it loses their turn.

    Edit: fixed broken "Challenge (Scrabble)" link

  • edited April 2017

    @Chrisir===thanks! @jeremydouglass=== i have choosen the first solution: if word is not admitted player1 has to get out its letters and then try again (according to @Chrisir rules!!!) --- now i have to solve another and last (let us hope) problem with score when some letter is added by player2, making a new word (vertically or horizontally....) ---- and then i ll look the code from others... and probably modify mine one but in a hurry because i am working for another (paid!) things!

  • Sounds great!

  • @jeremydouglass I certainly didn't know that.

  • i have choosen the first solution

    Why not both? Implement a menu where the players can choose their settings according to the rules they're used to.

  • @colouredmirrorball My dear friend, actually implementing a "Challenge" system is fairly tough, and will take an hour or two easily.
    As to the menu, @Chrisir can do that, but what if we need to be able to load settings? And add more settings? There's a lot of new features that can be added, but aren't entirely necessary. But the player can always modify the source code ;) All those "nice but not necessary" features can be implemented later.

    Another major problem is that we'd need some sort of judge for that, right? But the word list we currently have is rather incomplete when it comes to certain rarely used words. We would need a complete, official word list for it to work.
    But that brings another problem - what if the player is from some other place, where some different words exist? That's another thing that can be dealt with with some "nice" features, but is just too difficult to be dealt with by one person in any sensible amount of time.

    And that's why I wanted collaborators - if people like you help us add new features, Scrabble can be so much better. So, are you interested?

  • @akenaton How's progress?
    I hope you're progressing faster, my own progress has slowed to a trickle of new code, as I'm mostly stuck repairing bugs.

  • @Lord_of_the_Galaxy===

    i had to re-write a lot of code because i stupidly forgot the 2 jokers!!! - Yet a lot of other problems seem to be solved...

  • edited May 2017

    @akenaton Great! Will you upload it to GitHub? Then I can see and learn from your code.

  • @Lord_of_the_Galaxy===

    ----and that is done to morrow to fresh lines

  • edited May 2017

    So, are you interested?

    I would be if my master's thesis deadline wasn't in a month and I hadn't eight exams coming up. Projects like these are very tempting to get involved with as my brain gets into turbo mode in those times, but I just can't afford the time. Remind me again in August, if the project is still ongoing. Until then the best of luck! Nice to see some community driven projects.

  • @Lord_of_the_Galaxy===

    yes, as soon as i have something working, i ll put it on github - and look to your code; as for now i get a new problem with blank letters: the player knows what is this letter but computer does not know: so, when i test (dictionnary) it can find more than 1 word compatible... I have to find some work around for that... yet not today because i am travelling. See you later!

  • edited May 2017

    @akenaton One solution is to simply ask the player - this is correct enough, but you still need to do some work on that.
    Alternatively, you can check all words that can form, and leave the blank as a blank - this is extremely easy, but doesn't comply with the actual rules.

  • @colouredmirrorball I wouldn't know if it will still be going by August, my school will start in June and by August exams will be nearing. Nonetheless, Chrisir may still be interested in August, and you can simply help him in improving whatever comes of the project by then.
    But you'll have a bit more work then for trying to understand the code, so I hope you have holidays in August with sufficient free time.

  • One feature that might be interesting is to make it work over a network so that players can't cheat and look at other's letters. It would be an interesting exercice as sending network messages is easy, but detecting other games on a local network or even on another IP address is not.

  • edited May 2017

    How much work needed to translate the program in another language ?
    The AI will be tailored on the english language ?


  • @colouredmirrorball Is it cheating part of the game? Why would you do that? Is like playing tennis with the net down. i don't see the point to implementing this.


  • edited May 2017

    @kfrajer -- I think @colouredmirrorball meant

    1. In scrabble, tile racks are secret, like hands of cards in most card games
    2. If you display all the scrabble tile racks for all players on one screen, they aren't secret, so everyone seeing all the tile racks is cheating
    3. so, make it a network game -- now different players have different screens, so they only see their own tile rack, so no cheating.
  • Online multiplayer... now I understand. Thxs @jeremydouglass


  • edited May 2017

    @cameyo I think translating to another language will be easy enough. All you need to do is replace the dictionary, and in the "defineThings" tab, change the letters their numbers and their scores.
    Assuming, of course, that the language supports the normal Scrabble.

  • @colouredmirrorball I see only one easy way to implement that -

    • Set up a server somewhere, and let the server handle everything. Easy, but I don't have a server :(
    • The only other option - Somehow manage to connect two computers on the internet. Any ideas?
  • Let's concentrate on the AI for now.

    I think the issue of cheating, seeing the opponents letters is not so important right now. It's just a game, you know?

    Thanks for all your input and support!

    And keep on testing.....!

    Best, Chrisir ;-)

  • @Chrisir beat me to it, but please test the current version of the game and let us know of any bugs by filing bug reports.

  • Somehow manage to connect two computers on the internet. Any ideas?

    If they're on the same local network then it's easy. You just need to know the IP address. The program can send a small message to every connected device on the local network and if another instance of the program is running it will recognise that message and respond.

    No clue how that works over the Internet.

  • And that means we must abandon the idea, at least for now.

  • You should provide more details. Do you want the code running on a server and doing the processing for you? Or do you just want to share the data? I will need to play it to get a feeling of the interactions between players.

    @Lord_of_the_Galaxy When you said that @Chrisir beat you... I thought you were playing the game together. Now I got your point.


  • @kfrajer

    I thought you were playing the game together


    Do you want the code running on a server and doing the processing for you? Or do you just want to share the data?

    Both are possible, really. What I lack is a server (and a website domain), so I don't want to bother with trying.

  • Could you provide a small design/description in the case both players were exchanging data only?

    For example:

    Player1 registers, player 2 logged in? [checks every 3 secs, for isntance)

    Player 2 registers, trigger ready flag.

    Session started:

    What data is transferred between players?

    Bonus: Player 1 and 2 update their scores at the end of the game.


  • IDK, haven't though of it.
    Do you know any method?

  • I could implement something and if it suits your needs, then I could contribute. It is something I just recently learned and have very little experience. However, I believe I can make it work. Picture this: you get json packages shared between users. Well... it doesn't have to be json but just for starters it will be a good option.


  • @kfrajer Even if you know how to share JSON packages across different users on the internet, how will we detect when another player is also playing Scrabble. We would always need a server.

    In any case, do you know how to send JSON packages from one internet user to another? We might be able to figure out some solution.

  • @Lord_of_the_Galaxy Are you interested in developing a multilingual version ?

  • edited May 2017

    @cameyo Like I said, it is really easy to do that. If you want, I'll give you the instructions. Nonetheless, I haven't the time to personally do it.
    If you'll help, we can do it.

  • edited May 2017

    Even when making a single player game for a shared screen, it sometimes makes sense to pass data internally in the same way that you would in a real game with secrets.

    For example, even in a non-networked single-screen application, there is a part of the code that is the "server" (game master) and that knows what all the tiles are (in the bag, on each tile, and on each player tile rack). Then there is a "player" part of the code that can see the board data, knows its own tile rack, and sends moves to the server to draw tiles or place them on the board. The "server" code validates a move, applies it, and responds. The "player" draws the game on the screen based on its viewable game state. When the playing turn changes, the new "player" updates the screen instead.

    The nice thing about this way of setting up the code for a single app is that, if in the future you play to break a game into a networked game with clients and a server, you don't then have to rewrite the whole game -- it is already set up with client-side rendering, server-side validation, secrets, and message passing. All you need to do is break the code into pieces and add the parts that pass messages over a network to each piece.

  • My suggestion is only for sharing data, not running the game. This is an alternative albeit probly not the most optimal.

    Again, one doable approach (not optimal), is to have a server where a client populates a data table of some sort (or an actual SQL table) which keeps track not only of games being played, but also what moves have been played by each user.

    For example, for a game to start, a client sends some info to this server where he updates the table saying a game was created. Another client(player) will send a request to show any current active games (or the client could create another game). If one joins the game, and a game is started, payers will send data and populate the database. The database will reply back with appropriate responses and even sharing information that is common to both players.

    My proposal is that the client side generates the proper calls and updates a common file in the net. The server will process received commands, manage the table and it could reply back with appropriate info. I won't be surprise if there are other ways out there to do it and I will be very happy learn about them.

    One can play in a local net using oscP5 and that is a short easy solution as well. However if you want to play against chrisir, jeremydouglass or akenaton, then this option wouldn't work. Notice than oscP5 is different than the datatable approach because there is no middle man aka. the server.


  • @kfrajer And we're back to the same problem - where to get this server from? I hope you understand that I (or anyone else, I suppose) cannot afford the cost of maintaining a server.

    If OSC requires a local network, I think that's not very useful to spend time on.

    If I can somehow get my hands on a server (and note - my laptop isn't even close powerful enough to possibly work as a server and a normal laptop at the same time), I'll let you know and we can work on making it online multiplayer.

    Thanks for your support anyway!

Sign In or Register to comment.