First of all I am a self-taught programmer/developer, sorry for some obvious questions. This topic is more of a design questions than programming.
I have a.t.m an Android game live at play store, I use 3rd party backend and networking solution. Now I want to build my own simple backend and networking solution. Why? Because:
- The ability to add new functionality free of
- Moving gamelogic from client to server-side
- Learning about backend development
- Learning about networking (not p2p, so no hole punching)
- Getting experience in server-side development and technologies
For your information, my game is some sort of Spades.
Now my questions:
I am thinking to use node.js, socket.io and mongoDB to create my backend system.
These are what I want to do:
- Just sending from server to client and vice versa
- io.to(socket#id).emit('hey') (server to client)
- socket.Emit("JoinRoom") (client to server)
- User Authentication
- Registering player information (name, unique id, score, date
- Updating scores each time
- Registering friends list so they can play together
What will my gamelogic do for each room (ATM my gamelogic is totaly client side, so vulnerable to hacking and cheating):
- When room created, wait for 10 seconds so other people can join
- When 10 seconds are over, call a function that handles the startup
- Randomize 52 deck card
- AI choosing bet
- AI choosing trump
- AI playing when it’s his turn
- Determining who has the next turn
- Determining who has won
- Updating scores in the database
- When the game is finished opening the room so people can leave and
join the game
Is it possible to create this with node.js, socket.io and mongoDB? And if yes is it smart thing to do it with node.js, socket.io and mongoDB or is it better to do it with another technology?
Or should I use node.js and socket.io for the networking part, and another technologie(example asp.net) for game logic? I have read that node.js is not good at CPU heavy tasks, and I think the gamelogic part is CPU heavy.
Maybe some of you may want to know how much player my system will support? Well atm I have daily 20 CCU but my game is for 3 weeks in store and I don’t promote a lot because I want first a strong backend system. I want my backend be able to handle 10 000 CCU, maybe I will never reach it but that’s my aim.
I hope I was clear about what I want, let’s hope you guys can help me out. I have looked for a week if what I want to do is possible and efficient.