floatinghotpot / casino-server

:fire: An online poker game server powered by Redis, node.js and socket.io
MIT License
1.04k stars 469 forks source link

GUI ? #6

Open shtefcs opened 9 years ago

shtefcs commented 9 years ago

Hi there Ray,

Is this code have GUI as well or it's just server like u said. I am interested in paying some freelancer to build me poker game, so thats why I am asking.

floatinghotpot commented 9 years ago

The purpose of code is just server itself.

It comes with a very simple web app as client, but it's quite plain and for demonstrating the features of server only.

shtefcs commented 9 years ago

So we have game logic there , which need to be putted in GUI ?

floatinghotpot commented 9 years ago

client.js is the api interface to interact with the poker server, https://github.com/floatinghotpot/casino-server/blob/master/lib/client.js

Here is the example to implement a GUI: https://github.com/floatinghotpot/casino-server/blob/master/wwwsrc/main.js

shtefcs commented 9 years ago

Ok thank you very much Ray. I will find some guy to try to integrate it for me and let you know if we have any questions.

tnx again

shtefcs commented 9 years ago

Btw Ray, let me ask again, are u interested working on this ? Me and my gf are working on front end & design, your part would most be backend. If yes we can create odesk contract if your prices are affordable for me. Add me on skype:ksifoking for faster chat.

remadrivan commented 9 years ago

Hello bro, Can I add you on skype? I will help you integrate the poker game :)

shtefcs commented 9 years ago

@adrivanrex Yes ofc, add me :)

jelenajjo commented 9 years ago

Hi Ray,

I just started with designing the UI for the app and I don't quite understand how to do that, so I hope you can help me a bit.

What I am trying to do is to separate this game room list, so each information inside <li> has it's own class. For example like this. How can I give each of them different class and in what file to check them?

Or maybe the logout button at the bottom left, how can i put it inside html file instead being defined in main.js file?

I am just trying to see some example how can i create design trough .html files and connect them with that functions that are defined trough javascript files.

floatinghotpot commented 9 years ago

hi jelena, you can design the html part and put a button to anywhere as you wish, when the button is clicked, you need to handle the onclick event and call the API in client.js.

jelenajjo commented 9 years ago

And how can I see what is the api for that logout button for example? In what file, and how is defined? This is totally new thing for me, so I have to ask detailed like that in order to understand. :)

floatinghotpot commented 9 years ago

client.js is the api interface to interact with the poker server, https://github.com/floatinghotpot/casino-server/blob/master/lib/client.js

Here is the example to implement a GUI: https://github.com/floatinghotpot/casino-server/blob/master/wwwsrc/main.js

jelenajjo commented 9 years ago

yes, I was looking at those codes but still don't understand from that how to implement a gui in .html file, not trough javascript. I see that this is far more complicated then I thought it will be.

floatinghotpot commented 9 years ago

what i wrote in main.js is to dynamically present the dialogs and buttons whenever server push prompts.

in your app, you can just simply display normal button, when it's clicked, then call the client API:

client.rpc("login", {
   uid: "u0001",
   passwd: "secret"
}, function(err,ret){
   // handle the returned error code and data
});
meiry commented 8 years ago

@floatinghotpot
If i change the wwwsrc to www and then run http://localhost:7000 im getting javascript error

Uncaught ReferenceError: require is not defined(anonymous function) @ main.js:2