Nitramite Poker Pocket back end server was developed to run Texas Hold'em games. It's powering Nitramite Poker Pocket game. This back end is pretty lightweight and can run thousands of rooms easily.
Original reason I shared this code here was that I wanted to find someone who wants to create Virtual Reality front end with Unity or any other game development platform. Time has passed so much that I gave up and will no longer develop this further. I also changed license to MIT allowing anyone build anything top of this, but don't expect help from me since I have moved to other things long time ago. I may however sometimes check this repository out to update dependencies.
Here's list of different front end clients. You may want to take a look at them to see what it's all about.
/src/app
folder..env
file with following contents and provide database connection properties.DB_DIALECT=postgres
DB_USER=database_user
DB_HOST=database_host
DB_DATABASE=PokerPocket
DB_PASSWORD=database_password
DB_PORT=5432
SERVER_CMD_PASSWORD=anypasswd
npm install
npm run dev
on development environment (uses nodemon)dev
to open connection
to localhost web socket.Optional: If you need created user to play automatically, go to browser console and type:
To create front end, it's essential to know how communication works.
Data transmission itself is build on top of web sockets and every message moves with specific key
name.
I try explain steps in simple way:
connectionId
is generated which is basically integer with auto increment.
Also webSocket library generates socketKey
which is also returned and used for verification of requests from front
end.getRooms
or getSpectateRooms
key which is then answered by same key name
but result having array of rooms.selectRoom
or selectSpectateRoom
key to back end.roomParams
to render view
according to state of room..gitignore is ignoring HandRanks.dat which is huge file
Before this project used MySQL NodeJS package but
it's now changed to Sequelize to support multiple database platforms.
See https://github.com/sequelize/sequelize for different connectors.
This back end come by default with pg
and pg-hstore
for Postgres.
MIT