\[advice\] Ambitious project \* I want to do more - try setting up p2pool
-
Hi all,
I’d like to start a learning adventure and I have no idea where to begin. Essentially I want to create a trading engine, like many of the games already out there, so that players can send money to an address, the server picks up the incoming FTC and the associated sending address, and stores this information. It then awaits the results of the game, and then if the address associated is a winner, it transfers automatically the winnings back to the client who sent the FTC.
So, firstly, I have no coding experience, but I do understand the logic involved. I’m assuming the calculations etc will have to be done in PHP, serverside. Is anyone familair with any open source code which does this function already, or will I need to create this from scratch? Games such as [url=http://www.satoshioption.com]www.satoshioption.com[/url] already utilise this basic premise, but I can’t find anywhere which sets out the steps to do it.
If I can create this then I have an exciting idea which would increase the exposure of FTC to a much wider audience. Am I being too ambitious to start with?
-
Lovin the ambitious project
-
Currently not going anywhere 'cos nobody has any helpful comments :(.
Seems I should be able to connect to the block explorers API and have a script watch the blockchain for any transactions sending money to an address. No idea how to do that yet though :D
-
You will need to dig deeper into database stuff like mySQL or Microsoft SQL, mySQL is prefered since its more cleaner and more “effective” and most webhotels support mysql out of the box.
Microsoft have some extra functions as far as i know but i dont know exactly what.I learned microsoft SQL trough school, but looking at mysql its basiclly the same with some small difference as to control commands.
Also you will need to learn some kind of language for the “drawing” itself, if its PHP/JAVA/C#/JS doesnt really matter. Each has their positive and negative sides.
I created a lottery system with users, tickets, random draw of numbers etc in an school project. let me tell you, its not a small project you are looking at.You could get away a bit easier with some sort of java app
using arraylist or list for holding users/betting number/ftc adress.
create an arraylist or extract all the betting numbers in the other arraylist and put them in an separate arraylist.
then use the function Collection.shuffle and get the numbers at example place 0,1,2 (1,2,3 place). then do an iteration to check the winning numbers against the numbers beeing played.
Create a method that divides the total amount of tickets played/pot and split out the percentage regarding 1.2.3 placecreate a server/client side (server holding commands, “database”), while the client only works as a frontend for the user to play lottery, all functions goes trough the server (java has easy built in socket classes for communication)
You should be able to program the server side to handle towards a ftc client (not quite sure about this one, havent looked to good in to it) -
I wish I’d done more like this at school :p. Thanks for the advice, I’m currently learning CSS and HTML trying to build the front end, but this is helping me become familiar with programming. I’ve gotten hold of WAMPserver for when I start to go through PHP, MySQL etc. What I want, at the end of the day, is a website with a simple two page interface; one to select the competition, and two with the info to place your bet, and the current pot.
So, a user sends coins to a specified address (depending on the bet), which can be picked up by JSON API from the feathercoin explorer? This then is inserted into a database with a copy of the amount of FTC, plus the sending address. Once confirmed, this is listed in a table on the second page.
That is my first challenge :)
-
I would recommend trying to set up your own pool.
That way you get some insights into how ftc works, some example of internal db usage for counting shares. How to comunicate between web frontend/db/ftc daemon and so on.Good learning experience and covers a bunch of the stuff on your list
Also theres alot of info on the matter if you google 8)
Then you just need to learn some functions to generate the random drawing and such