ads

Thursday, July 17, 2014

Multiplayer 3D dice roller

NEWS.
In May 2020 I migrate site to new web-engine. It will help me to manage my expenses on the site. Traffic costs me almost $200 per month. So please consider to donate to keep the dice roller running.


Good news. Almost entirely by popular demand, at last I made it.
The multiplayer dice roller: http://a.teall.info/mdice

Ok, this is a beta version for now, with minimalist user interface (yep, I love it) and still testing functionality. Google App Engine has its own pitfalls, especially on socket handling. But it looks like running good.
The GUI will be modified by users' requests, but do not expect much =)

A couple of words about how this works.


First of all, you have to create your own room. Then call your friends for join the room. That's all.


Throws are synchronized and everyone in the room will see them.

Well, I know that this simple functionality is not enough to play online. I going to add complete log with simple event cutter, and asynchronous throws: players may throw their dice simultaneously in some sort of situations like "initiative call". So don't be angry on me because this is not done yet =)

Have a fun and look for updates =)

UPDATE for 21 Jan 2016.
I added chat/log. I still thinking about desing and usability, but it's betterd than nothing =)
Video:


104 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. I'm waiting for the chat update! Great work though :)

    ReplyDelete
    Replies
    1. Will be soon. I do not define a date, it matters to my own mood, muse and free time. I fixed some bugs and changed login screen to more simply form, but this is development version yet. Logs and chat will be included as I've promised.

      Delete
    2. Hey man! Can you share with us something new? :D

      Delete
    3. Still didn't finish through lack of time ;) But new version is close to be finished though.

      Delete
  3. A surface skin and a small sound of dice clattering would be off the charts. slick app bro.

    ReplyDelete
    Replies
    1. Thanks for idea =) Do not know if it applicable this project though =)) Let's see.

      Delete
  4. an option to drop lowest die, or 'n' dice (e.g. roll, 4d6, discard lowest)

    ReplyDelete
  5. Thanks! I'm waiting it :)

    ReplyDelete
  6. Will you upload the new code for the /mdice feature ? :D

    If you upload it to github, I would love to help add new features.

    ReplyDelete
    Replies
    1. Thanks for your interest! mdice server-side code is strongly dependent on internal logic of my GAE site. There are no secrets there, but I do not ready yet to publicate its source code. I will try to cut unnecessary parts aside and push whole project into github (or whatever) just after I finish current version. It takes some time and, more important, good mood for doing such things, you know. I getting used to receive huge amount of requests the dice roller about, and this is good motivation however =)

      Delete
    2. Hi! Will you finally release it? I'm very interested :D

      Thanks!

      Delete
    3. Congratulations for your job. I am very curious to study how you made the multiplayer version of the game. Where can I find the source? Possibly you could send them to me in private? Thanks and happy new year ;)

      Delete
  7. This comment has been removed by the author.

    ReplyDelete
  8. I love this program! Almost exactly what I want. I would pay for multiplayer with 2 tweaks:
    (1) sound effect when you roll (with a turn off option)
    (2) option to roll without adding multiple dice together. I know you can see the dice rolled right now, but I'd like to turn off the total.
    cheers!

    ReplyDelete
  9. Love the program, but for an unknown reason this runs extremely slow on my system and gives me a different result a number of seconds after everyone else. How can i fix this or what is causing this?

    Other sites such as Netflix run smoothly without any issue or buffering screen.

    ReplyDelete
    Replies
    1. Unfortunately, I can't say anything concrete due to lack of details.
      Maybe it would be wise to show browser error messages to user... Ok, there are two possible causes: 1) your browser and video card are not able to work with webgl, 2) your browser has a network problem: it is bad with async web-calls and http long-pulling.
      If you tell me you browser name and version, it will be posible to move forward the issue. Also you'd check if single-player version (http://a.teall.info/dice) works or don't.

      Delete
    2. Thanks for your reply, I am running Google Chrome Version 42.0.2311.152 m, both version run without an error message. Though when I am in a group the result I get it different from everyone else in the group

      Delete
    3. PJ did you check your dices? You may usecrooked dices. :-D

      Delete
  10. I don't get the input box to create a room. If I choose 2d6, could you make them so you could choose a color for each?

    ReplyDelete
  11. I don't get the input box to create a room. If I choose 2d6, could you make them so you could choose a color for each?

    ReplyDelete
  12. This is great! Just what I need to take care of the dice part for my online RPG. I do have one small feature request though: I'd very much like to be able to do simple math with the rolls. Writing "2d6+1" works as expected, but not "2d6-1". I'd also like to be able to do more advanced stuff, like "(2d6)/2+3", but I'd be very happy with just simple subtraction.

    Thanks for taking the time to make this webapp! It looks great.

    ReplyDelete
    Replies
    1. Thanks, Gorm.
      I think I will spend some time to improve notation. This is a thing that has to be done at last =) Subtraction is a simple task, as you said, but I'm going to add some more stuff. Let's see.
      Don't lose passion through I'm very busy with my job duties. But ok, I have to find some more time for this after all. I hope, I'll finish it within a week. Good luck!

      Delete
    2. I must have forgotten to turn on notifications for the post, because I didn't see that you replied before now, as I'm coming back to ask about something else.

      Happy to hear you are willing to do the odd improvement here and there! Do it whenever inspiration strikes. I know how hard it is to find time to everything, and don't want to add to any pressure with these trifles.

      I came to tell you about a problem I and my roleplaying group are having: After a while, we lose the connection to the server. In fact, the whole site hangs, and our mouse cursors are turned into that swirly one. It's very strange. Reloading and even hard reloading the page doesn't make a difference. Maybe you can see something on a server log somewhere?

      For all I know it might be happening because of a timeout. If there is a timeout setting, could you set it to be a bit longer? Roleplaying game sessions are usually pretty long. At least three or four hours. It's unfortunate when one or two of us are suddenly unable to roll dice.

      Delete
    3. Yes, I know about this problem. I will try to focus on it on my next attempt when I have free time.

      Delete
  13. It would be great if you add fate dices...Awesome work anyway. Thank you.

    ReplyDelete
  14. Man, this is really awesome! Thank you very much!

    ReplyDelete
  15. Man, this is really awesome! Thank you very much!

    ReplyDelete
  16. Anton, I love this program, but since things tend to differ from game to game, I was hoping you might have an option for d10s to be either 0-9 or 1-10.
    A lot of the games I play use 1-10, with the 0 on the die representing 10.
    Which would make the result of the following roll much different:
    10d10 → 8 0 0 9 6 0 4 7 0 5 = 39
    Obviously, one can simply count up the number of 0s (n) and add n*10 to the displayed result to get the correct result. But I really like elegant solutions rather than band-aid fixes.
    All in all, it's a great program and works really well, so thank you for your time and effort on providing something like this for free for everyone to use.
    Have a good one!

    P.S. As luck would have it, that was actually my first roll made in the program to try it out, and it definitely seemed off to me.

    ReplyDelete
    Replies
    1. Thanks, Brandon. About your request, you know, you can roll like 10d10+10 to emulate 10 d10 dice with 1-10. The notation already allows this. I know I have to add more complex forms of notation, and additionally about 10 another types of die =) That's all from requests. I hope I will have a time and inspiration for this. After all I should start Kickstarter project and create universal dice roller platform. Maybe =) Anyway, thanks for you support, I very appreciate this.

      Delete
  17. Love this but I don't know if there is a bug or just something wonky on the back end that makes it unreliable. We haven't actually been able to use the multi-player version yet; it will allow you to create/enter a room only intermittently. Half the time it just hangs when you try to create/enter a room.

    ReplyDelete
    Replies
    1. Hey!
      You are right. Something been broken. Thanks for notice. It seems my GAE server outdated or something like this. I will check ASAP, but I can not promise it to be done fast ... Have a lot of another work, sorry.

      Delete
    2. Totally understood your "day job" certainly takes priority. We've looked around and of all the different tools we've seen, we like what you've done the best. Hopefully you can figure out what is broken as we'd love to use this for our weekly gaming session.

      Delete
  18. Hello Anton!
    I really like this 3d dice roller and it would be nice to have it as an open source project, I understand you haven't been working on it for a while, any plans to publish it anytime soon?

    ReplyDelete
    Replies
    1. Hi Q!
      The server end uses part of my private code, so I'd do not like to share it. If you want to collaborate, you can write me email and we can discuss it. I'm very sorry if this disappointed you.
      I have already implemented multiplayer version in several commercial (and non-commercial) projects, so if you describe me your thoughts we can made an agreement.
      Note, that singleplayer version is free to use without any terms.

      Delete
    2. that's definitely fair enough, I don't think I need the multiplayer, but that's why I was trying when I clicked "help and more info", but my main interest was the dice vectors which are just beautiful :), I've just checked the source for the single player version, is there a github for it in case you are taking any contributions? and also to give credit, etc etc, I don't see any licensing file in there

      Delete
  19. Thanks for making this, it is awesome, just what I am looking for in a shared dice roller with others online! Thank you!

    ReplyDelete
  20. Argh! Multiplayer doesnt work - nooo! Any chance of fixing this? Alternatively, you mention you have implemented your multiplayer version in several commerical and non-commerical projects - can you tell us what some of those are, so we can check those out. Thank you. Steve G

    ReplyDelete
    Replies
    1. Steve, thanks to your "nooo!" I decided to go and check what's wrong with mdice =) Ok, it seems to be working right now. I do not know what it was exactly... It wasn't working, then I re-enable debugger and boom, now it works. Something like a bug in GAE I guess.
      Anyway, it may turns unworkable again because of quotas. If it will, say me, I do "GAE quotas" payment.

      Delete
    2. Thank you very much indeed Anton! It's working now, yay :D !!

      Delete
    3. Hi Anton - my 30 yr once-a-month DND group have been using your multiplayer version for our remote gaming sessions (along with http://zoom.us ; herolab and 3dvtt).

      As others have mentioned, I would pay a reasonable price for a standalone multiplayer app version.

      I'll email you directly...

      Cheers

      Delete
  21. PS - I would gladly pay for this multiplayer program as is if you released it

    ReplyDelete
    Replies
    1. Write me email teal.na@gmail.com if you wish to discuss this =)

      Delete
  22. Hello Anton! Amazing Job!

    Yesterday I had an issue with the multiplayer mode, I was able to create a room but my friends couldn't join it. The couldn't pass the loading screen.

    I would totally pay for the app when it is released!

    An Idea for you. I have been using the RPG sound mixer, but unfortunately it was decomissioned, and now I do not have an alternative.

    Below is the software for better comprehension.
    http://rpg-soundmixer.software.informer.com/1.6

    Thanks!

    ReplyDelete
  23. There doesn't seem to be a way to create a room for the multiplayer mode, and if you try to join or put anything into the join room fields it just freezes when you click enter.

    ReplyDelete
  24. hello
    is there a way to add modifiers to the rolls?

    ReplyDelete
  25. I don't get the input box to create a room

    ReplyDelete
  26. I recently discovered this and was excited to use it but we can't see any options for password locking rooms, and whenever i try to host one the webpage just freezes with a buffering symbol!
    Plz halp. D:

    ReplyDelete
  27. I can't create a room
    How did i fix this ?

    ReplyDelete
  28. Hi!
    First of all: Great work! I would like to integrate the multiplayer version of your dice roller into my planned own (currently none-commercial) application. Could we discuss the terms via email?

    Thx in advance and I wish you a nice weekend!

    ReplyDelete
  29. I can't create a room either. :( Can I fix this?

    ReplyDelete
  30. Hello Anton!
    I am a user from Mexico who enjoyed your page with some friends, since the day that the Multiplayer began to fail we are broken because each one is from a different state, hopefully you can fix the multiplayer. We users will wait for your arrival as our savior.

    ReplyDelete
  31. I am not seeing an option to create a room just to join a room, asking for name and room number...is there a link for creating a room or is that part sill a WIP?

    ReplyDelete
  32. It seems like it is not letting me create a room. The page just locks up.

    ReplyDelete
  33. Hey, did you ever add the thing with the chromakey background, remove shadows, saturation and inverted dice colors?

    ReplyDelete
  34. Hi.

    I forget to say, it's done =)
    http://a.teall.info/dice/?chromakey=1&shadows=0&color=white
    or
    http://a.teall.info/dice/?chromakey=1&shadows=0

    Very greenish and without any text. Hope you will like it.

    ReplyDelete
    Replies
    1. Any chance we can do this in multiplayer so each person has a different color?

      Delete
    2. Yes, would love to have the chromakey multiplayer version, too, to stream my game with your dices on it !

      Delete
  35. im one of the people that cant find how to create a room

    ReplyDelete
  36. While I don't doubt I could be mental disabled on this, I can't create a room currently?

    ReplyDelete
  37. For some reason, there is no button to create a room.

    ReplyDelete
  38. Hi I dont know if it is some component missing but multiplayers isnt working. Its freeze on a load eternal spim

    ReplyDelete
  39. Multiplayer doesn't work to me also, it frezez and that's all. Using it on Chrome. What to do?

    ReplyDelete
  40. No way to use multiplayer again.
    This browser application was the best for my roleplay gaes with my friends =/

    ReplyDelete
  41. This app inaccurately calculates a d10 dice throw. The 0 on the dice actually represents 10. Aside from this minor defect, this is an incredibly useful app. Please fix it to make it even better.

    ReplyDelete
  42. This app inaccurately calculates a d10 dice throw. The 0 on the dice actually represents 10. Aside from this minor defect, this is an incredibly useful app. Please fix it to make it even better.

    ReplyDelete
  43. Same as many of the above - create a room functionality is simply not there. Love this app otherwise...

    ReplyDelete
  44. You will repair the multiplayer error? ^^

    ReplyDelete
  45. Any word on when the multiplayer will be fixed? This product could sell if cleaned up

    ReplyDelete
    Replies
    1. It works now... you was a last drop =)))

      Delete
    2. I see it works now! This is amazing. I am writing a game currently that doesn't use modifiers for roles just different dice to denote skill level, and this is perfect. How can we market this together?!

      Delete
    3. Write me details at teal.na@gmail.com, so we can start conversation

      Delete
  46. Hey! I found your dice app while researching online dice rollers because I was intending to make my own as I learn THREEjs! I'll admit I have made one of those ugly text based dice rollers, haha http://you-sif.com/dice/
    I've learned a lot just reading your source code and I was wondering if it's okay with if I use some of your code in my project. I'll credit you of course.

    ReplyDelete
    Replies
    1. Hi! Sure, you can use my code, it's free =) Good luck!

      Delete
  47. Wooh, found this two weeks ago and it was GREAT when rolling characters away from the DM (or when I dm and players roll their characters) so we can see the rolls instead of just trusting them not to cheat! It's great.
    Buuuuut.. today it kinda stopped working. Tried on both chrome and firefox on different computers.
    I can create rooms, chat, change dice and Clear... but when i press Throw the dicescreen disappears and I can only see the chat, and while the chat still works, he diceresult is just frozen, showing the timestamp, and then a greyed little boxtelling me what I'm about to throw, it just doesn't do that.
    Anything new that happened that broke? and any ETA on when whatever it is has been fixed if it is something ? :)

    ReplyDelete
    Replies
    1. Hmm... it seems kinda lag or other network issue. Try it later. If it still broken, PM me teal.na@gmail.com. I would like to ask you to gather browser console output (Ctrl+Shift+I to open it).

      Delete
    2. Guessing it was something with my network then, because now it works. :)

      Delete
  48. Feature request! Allow a change of the background color for a room. This would allow it to be chromakeyed for streams with an overlay/background wishing to use (and advertise) this awesome utility!

    ReplyDelete
    Replies
    1. Hey! Single player version has this feature.
      Check it here: a.teall.info/dice?chromakey=1
      I'm going to make some changes in multiplayer version soon (seems google app engine reduced maximal lenth of RPC requests), so I will keep in mind to add this feature too.

      Delete
  49. You should put a link to your git repository, so other programmers can help u with this. Amazing job, by the way!! Thanks for this!!

    ReplyDelete
  50. This is awesome! I'm loving the roller and helps me a lot with one remote player I have on my games table. However, the multiplayer version has a problem at the moment and it can't throw more than 3 dice or it just stops working. This happens already when trying to roll the default 4d6.

    Console output:
    THREE.WebGLRenderer 73
    teal.js:149 POST http://a.teall.info/mdice/f 500 (Internal Server Error)
    teal.rpc @ teal.js:149
    before_roll @ login.js:96
    throw_dices @ dice.js:779
    (anonymous) @ dice.js:823
    (anonymous) @ dice.js:17
    ajax.onreadystatechange @ teal.js:147
    XMLHttpRequest.send (async)
    teal.rpc @ teal.js:149
    prepare_rnd @ dice.js:12
    dice_box.start_throw @ dice.js:819
    (anonymous) @ dice.js:812
    VM53:1 Uncaught SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse ()
    at XMLHttpRequest.ajax.onreadystatechange (teal.js:147)
    ajax.onreadystatechange @ teal.js:147
    XMLHttpRequest.send (async)
    teal.rpc @ teal.js:149
    before_roll @ login.js:96
    throw_dices @ dice.js:779
    (anonymous) @ dice.js:823
    (anonymous) @ dice.js:17
    ajax.onreadystatechange @ teal.js:147
    XMLHttpRequest.send (async)
    teal.rpc @ teal.js:149
    prepare_rnd @ dice.js:12
    dice_box.start_throw @ dice.js:819
    (anonymous) @ dice.js:812

    ReplyDelete
  51. The response for the /f call for that one is:
    Internal Server Error
    The server has either erred or is incapable of performing the requested operation.

    Traceback (most recent call last):
    File "/base/alloc/tmpfs/dynamic_runtimes/python27g/9fae800fb98bd45d/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1535, in __call__
    rv = self.handle_exception(request, response, e)
    File "/base/alloc/tmpfs/dynamic_runtimes/python27g/9fae800fb98bd45d/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1529, in __call__
    rv = self.router.dispatch(request, response)
    File "/base/alloc/tmpfs/dynamic_runtimes/python27g/9fae800fb98bd45d/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1278, in default_dispatcher
    return route.handler_adapter(request, response)
    File "/base/alloc/tmpfs/dynamic_runtimes/python27g/9fae800fb98bd45d/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1102, in __call__
    return handler.dispatch()
    File "/base/alloc/tmpfs/dynamic_runtimes/python27g/9fae800fb98bd45d/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 572, in dispatch
    return self.handle_exception(e, self.app.debug)
    File "/base/alloc/tmpfs/dynamic_runtimes/python27g/9fae800fb98bd45d/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 570, in dispatch
    return method(*args, **kwargs)
    File "/base/data/home/apps/s~tealyatinasite/6.422165459662578054/wsgi/mdice/mdice.py", line 124, in post
    Action(cid=game.cid, action=dump).put()
    File "/base/alloc/tmpfs/dynamic_runtimes/python27g/9fae800fb98bd45d/python27/python27_lib/versions/1/google/appengine/ext/db/__init__.py", line 973, in __init__
    prop.__set__(self, value)
    File "/base/alloc/tmpfs/dynamic_runtimes/python27g/9fae800fb98bd45d/python27/python27_lib/versions/1/google/appengine/ext/db/__init__.py", line 617, in __set__
    value = self.validate(value)
    File "/base/alloc/tmpfs/dynamic_runtimes/python27g/9fae800fb98bd45d/python27/python27_lib/versions/1/google/appengine/ext/db/__init__.py", line 2855, in validate
    % (self.name, len(value), self.MAX_LENGTH))
    BadValueError: Property action is 1509 bytes long; it must be 1500 or less.

    ReplyDelete
    Replies
    1. Thanks for the bug report.
      They decided to reduce size of string properties in DB at last. Well, alrighty.
      I changed the code, it packs string now, so it would be working with dozen of dice now. Not the best solution tho, but who wants to roll more than 12 dice at once? =) Maybe I return to address this further...
      Anyway, have fun and thank you once again!

      Delete
  52. Server part is really useful in this time of quarantine ! good job !
    I could be appreciated to add custom dice (with image upload).
    I suggest you to give a look to an android app : Dice
    the icon looks like a blue D20 and coded by 7pixels
    when you buy the app, you can add custom dice and play some board game

    ReplyDelete
  53. So... the multiplayer thing simply hangs when I click "enter room."

    ReplyDelete
    Replies
    1. It may take a while, because of high network latency these days.

      Delete
  54. This is great! Only lacks that satisfying dice rolling sound to be absolutely perfect! I cant create a multiplayer room but by your recent comment i guess it is still supposed to be functioning,right?

    ReplyDelete
  55. Really nice piece of software! Juste a little remark though: adding to a roll doesn't work when throwing only one die... "1d12+4" doesn't sum up when "3d12+8" perfectly does the job.
    Anyway, thanks again.

    ReplyDelete
    Replies
    1. Hi, thanks. It was temporary feature, now it works as intended.

      Delete
    2. Hi Anton, very nice tool especially now for lockdown! Thanks!! I am experiencing the same issue with the single die + anything does not add up. I will just show X + X but no = or total. Tested with Safari & Chrome on a mac.

      Delete
    3. Yep, it was another typo. Thank you for report. Hopely fixed it.

      Delete
  56. Yes, this is by design. I know there is d100 with all 1-100 sides, tho. It looks like a roulette. I never liked it.

    ReplyDelete
  57. FYI, the most recent update has an issue where it shows a unique random code rather than the person's name when someone rolls.

    ReplyDelete
  58. Awesome dice roller. Like mentioned above, when rolling dice with others, it says some random code instead of the player's name. However, it'll say the name when they type words in the chat or enter the room.

    ReplyDelete
  59. Awesome! Thank you very much. Would it be possible to implement Fudge/Fate dice?
    Is the source code available somewhere to download?

    ReplyDelete
  60. We also showed GUID for users...

    More importantly I wanted to donate using PayPal but everything came up in Russian and while I'm normally logged in I was not this time... any way you can update the donation to be in the user's language and logged in? The domain looked right (paypal.com) so I'm unsure why I wasn't logged in by default.

    ReplyDelete
    Replies
    1. Thanks.
      I will try to get rid of these GUIDs.
      About Paypal. It should work with your locale. Very interesting, I will investigate. Right now it seems I can't change language, and this is weird.

      Delete
  61. This comment has been removed by the author.

    ReplyDelete
  62. This comment has been removed by the author.

    ReplyDelete
  63. Great code! I love these dice. One critique...
    Maybe this was by design, but your implementation of percentile dice diverts from the standard usage. When a single d10 is thrown, 0 = 10. However when percentile dice are used, when looking at the 1's place d10, 0 should = 0, not 10, such that a result of 60 and 0 = 60, not 70 as calculated by by your method. The obvious work around is to select d100 + d10 -1, but that is a poor hack.

    ReplyDelete
  64. Love this!
    I wonder if the dice can roll over a website? If I create a website where players can choose all their character features, stats, inventory, etc which winds up on a character sheet page, could this dice roller animation happen with the character sheet in the background? So it’s like sitting at a table with friends and having your sheet on the table and rolling dice as you would in real life?

    ReplyDelete
    Replies
    1. In your own website -- yes. The canvas is transparent, and all your own content will be visible.

      Delete