Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1370291 Posts in 64455 Topics- by 56510 Members - Latest Member: MariamThomson

December 10, 2019, 10:28:45 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsSnake World - temp name - multiplayer snake with added biology
Pages: [1]
Print
Author Topic: Snake World - temp name - multiplayer snake with added biology  (Read 492 times)
Schrompf
Level 6
*

C++ professional, game dev sparetime


View Profile WWW
« on: September 11, 2019, 02:11:55 AM »

Hi,

my current project is a Snake game: move around, eat stuff to grow longer, do not hit obstacles. Main course is open pvp multiplayer, although there will be a singleplayer / coop mode for feeding on the biology alone or with friends.

History:
I found https://slither.io one day, enjoyed it quite a bit, even got it for my phone. But its performance is really off-putting. It stutters or even pauses for a second even on potent gaming rigs. So a few friends from a small German IRC channel and me offhandedly decided to redo it "properly". And we wanted to add a lot of other game elements, too, so that it gets more laid-back and even allows to play alone / cooperatively. Then, one by one, they bailed from the project, so at the moment I'm doing it alone again.

Concept:
I know that slither.io has the comfortable advantage of being a browser game. I can't compete with that, but I can sure try to make it easily accessible by
a) using the Steam friends infrastructure
b) making it small to download, quick to install, quick to start playing

First aim is to provide an open multiplayer game like slither.io. I'll later add collectibles and cosmetics to be found in the game by which you can customize your snake. And if the game gets some traction, I'll also implement the Steam workshop stuff to allow people to add their own creations.

My current plan is to make the basic multiplayer game free to play on public servers. Then I'll try to earn a buck by a) selling the "personal" version which allows you to play alone and host private games for your friends and b) by selling special cosmetics.

Technology:
Of course if I complain about the drawbacks of web games, I better do deliver on the performance side. I'm using C++17/20 without an engine, based on my custom framework which grew with me over the last decades. Rendering is DirectX9 on Windows or OpenGL on Linux/OSX, sound is currently FModEx although I'm looking to replace it by something simpler and more license-friendly, plus Boost, AngelScript, freetype, GLFW, SNIIS, TinyXML, zlib, curl.

Current state:
I have a job and a family, so progress is moderate. Overall I invested maybe 50h of work over the course of 6 months. Basic gameplay is implemented and working, but unbalanced. You can run a dedicated server on Windows or Linux or localhost, join a server, spawn, move around, eat stuff and grow, sprint and spawn food, hit things, hurt/die and spawn food, respawn, chat, leave. Graphics are provisional upto now.

Images - click for full size





Graphics:
I have to admit that I really tried my best to do "real" graphics from the start. But even after all those years I'm terrible at doing gfx. I'll sure look out for an artist when the gameplay is round and fun.

As for an artstyle I'm aiming for a "microorganism life through a microscope" look. First was the PostProcessing seen above: vignette, blur, chromatic aberration in the corners. Next I put some tens of thousand of particles in the play field which get pushed around by any gameplay element. It doesn't exactly transport the "dirty water" feel I was aiming for, yet, but I'll surely revisit that later. I drew a test snake gfx, the zebra pattern makes it easier to spot mapping / shader errors. I also drew food bites, I was aiming for a "cell" look like a blob of water with a border, but failed miserably. So it's just colourful blobs for now.

next steps:

I'currently implementing walls. Nearly done with the collision part, next is a suitable look and then populating them with thousands of tiny plants that sway in the currents and if someone moves next to it. Then I'll probably go for the background which is too uniform right now. It needs some heavily blurred large scale elements slowly moving in the background to give the impression as if it's out of focus.

Timeline:

Nothing's planned out exactly, of course. After all this is just an hobby for now. I intend to have a private alpha on Steam at the end of the year so I can nail all the details in the Steam friend interactions. I hope to have some NPC content up then, too, but proper customization with some options to choose from will propably have to wait for next year.

Thanks for reading.
Logged

Snake World, multiplayer worm eats stuff and grows DevLog
Prinsessa
Level 10
*****


Ava Skoog


View Profile WWW
« Reply #1 on: September 26, 2019, 02:43:14 AM »

Looks cute! I haven't played slither.io but it brings back memories of playing Zatacka (AKA "Achtung, die Kurwe!") with classmates during recess.

Love the idea of making it look microscopic! Kiss If you're not aware of this relatively new YouTube channel, here's inspiration fodder galore:



Logged

Schrompf
Level 6
*

C++ professional, game dev sparetime


View Profile WWW
« Reply #2 on: September 26, 2019, 03:18:36 AM »

Oh, great! I'm still collecting art style references and occasionally get lost in them because there's such a lot of cool stuff wiggling around underwater. Thanks a lot!
Logged

Snake World, multiplayer worm eats stuff and grows DevLog
Schrompf
Level 6
*

C++ professional, game dev sparetime


View Profile WWW
« Reply #3 on: October 18, 2019, 11:03:20 AM »

Optimized and fixed a lot of things that came up in the first multiplayer test on a remote linux server. Gameplay loop is in a good state now, at least technically, so I moved to the next topic.

Now to "walls".

Scaled and with debug wireframe. Click for full size.


Walls are made of interconnected convex polygons. I first divide the scene into a regular grid of cells and place a point in each cell with a random offset to the center. This is a nice little trick to create a point cloud that looks random-ish to a human but is predictable like a regular grid. Then I generate a voronoi diagram on those points - voronoi diagrams result in convex polygons by principle, and you can construct the edges very quickly because you know all neighbours due to the regular grid.

With convex polygons, collisions are somewhat easy. I currently support point, circle and capsule (== Ray With Radius). Spawning a worm checks for enough space to all walls and a clear starting path so that I don't overwhelm a player by forcing a immediate sharp turn on her. All the ~50k of haze particles are also checked against the walls.

Then rendering. I tried a lot of approaches, but it quickly turned out that just putting an "distance to nearest outside" is not a good measurement to derive a gradient from. GPU doesn't interpolate it steadily however you construct the triangles. In the end I solved it by writing one triangle for every half-edge with the two edge segments as vertex attributes. In the fragment shader I then calculate a signed distance to both edges and apply iniquilez smoothmin() to smooth the corners. smoothmin() itsself is not bias-free, which leads to an occasional jump in wall thickness across an edge, but for the moment I'm satisfied.

Now on to small plants growing on its edges. First I'm probably going for decorational stuff only, maybe some seaweed that rocks back and forth in invisible currents. But maybe I just break my "microscopic" aim with stuff that looks too much like a macroscopic plant... I'll see.
Logged

Snake World, multiplayer worm eats stuff and grows DevLog
Shephf
Level 1
*



View Profile WWW
« Reply #4 on: December 09, 2019, 12:01:53 AM »

Man, I kinda missed that one, I've just noticed a link in your signature accidentally Smiley
Cool stuff, I also had a lot of fun with slither.io, but their performance...
I also like the idea to make it more advanced, like with walls and stuff, are you planning any other additions to the gameplay ?
Logged

Schrompf
Level 6
*

C++ professional, game dev sparetime


View Profile WWW
« Reply #5 on: December 09, 2019, 02:07:32 AM »

Dev took a hit the last weeks because I just gamed in my sparetime. I'm back on track now, currently working on deco plants growing on the walls.

But there's a lot more gameplay coming, too. Or at least I intend it to be. Next up will be sort of a food flower on a wall: it has a head with a larger food bit in it connected to the wall base by a small pale cord. The player has to cross the cord with her worm to snap it, then the head pops open and she (or someone nasty close by) can eat the ration.

I'll also add regions with small flowers at walls with regrowing food bits on their heads. The idea is to encourage the player to scrape the wall surfaces for those food bites, intentionally exposing their worm to the danger of collisions and being pushed into the wall by possible other players nearby.

I want a thick-peeled cell blob with rich food in it that the player has to bust open by wrapping her snake around it and then PULL.

I'll probably add small jellyfish like creatures that contain a large-ish food bit. The player can simply eat those directly, but they try to squirm away from you.

Plus a lot more when I'm that far.
Logged

Snake World, multiplayer worm eats stuff and grows DevLog
Shephf
Level 1
*



View Profile WWW
« Reply #6 on: December 09, 2019, 02:15:48 AM »

Sounds great, most snake games don't bother with food pickups at all, they just have apples or something lying around for player to pick up. Looking forward for your food system in action Smiley
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic