Pages:
Author

Topic: Free open-source Dice Script with Chat Box (Provably Fair) with Admin Panel (Read 539 times)

newbie
Activity: 2
Merit: 0
Thank you very much , i also soon i will share with you what i've done Cheesy
legendary
Activity: 1918
Merit: 1728
I really loved your work , please complete deposit withdrawals for us! please please !:D

Thanks. Ain't free for next couple of months. So, most probably will try to add this in January. However, no commitment.

When I first commented in this thread, I knew javascript and node.js barely. Now I can (almost) understand everything in your code. I think that's called "progress". I still find it fascinating how you put these together in such a short time frame though. It would a week or a month for me probably.

This project also made me switch from python( django) + sql to js/mongodb. Now this stack is my favorite.

Haha, good to know that I made you JS freak. And about completing the script in 4 hours, I re-used major chunk of the code for user authentication from my other project that I built before for learning purpose. However, the game script and other functionalities were written on that very day.
legendary
Activity: 3276
Merit: 2442
This project also made me switch from python( django) + sql to js/mongodb. Now this stack is my favorite.

Once you switch from django, you'll never look back because the way it makes you write HTML, it's like shoving two languages in your project instead of one (Python and JS) because Python can't do anything on the browser side.

So it's like to make use of Django for a production site, and this applies to other python web frameworks, you have to not only know Python but even Javascript [as there will be some logic inside the JS forms, inputs and stuff that requires processing before it's sent to server].

It's a general deficiency of web frameworks in particular, regardless of the language they were written in (except for JS frameworks obviously): Rails, CakePHP, Tomcat, ....

True. I was having problems with understanding Django. Flask was much simpler. Did a couple of basic projects with flask/mysql and had no problems. Django was a mess. Couldn't even finish what I started. Now I find node.js/react/vanilla/mongodb stack better than anything. Javascript is just so good. It is fucked up in its own way and even then I still like it.
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
This project also made me switch from python( django) + sql to js/mongodb. Now this stack is my favorite.

Once you switch from django, you'll never look back because the way it makes you write HTML, it's like shoving two languages in your project instead of one (Python and JS) because Python can't do anything on the browser side.

So it's like to make use of Django for a production site, and this applies to other python web frameworks, you have to not only know Python but even Javascript [as there will be some logic inside the JS forms, inputs and stuff that requires processing before it's sent to server].

It's a general deficiency of web frameworks in particular, regardless of the language they were written in (except for JS frameworks obviously): Rails, CakePHP, Tomcat, ....
legendary
Activity: 3276
Merit: 2442
When I first commented in this thread, I knew javascript and node.js barely. Now I can (almost) understand everything in your code. I think that's called "progress". I still find it fascinating how you put these together in such a short time frame though. It would a week or a month for me probably.

This project also made me switch from python( django) + sql to js/mongodb. Now this stack is my favorite.
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
I really loved your work , please complete deposit withdrawals for us! please please !:D

I think this is just a concept so webtricks is not going to add those features just because someone requested for them (they are very specific features which highly depend on what your cold storage is).

Nevertheless, this code could be useful for me if there's a probably fair RNG inside of it (I just need that).
newbie
Activity: 2
Merit: 0
I really loved your work , please complete deposit withdrawals for us! please please !:D
legendary
Activity: 1918
Merit: 1728
legendary
Activity: 3276
Merit: 2442
I started to learn django 1-2 months ago. Wasted so much time with the basics before that because I had zero programming background. Sometimes I still get confused though. There are still certain parts I don't understand well enough.

I was trying to make something like this by myself but It was a mess.

That'll help me a lot.

And about your database choice, I guess I am pretty new there and like you I only know one and it is, mysql.  Grin I know I have to dump it somewhere in the future but every goddamn tutorial I watched was teaching it so I learned it. :/

I'll look into mongo but trying to learn too much information too fast makes things even more messy.

legendary
Activity: 1918
Merit: 1728
I'd like to ask another question. Any particular reason for using mongodb over sql? (mysql, postgre)

One reason was this:
Hi Dave,
We are getting numerous SQL Injection attacks everyday. Although site is adequately secured against such attacks but everytime someone tries this hack attempt, it alters the content of user.ini file and turn on the error_reporting. I have to manually turn it off.
I am not a big fan of PHP+SQL. That's why we are shifting our assets to node.js based application and now we are building new database in MongoDB.

But the most important reason is that I only know MongoDB because that is what I learnt with Node.js. Cheesy I know some basics of SQL but not sure if I can manage it on my own in production. I have to be dependent on someone. While with MongoDB, I can completely assure maxima security of database. Not to ignore the fact that MongoDB is really cool db system and comes with amazing GUI software - MongoDB Compass which is completely free.

What I am going to do with this, is I am first going to understand it in js then I'll try to port it to python. May never succeed but I'll try. (invested so much time in python, can't just dump it away like a shitcoin)

Actually I made a bitcoin related tool following this method too. Just the process was reverse, I coded thing in JS taking help from Python code.
legendary
Activity: 3276
Merit: 2442
Fair enough. I give you credits.  Cool

I'd like to ask another question. Any particular reason for using mongodb over sql? (mysql, postgre)

What I am going to do with this, is I am first going to understand it in js then I'll try to port it to python. May never succeed but I'll try. (invested so much time in python, can't just dump it away like a shitcoin)
legendary
Activity: 1918
Merit: 1728
So currently me with support from 2 developers are trying to create unique  casino games that aren't available on any other gambling site right now. I can't disclose everything right now but if everything goes as we planned, we will launch something big soon.

I already have my game ready and now shifting its backend from PHP to node.js. Let's see how it goes.

LoL you didn't code this in 4 hours. You didn't do it by yourself neither. It took you months and you took help from 2 devs.

Damn I was too impressed much too quickly.

You still deserved the merits for sharing the code though. It will serve me great while learning js.

You also said:
we will launch something big soon.
I guess that something big isn't coming.

You really think I will need the help of 2 devs and 2 months to code a single page dice game and call it what 'unique'? What you have read was written by me in reference to DogeDraw. I was part of the project which was started as a dogecoin lottery but didn't work out. Then we bent on to work on something big and better. So we have created a platform with 8 multiplayer games and one unique table mode which none other crypto gambling site provide at the moment. However, due to some differences I left the project last month and I am no longer the part of the team. They are planning to launch the site next month and most probably I will be the one who will create ANN and Signature campaign for them on Bitcointalk. But it will just be a paid job and I won't officially be the team member.

As far as this script is concerned. This is truly and purely my work. I written the whole script in just 4 hours - models, routers, controllers, views, everything I typed manually man! Give me some credit.  Cheesy


legendary
Activity: 3276
Merit: 2442
So currently me with support from 2 developers are trying to create unique  casino games that aren't available on any other gambling site right now. I can't disclose everything right now but if everything goes as we planned, we will launch something big soon.

I already have my game ready and now shifting its backend from PHP to node.js. Let's see how it goes.

LoL you didn't code this in 4 hours. You didn't do it by yourself neither. It took you months and you took help from 2 devs.

Damn I was too impressed much too quickly.

You still deserved the merits for sharing the code though. It will serve me great while learning js.

You also said:

we will launch something big soon.

I guess that something big isn't coming.
legendary
Activity: 3276
Merit: 2442
What I mean is when you gonna make your ANN thread and start a signature camp for your casino? Cheesy

Kidding,

What I really meant was when will you enable to deposit real coins?

Maybe make it available for shitty doge first then move to btc.

You already come this far don't you want to make it a real casino?

*like I guessed, gotta jump to js asap. Nothing else is needed.
legendary
Activity: 1918
Merit: 1728
Did you have any background as a software developer before this* or you learned all these after DS suggested it? If you managed to learn all these by yourself in 8 months I'd say that's impressive af.

*I understand that's your hobby but what I wonder is, did you know anything (js, html, css etc) at all before August 2019 or you started from zero?

I am learning python maybe a bit longer than that but I feel like I am wasting time with it while javascript is already there and ready, you know. Probably shoulda switch to js asap.

I know HTML and CSS since I was 14 years old but I never learnt any programming language before DS's suggestion. It was only after he suggested about JS and Node.js that I took courses for both separately. First I took Node.js course and watched quick YouTube video to understand basics of JS before starting but it didn't help much. So I paused the course and took detailed JS course. Once I finished that, I resumed Node.js course and perfected both.

Quote
When do we deposit? Smiley

I am sorry but I didn't understand this. What are you saying?
legendary
Activity: 3276
Merit: 2442
Did you have any background as a software developer before this* or you learned all these after DS suggested it? If you managed to learn all these by yourself in 8 months I'd say that's impressive af.

When do we deposit? Smiley

*I understand that's your hobby but what I wonder is, did you know anything (js, html, css etc) at all before August 2019 or you started from zero?

I am learning python maybe a bit longer than that but I feel like I am wasting time with it while javascript is already there and ready, you know. Probably shoulda switch to js asap.
legendary
Activity: 1918
Merit: 1728
Well done @webtricks, am really impressed!
Since the script is mainly for testing purposes, it would be better if you make it accessible without registration just to make things easier.
Also, why not using a nonce instead of changing the server sees for each roll!
Are you going to add auto-bets?
I would suggest to add an address for donations if anyone wants to help with server costs.

Thanks Khaled.

I have made server seeds unique to each account so it is not possible to set up that system without logging in.

I agree it's better to keep changing nonce rather than server seed if player doesn't change the client seed but the system I implemented generates server seed synchronously so the new seed is shown to player almost instantly hence it doesn't affect site performance in any way. So it is better to let player have new set of seeds for every game if I can make that happen without affecting performance.

Auto-bets can be done. Not much difficult and maybe half an hour work. Will add to the script in free time.

Also, I don't care about server costs tbh, lol. I do web development as a sheer hobby. Professionally, I am employed in financial field. But tech attracts me so I learn things online. Do you know where it all started? Here:
https://bitcointalksearch.org/topic/m.52315553

Darstar_ suggested me to learn Javascript and Node.js to go on with gambling site development and took the suggestion really serious, lol.

I have big hosting plan and it can sustain all of my sites with even 100 times the traffic I am receiving right now. So no problem.
legendary
Activity: 2702
Merit: 3045
Top Crypto Casino
Well done @webtricks, am really impressed!
Since the script is mainly for testing purposes, it would be better if you make it accessible without registration just to make things easier.
Also, why not using a nonce instead of changing the server sees for each roll!
Are you going to add auto-bets?
I would suggest to add an address for donations if anyone wants to help with server costs.
hero member
Activity: 2352
Merit: 905
Metawin.com - Truly the best casino ever
Well, nice but there are a lot of dice script and I guess that's a waste of time? But testing of your web skills at some point.
I think dice is very connected to bitcoin because first btc dice website was created in 2013 (after 4 years from bitcoin) and a lot of crypto casinos started with it, dice become like bitcoin's exclusive game.
I think it won't be bad if bitcointalk community work on developing of dice script and have a dedicated thread like epochtalk to gain attention of people.
It's just an idea, not something necessary so don't quote with insignificant answers.
legendary
Activity: 1918
Merit: 1728
Installation Guide for Windows

Setting Up the Database - MongoDB Setup

Step 1: Download the MongoDB Community Server from here: https://www.mongodb.com/download-center/community. Select 'ZIP' from 'Package' option.

Step 2: Once downloaded, extract the folder to somewhere permanent, for example in Local Disk (C:).

Step 3: The name of the folder will be something like this: 'mongodb-win32-x86_64-2012plus-4.2.6'. Rename it to something similar like 'mongodb'.

Step 4: Now create a new folder in the same location where you have extracted folder in previous step (Not inside previous folder but in the exact location i.e. Local Disk (C:). This folder will be used to save database so name it something like 'mongodb-data'.

Step 5: Now head over to your command prompt. Run this command:

Code:
C:/mongodb/bin/mongod.exe --dbpath=/mongodb-data

Note that the command starts with the location of your folder followed by folder name and then /bin/mongod.exe command. Then provide space for --dbpath flag. Don't provide space after '=' and your database path should start immediately after equals to. You don't have to mention root folder i.e. C:\ in dbpath. So if your database folder is in Users folder which is located in C:\ then your dbpath shall be: --dbpath=/Users/mongodb-data.

Step 6: Console will output lots of data once you but somewhere 8-9 lines from bottom, you will see this output:



If you see this command then your database has been setup accurately and you are ready to run your dice script now.



Dice Script Setup

Step 1: Open new command prompt window. Don't stop the function in first window or close the first window else mongodb running on your system will stop.

Step 2: If git is installed on your system then run this command in second window:

Code:
git clone https://github.com/web-tricks/dice

Else head to https://github.com/web-tricks/dice and download the code in ZIP format and extract where ever you want.

Step 3: Once github is done cloning or you have extracted folder on your computer, open folder in your command prompt. If you clone using command above, you simply have to write 'cd dice' to enter dice folder.

Step 4: Once you enter the dice folder, run 'npm install' command to install all packages needed for the script to run.

Step 5: Once all packages have been installed (it will take 1-2 minutes max), run 'npm run dev' command to run the script locally on your system.

Step 4: If you see the message 'Listening on 3000', it means you have correctly set up the script. The message will be something like this:



Now head to your browser and open: localhost:3000 and you will see the local implementation of your script. Any other doubt, do ask in this thread. Thanks!

Pages:
Jump to: