Show HN: Angeldust – a fast and efficient video game
716 pointsWebsite: http://angeldu.st
My single server hosts 250+K active players in one giant, dynamic fantasy world. Angeldust's game server is pervasively multithreaded, implementing John Carmack's dream of processing an immutable world state each tick.
Both world handling and network traffic routing uses any number of threads. For networking, a typical game session only uses ~3Kbps of bandwidth, enabling decent play even over 2G/EDGE networks.
The client is programmed in C++ with bits of C, Objective-C, Java and PHP. It runs really well on very low-end and obsolete hardware, all the way up to modern systems with fast GPUs.
Angeldust works perfectly on Windows XP+, even without hardware OpenGL; Mac OS X 10.6+, even on the first 2006 32-bit Intel GMA945 MacBook1,1; Linux 64-bit glibc 2.17+; Android v2.2.3+, supporting Bluetooth game controllers; and iOS 6+, though iTunes App Store forces iOS 8+ (any way around this?).
I live stream weekly on YouTube and Twitch, even right now! Come ask me your development questions! I often see developers playing together with their kids.
YouTube channel: https://www.youtube.com/AngeldustLive
One more thing: the Angeldust website ( https://angeldu.st ) uses plain HTML and CSS to offer interactive, game-related actions. It's fully functional even without JavaScript enabled.
Comments (193) 42 threads
Earlier commentsSo if you have friends (you're already doing great there!), get them playing today! Or tomorrow! It also forces you to have a working build pipeline and packaging process for getting builds out to others instead of toying around on your own machine. Also: don't take my advice as gospel, but judge its merit for yourself.
1) How did you handle such big distance draw? Are you using lod and occlusion culling? Was it PVS or rather depth buffer based solution? Did you use bsp or octrees or something else?
2) what data structures did you use to hold the world and it's objects? And how much of it is kept on the server vs client?
Note that I'm working on a newer render engine that actually uses more GPU shading capabilities and this engine runs even smoother than the current one, since it balances the workload a lot better between CPU and GPU.
As for data structures: both client- and server-side it's pretty much a simple std::map. Its O(log(n)) lookup is adequate and I don't want or need to do complicated things to ensure decent performance. On top of the map I do spatially-aware caching to prevent say 99% of actual map lookups which turns the majority of lookups into O(1) which seems pretty much optimal.
As for keeping data: the server is authoritative in everything. The server keeps the data. You can take any device, install Angeldust and sign in with your credentials and you'll find yourself back in the same world, same friends, same progress, same everything that you had on another device.
Same with game state: the server tells the client everything. The client is basically just a dumb graphical terminal application that renders 3D visuals instead of VT100 text.
I remember that original voxel-based engine and web server list that launched the client using their custom URI.
It was awesome how small the game was and how fun it was the simple concept (Minecraft with guns and no floating blocks).
But I always advise enthusiastic players to keep an eye out on real life. Mind your health and your relationships. Real life, family, friends—they all come first. Of course you can be friends in-game and even build meaningful relationships there, but that's no substitute for living a well-balanced "real" life.
I've been an avid gamer in the past, and right now I'm a very avid developer. I try to balance that in real life by playing sports and exercising three or four times per week. Going out on walks, to the movies, meeting up with friends. "Balance in all things" as a character from Baldur's Gate would say.
All comments shown.
Couldn't load more comments. Check your connection and try again.