10 ms·
Show HN: Unity MMORPG Boilerplate – Multiplayer in Unity Made Easy
- valkyrienyanko 6y agoThe purpose of this boilerplate is to make multiplayer in Unity a piece of cake, specifically for MMORPGs. The boilerplate consists of a launcher, a web server, a game server and a client. The idea is the user loads up the launcher, updates the client, launches the client, logs in to an account through the web server and then connects to the game server.
- NanoWar 6y agoLooks like a Dektop only version. Any plans for mobile?
- valkyrienyanko 6y agoFrom what I've seen Unity (the client) can be ported to any device. The launcher uses (Avalonia) which is cross-platform (Windows-Linux-MacOS), not sure about mobile though. Now that I think about it, I suppose there could be different ways to go about mobile and just avoid the launcher entirely.
- kevingadd 6y agoSince the "Massive" in MMORPG implies large scale, some things worth considering, plus some general thoughts: * You checked in your .vs folder, my understanding is that it is the .suo equivalent and shouldn't be checked in. * Pulling updates from the GitHub releases page will probably get your repository rate-limited if not taken down, you need to think carefully about how to scale that up. * While the readme says it pulls updates from GitHub, I can't find any code that actually does it. As far as I can tell the Launcher folder is completely empty boilerplate. * Using XAML for the launcher UI seems like it would negatively impact portability unless you're pairing it with something that supports Mac and Linux (I couldn't tell if you are). It would make a lot more sense to implement your launcher in Unity (as a separate executable) since the end-user already is using Unity. * You appear to have checked in local copies of NuGet packages, which is a bad idea. You should gitignore that folder so developers' msbuild can restore the packages locally. * It looks like you also checked in third-party Unity asset files? I'm not sure you should do that either. * You appear to not be making use of indexes for many of your queries, for example: var user = db.Users.ToList().Find(x => x.Name.Equals(name)); This will stop scaling almost instantly.
- fxtentacle 6y agoFor unity users, "massive" means something like 64+ concurrent players. Because that's the limit for (custom engine) triple-A productions like Battlefield.
- deathgrips 6y agoToday I learned that Runescape is where the real men write backend game servers.
- Mirioron 6y agoEven then, if a server is even half full (1000+ players) the game becomes laggy for everyone. Furthermore, if you go into an area with hundreds of players, then the client can't actually render them all without huge performance issues. If you want to see this in action then go make an account in RS, play the tutorial and once you get to Lumbridge go to World 84 to the bank chest near the forge in Lumbridge. If you do it at European prime time and stand on the tile next to the bank chest then no other players will render on your screen. You'll still have a low frame rate though.
- kevingadd 6y agoOne MMO I played (Aion) was so bad at this that a prerequisite for open-world group PvP was to go into the settings and adjust the 'number of other players to render' slider down to 1. The fact that the game had a setting for this demonstrates that the developers had already resigned themselves to the fact that their engine couldn't actually handle high player counts. Under normal circumstances stuff was fine but once you had 1-2 dozen players running around, not so much. In practice it wasn't utterly horrible to play this way, it was just very surreal to be running around engaging in combat with name-plates floating in the void.
- Mirioron 6y agoThis is standard though. You either suffer unplayable performance or you have a setting like that (eg Lineage 2 suffered from this - what many consider the predecessor to Aion). The main problem usually is the number of draw calls. Due to the customizability of players every player character is likely to have multiple draw calls. You can't batch them well either, because few of the players will likely have the same things on. This essentially means that every player is quite expensive to render. Hopefully dx12 and vulkan will improve this, because it should now be possible to do draw calls from multiple threads.
- kevindeasis 6y agoHow do you usually handle game state for online multiplayer games to avoid cheating? My background isn't on making games, but knowing more about this domain is something I'm curious about I'm guessing you can use timestamp by having PlayerA and PlayerB send udp packets, but wouldn't that cause latency, even if you put the instance region zones close enough to both players? How about direct socket connection between PlayerA and PlayerB and sending some results to the backend, but how do you prevent cheating on the client side then?
- nightowl_games 6y agoYou run the real simulation on the server, and clients merely predict what they think the server will do.
- hombre_fatal 6y agoI remember in World of Warcraft, your internet connection could drop completely and you wouldn't notice until you realized you hadn't seen mobs or another player for a while.
- skocznymroczny 6y agoWorld of Warcraft is not fully server authoritative. There have been speedhacks going on. Also, an entire guild was banned once because they modified the client-side model files to remove the stairs in the dungeon, allowing them to fall down the pit and skip most of the dungeon.
- slifin 6y agoI found this out recently when playing wow classic I somehow fell out of the sky, and survived when on a computer "controlled" Griffin, if I had any control of the bug I could use it to drop off in more convenient locations
- skocznymroczny 6y ago
- fxtentacle 6y agoI wonder if there really is that many people using Unity to build MMORPGs. Especially now that Unity has deprecated their only networking stack in favor of a (not yet existing) future replacement. But the Unity asset store is also full with MMORPG related things.
- BorisTheBrave 6y agoThere's a lot of new gamedevs who decide they want to build an MMO. They never succeed, but this would be useful to them.
- makkesk8 6y agoThere's an open source replacement [1] for UNET that's been improved. [1] https://github.com/vis2k/Mirror https://github.com/vis2k/Mirror
- valkyrienyanko 6y agoMirror does not support UDP and does not go well with headless servers iirc
- moksly 6y agoAlbion Online is build with unity. It’s basically Eve Online in a fantasy more newbie friendly setting with league of lengends styles combat, ARPG styles solo PVE, 20 man raids, and, mining that’s actually fun. Works pretty well, even in massive fights with hundreds of people involved. Frankly handles the MMO part of things better than most MMOs.
- dukodk 6y agoA good video of it from 2016 https://youtu.be/x_4Y2-B-THo https://youtu.be/x_4Y2-B-THo
- golergka 6y agoYes, professionally I see a lot of commercial MMO projects targeting Unity as a client. It's network stack was never intended for MMOs anyway, it was always targeted for client-hosted session-based games with very limited scope.
- HenryBemis 6y agoStaying on the "making games" domain, can anyone suggest some other simple way to create a game? I have done coding before, but never got engaged into making a game, I would accept any ideas for nature of games, anything between Shilla.org, flash games, anything that can be made and maintained by one person.
- Jakob 6y agoI enjoyed the articles on https://www.redblobgames.com/ https://www.redblobgames.com/ a lot in the past. They are nice starting points for making a game.
- frenchie14 6y agoThe best "easy to learn, hard to master" that I know of is PICO-8. You can get up and running with a simple game incredibly fast. The entire IDE/Engine is a single program. You write all code, draw all sprites/maps, compose all music/SFX, and play in one place. You will be surprised with what people who have mastered it can create. https://www.lexaloffle.com/pico-8.php https://www.lexaloffle.com/pico-8.php
- hombre_fatal 6y agoSuch a great way to test out some simple game mechanic ideas. I'd been "planning on building a game" for probably a decade. Pico-8 got me to finally "finish" a few. The integrated graphics and audio system is super useful for cobbling something together.
- deathgrips 6y agoUnity and Unreal Engine are the only realistic options for 99% of indie developers. Yes, you can technically program your own game engine, but if you are asking advice for simple ways to make games, that is not the best option for you right now. There is a lot of really good education content for those two game engines. Most importantly, people use them to make and sell games. More important than any particular route you take is merely sticking with it. The choice of game engine doesn't matter that much as long as you make and finish games with that engine. Everything else is secondary and mostly procrastination.
- namelosw 6y agoI'm a web developer but I tried to understand how to build an MMORPG similar to World of Warcraft sometimes ago. It turns out to build a solid solution that is largely overwhelming to individuals, and I yet to found an open-source framework that tackles these issues in a straightforward way. To my shallow understanding, it's less about Unity, the game client, despite there are many protocol related works. Here are something I found really hard for me: 1. The first step is basically rebuilding all the game logic in the server-side, or you'll be facing endless cheating. The combat, the inventory, especially the map - you're going to model a huge 3D world on the server-side without existing client-side GUI helpers. 2. The most difficult thing is most of the states need to spread across the whole cluster like a distributed database, and keep sync because there might be interactions between those states (eg. shoot a fireball through the edge of the map to another map then hit someone), this usually done by modeling a quadtree across the cluster. 3. Players can randomly fight each other in an open world, and those combat needs to be dynamically grouped and disbanded. Players should only receive the state update they care about, instead of receiving every information of the world(area of interest), and everyone's interest might be different. 4. Of course, there are global clock and synchronization. 5. Many operations would require transactions, or players can trade and duplicate items when they cross the border of maps or directly disconnect.
- moonchild 6y ago> rebuilding all the game logic in the server-side Start with the server side. This doesn't actually have to be a server application with no gui, but start with the simulation of an entire world. Then 'rebuild' the logic on the client side. This lets you be a little bit sloppy—though not too sloppy, obviously—because it's ok if the server 'cheats', since it has no ulterior motives (except for yours) and there's only one of it.
- golergka 6y agoReal client-side verification and prediction is usually more complicated than just replicating game logic, you have to be able to restore the world to a correct condition after a wrong prediction in an elegant and unoffending way.
- ReD_CoDE 6y agoWhat about these two? [1] https://github.com/ketoo/NoahGameFrame https://github.com/ketoo/NoahGameFrame [2] https://github.com/ocornut/imgui https://github.com/ocornut/imgui , https://github.com/ocornut/imgui/issues/3075 https://github.com/ocornut/imgui/issues/3075 Why almost all links are about years ago? Are not there any new technologies/methodologies for MMOGs that support 90fps, or even more? Something hybrid which supports both server and client sides? And mostly has developed for Unreal Engine or other well-known game engines?
- ryuukk_ 6y agoyou know humanity is doomed when retards pretend to be scholars and teach how to make trash and slow software to other retard wanabee bruhgrammers
- nallo 6y agoStarted working on a text-based MMO a couple of weeks ago https://github.com/johlits/rpg https://github.com/johlits/rpg I do authentication from another service and send encrypted commands to the server which carries them out and encrypts the responses back. Even for a text based game it is tough but I keep it simple as long as I can!