Music and Multiplayer Shmup Technicalities

Posted by Castypher on July 18, 2011, 9:20 p.m.

Oh, approaching 40k hits. I know I'm behind. But in my defense, I don't blog much. At least not anymore.

First of all, a track I did a while ago, but didn't finish. I'll get to it someday. Joined Soundcloud just to post it, because I'd rather not force people to download something they'd listen to no more than once.

http://soundcloud.com/kralys/salenas-theme

Huh…sounds different outside FL Studio. Oh well. Just a couple instruments are a little bit quiet.

Let's talk about something fun, like game design! Or better yet, shmups! Or even better, multiplayer bullet hell!

Been hard at work on the game I mentioned recently. For those who didn't see or just outright forgot, it's a multiplayer bullet hell game, based around fighting other players instead of NPCs.

Here's a recap. Let's just take one game mode for now: Boss Fight.

It's either 7v1 or 15v1, trying to decide what the player cap will be. Everyone tries to kill the boss, who can potentially one-shot anyone. The boss uses bullet hell attacks, while the others use steady bulletfire to whittle away at his health. The boss can select and move bullets, aim, and use specials to help him, but a lot of the gameplay depends on what spells the boss chooses and how he combines them.

Get it? Good. But there are a few issues I'd like to go over, and for those of you who are proficient in multiplayer gaming, here are some scenarios:

I'm going for minimal latency (of course), but each method has a downside. Here we go.

Clientside Spell Handling

The server sends the message that a spell has been created, and the clients handle everything from there.

Pros: Virtually NO latency whatsofuckingever, extremely simple to use

Cons: Players with low framerates will fall far behind others, since GM can't skip frames

Because of that little bit (damn people with old computers and running virus scans), I'd have to update. Here's the next.

Multi-second Server Updating

The server sends messages updating all bullet positions, speeds, and directions once every second or more.

Pros: No overall latency, faster clients will handle everything well, slower clients don't fall far behind

Cons: Since all bullets have to be updated, there would be lag spikes, slower clients can have bullets appear over their heads

Individual Updating

All individual bullets update themselves every second or so.

Pros: The middle ground–few spikes and a spread out latency that doesn't require all bullets to be checked at once

Cons: Since all bullets are updated separately, it can look very sloppy, and is generally hard to implement

Spell Updating Only

Server updates the position in the current spell, including health, timer, and stage. It does not update bullets.

Pros: Minimal latency, all clients see spells begin, change, and finish at roughly the same time, regardless of framerate

Cons: Poorly performing clients will not receive bullet updates, which means that their barrages will still be vastly different from other clients. This can often make it too easy or too hard. However, they will still see spells happen at the same time, so they dodge what they get on their screen and nobody gives a damn about how many bullets he's phasing through.

Other methods are appreciated, but now that you see the problems I'm facing, hopefully you can forgive me for taking my time on this. I want it to work well, and that's not all that easy when you're trying to compensate for people with terrible computers and/or connections.

TL;DR

For those who don't know multiplayer very well, here's some other good stuff.

There are (as of right now) twelve spell categories to choose from, and each has eight or so spells–6+ normal, 1 final, 1 survival.

- Normal spells are the boss's main weapon, and every one has a breaking point. All enemy players must try to damage him enough to break it. Once broken, he will take a high amount of damage. If it expires, he will take no damage. Certain measures (including cowardly players who hide and let their "carries" do the job) can increase his health if the spell isn't broken, lower its cooldown, and extend its breaking point while it's going.

- Survival spells make the caster invulnerable and last a long time, and enemies have to wait out the spell instead of trying to break it. However, when it expires, the boss takes damage as if it was broken.

- Final spells can only be used when the boss is low in health or he has used all his other spells. They last a very long time, must be waited out, and gradually get harder. Players cannot ignore damaging the boss, as even though he cannot die prematurely, the spell's duration will INCREASE while he is not taking enough fire. When it expires, the boss will automatically lose the match. A last resort spell with hopes of taking out the last of the enemies' life pool.

As for the categories, I won't name them all. But each has a different gameplay perk and comes with two specials. Players can mix and match spells from any category, and pick any two specials to personalize his fight.

Custom spells are figured out and will be available for testing in not too long. The only issue I'm working with is the fairness factor, where people could essentially throw everything–including the kitchen sink, leaving opponents with no time to defend themselves. Suggestions are VERY welcome here.

Questions about the game itself? Those are relevant too. Way to go, (moderately) long blog!

Comments

Castypher 13 years, 3 months ago

You may have to elaborate a bit. What–if any–of the three methods are you referring to?

Castypher 13 years, 3 months ago

Oh, that's something I forgot to mention. Aside from updates, bullets' speed and direction are always handled by the client, just there are some times that the server refreshes it, resending the position, the new direction or speed, and any other variables that might affect bullet travel. This takes into account the manipulation bosses have over their own bullets.

What I meant by "sloppy" is that instead of being updated all at once, it will appear that random bullets across the screen will have their positions updated at different times. This annihilates the consistency bullet hell is supposed to have. This won't be an issue for those with good framerates and connections, but none of these methods really would be.

The other thing I forgot to mention is that the server would also have to update spell stages, which I guess even by itself could work. So long as the spell begins and ends at the same time as the rest of the clients, I suppose the client suffering from poor performance should be able to do whatever regardless of how different the actual bullets are.

That's method four, then. No bullet updating, but still differences between poorly performing clients. Shall I put it up?

Castypher 13 years, 3 months ago

Ah, but that falls prey to poor framerate, remember?

Since GM can't skip frames, some clients can fall far behind others. That's no good, no good at all.

Latency is one thing, it's the FPS that's killing me.

I thought about disregarding those with terrible computers, but virus scanners also drastically reduce performance, and as a bullet hell designer, I have to think about that stuff anyway.

Alert Games 13 years, 3 months ago

FPS things:

dont use draw commands as much. limit as much as you can.

try limiting object use some. objects can cause some dip of performance of older computers.

aaaaand have options for certain effects

Multiplayer things:

have the host determine the enemy attacks and such, then all clients work with them from there, only changing from other player's actions. You could also check on the client when they get hit then check with the host to compare the players position. But that might have to go along with the other updating method below:

Then you could combine, or just do this instead:

you can develop a 'delta time' (which im calling it). This is where you periodically measure the difference and then actually skip steps to try to catch up. But that would be some work lol.

Actually, maybe you could update the attacks from the enemies or other players.

It might get a little technical, but instead of updating each and every bullet, you can update its timing from the original location, and adjust from there. Just another option.

Moikle 13 years, 3 months ago

your tl;dr was tl, so I dr

:P

Castypher 13 years, 3 months ago

Quote:
only changing from other player's actions
I think that was the other, hidden method I considered and forgot.

As far as framerate goes, I already take measures to reduce FPS drops, but I'm mostly talking about people who see drops anyway. That's why I mentioned a virus scanner, because while the scan is running, the computer slows down drastically, and without a doubt, people would play under those conditions.

I think the solution of having it partly handled clientside, so very few bullets are actually getting updated, is probably the best as far as latency goes. And as you've pointed out, players with poor performance will be singled out anyway. That's another reason why I plan to show everyone's approximate latency before the match.

@Moikle: Heh, everything seems like it'll be short when I first write it, but hey, it's a quarter of the rest of the blog. But at least click the bright blue link and listen to some music. >=[

Castypher 13 years, 3 months ago

Heheh, I've got a C# program standing by at the moment, and as you said, framerate isn't the same issue. Plus, it's able to skip frames if the going gets tough. An added advantage? Steam, of course.

The ONE thing keeping me from doing it is the lack of knowledge. I'm still learning multiplayer through 39DLL, there's no way I could even try it in C# with the limited knowledge I have of it anyway. And C++? I don't know anything about game design in that at all. =(

And with me posting so little about Terminys, I want to know why you're still interested. Because I do still work on it now and then (quite a bit lately, actually).

Castypher 13 years, 3 months ago

One of the things that keeps me going on Terminys is the humor. I like trying to balance story and humor, and having a lot of parodies makes it more interesting. So I may just throw a bunch of enemies before one or two saves.

Terminys is only a year and a half old, by the way. If I'm not working on the game itself, I'm grinding away at the details of the story. It's more than half-written in novel format right now. And I've already gone through the necessary editing where I had poor story ideas and rewrote the rest to fit a new idea. That's a shitton of work.

We need to get together a bit more to discuss some things, but you're not on Messenger and you're not on Minecraft.

Castypher 13 years, 3 months ago

Well crack open that laptop, because I got on Minecraft for the first time in a while yesterday and all I got was AG throwing snowballs at me. >=[

Castypher 13 years, 3 months ago

You know your blog doesn't have enough porn when you're only talking back and forth to one person.