![]() ![]() Most of what I know about Java, JavaScript, WebSockets (wrote my own implementation. I wasn't ready and willing for that kind of commitment. But then I realized that if I want to manage an MMORPG the way it deserves, I don't just need to quit my day-job but also hire a whole bunch of people to create content and manage the community. I even had a bunch of working maps and a fully functional tutorial. After a few years of after-work and weekend development, the technology was practically feature-complete. I also developed an MMORPG all by myself. You want to build an MMORPG all by yourself? If you are just doing it for the learning experience, then go for it! There is a very wide variety of useful skills to pick up in the process. But considering that you seem to be on a tight budget and thus likely can't afford top-notch peering in local datacenters all around the globe, you might want to go for a combat system which emphasizes strategy and tactics over reaction speed and dexterity.Īny other advice about this sort of thing? It depends too much on the combat system of your game and on how good the internet connections between your players and your server are. I'm sorry, but that's impossible to answer. ![]() ![]() The ideal tick-rate depends on the game and is something you need to find out through test-play, but usually the more action-oriented a game the more does it benefit from a higher tick-rate.ģ: Is Websocket fast enough for PvP combat? Most online game servers run with a fixed number of ticks per second (usually something between 10 and 100). Only send a message when Bob started moving and another when Bob stops moving or changes direction. Sending "Bob is still standing on 45:67" every millisecond is quite pointless. Only send data when something has actually changed. So if you can predict with reasonable sincerity that the server will confirm an action, you should execute it without waiting for that confirmation.Ģ: How often to send data to the clients? When the reaction to each input is not just delayed but delayed irregularly, your game will seem very unresponsive and laggy to the player. Websockets use the TCP protocol, which can have very irregular latencies from time to time (which is usually why UDP is recommended for real-time games, but that's not available to browser-based Javascript). Cheers.ġ: Should the client wait for confirmation before moving the player? With UDP, data is sent back and forth super fast partly in thanks to its unreliable nature, right? With websockets, will the communication between clients/server be fast enough to process something like a player attacking another player?Īny other advice about this sort of thing would be great, even if it's just links to existing documentation/examples. I want to include some PvP style combat in my game but am not sure if the websocket protocol is suitable for this.But how often is it ok for clients to send this data back to the server and the server to broadcast the data to all clients? I could do these things every 1ms which would make everything as smooth as possible, but wouldn't this kill the client/server or at least use a truck-load of bandwidth? I only have a very small VPS and wouldn't want to overload it by sending 1000 JSON objects to a bunch of clients every second when I don't have to. Currently I just have x and y positions for players. The data going between server and client will initially be very simple.If a player presses an arrow key on their keyboard, should it send that information to the server, then the server says it's ok, then the client does it? Or should the client just do it anyway then the server validate it after-the-fact and correct the client if they perform an invalid action? I understand there'll be unsynced client-side code and synced server-side code.Some questions I've had so far when thinking about how I'll go about implementing it: Although, I feel more than confident with server-side/client-side JS so it's mostly just about learning concepts for me. Inspired by BrowserQuest, I want to try my hand at making my own kind of game like this but I don't really know anything about game development other than the basics, like how the game loop works. ![]()
0 Comments
Leave a Reply. |