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

Login with username, password and session length

 
Advanced search

1318603 Posts in 59231 Topics- by 50322 Members - Latest Member: Lowbit

October 18, 2017, 07:24:52 pm

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsOUT NOW! Dynasty Feud - 2D Local/Online brawler
Pages: 1 ... 4 5 [6] 7
Print
Author Topic: OUT NOW! Dynasty Feud - 2D Local/Online brawler  (Read 16557 times)
Eneko Egiluz
Level 1
*



View Profile Email
« Reply #100 on: February 23, 2017, 12:59:19 am »

Awesome music! Really gets you in the zone with a cool character Smiley

Thank you! We put a big effort trying to add music to the levels as another immersive element.

Today we are showing a really special character. Ragnar, the Jarl from Viking Dynasty. He is actually the character we designed first. One of the most powerful fighter in the game, fast, aggressive, double life... and a shield. Enjoy his movements!



Logged

Eneko Egiluz
Level 1
*



View Profile Email
« Reply #101 on: February 24, 2017, 01:58:03 am »

So this time I wanted to take an extended look to the networking system we’ve implemented. Some users have already asked about it and we think it’s time to explain more deeply how it works, the initial thought we had about how to implement it and how it has evolved.

Why did we add online multiplayer to the game?

Mainly, we wanted to extend the capabilities of the game. We all love this couch games, and they are awesome to play with friends, but only having local multiplayer is not enough nowadays. Adding online multiplayer opens the game to a greater audience, and it gives great replayability to the game, allowing for extra features like leaderboards, special events, global stats…

How is it different from other online multiplayer implementations?

Being new indie developers, we had no enough money to maintain servers running all the time, so we had to think of a new way of doing this. The obvious way was to use P2P, and replace the role of the server with something different. We had two options in here; P2P with a client acting as a host, or a total P2P implementation, where everyone would have the same information and would act the same.

That’s when we discovered GGPO (https://en.wikipedia.org/wiki/GGPO), a network implementation model widely used in fighting games. Our network implementation is based on GGPO, and we’ve called it the Rollback system. Plus, using P2P also reduces latencies between the players, as the messages do not have to reach the server and then be sent to the other players, but they go directly from player to player.

What does it solve? How does it work?

The main objective of this implementation is to get an almost lagless game experience when playing online.

Overall this is what the Rollback system does. Instead of waiting for the input of the rest of the players to compute the next frame, we predict what they are going to send based on the previous inputs. Then, when the original input arrives, if it differs from what the system predicted, we roll back to that frame, insert the new input, and then simulate again the match until the present frame.

What problems does it bring to the table?

One of the main problems we had when implementing this system was the lack of control over everything related to the Unity engine. When re-simulating the frames, we had to approach what Unity did, and try to reproduce step by step what the engine does to every object and script in the scene. This means collision detection, collision resolution, physics update…

Unfortunately, Unity does not give you access to forcing any of these checks I’ve mentioned before. This means we’ve had to implement our own collision detection, collision resolution and physics systems.

Another detail of how this system works. Our online matches are defined by which inputs have been pressed or released at which frames. The simulations have to be completely deterministic, same scenario with same input should create the same new state of the game in all computers. So this means that my frame 100 needs to be the same frame 100 of every other player. In order to achieve this, we’ve made use of Unity’s FixedUpdate, which assures us that every FixedUpdate will be called every Time.FixedDeltaTime, thus making every frame take the same time to complete in every computer.

Rollback system: step by step

Now that we’ve seen what the rollback system does, and how we use it, I wanted to show every step of a frame in our game: beginning with what a normal frame looks like, and ending with how our game behaves if an input arrives.

Unity updates all scripts in the scene. If any input action was pressed or released, we send that packet over the network for the rest of the players to know, saving bandwidth and reducing the number of packets sent.


Now comes the time of the rollback system. It’s time to save the whole state of the level. To achieve that, we are going to iterate through every single object and script in the level and save every variable related to gameplay in a special structure.

This is a much bigger problem that it seems, so let’s look at the image above to better understand what we’re talking about. In that image I’ve highlighted every object that is affected by the system. Every single one of those has at least one component that needs to save data into the structure. You see those arrows surrounded by the blue ellipse? All of them need to save their position, rotation and scale; all physics data related to that instance (velocity, acceleration, gravity…) and any other info that defines its current state (flying, projectile owner…). In the case of the red ellipses, it’s simpler, they just need to save their position and some physics info.

By the end of this process, we’ll have a structure full of data which will be capable of restoring the level to this very frame.

Ok. So if no input packet arrives, this is the end of the frame. We’ve saved the whole state of the level, and we can continue to the next frame and repeat the process. But let’s see what happens if an input from another player arrives.

Let me show two videos of the same scene, but each one seen from a different perspective, first one being player 1 and second one being (obviously) player 2. Player 1 will shoot, and player 2 will jump in order to avoid that bullet. We’ve exaggerated latencies to better see how the system works. Here are the videos!

Player 1:


Player 2:


As you can see in the first video, something strange is happening when the second player jumps and it avoids the bullet. It’s actually doing the correct job, but the exaggerated latencies better show the process. Let’s look step by step in a timeline what is actually happening.


Player 1 shoots. The input message is sent.

Some time later, Player 2 receives the input. (Here the Rollback system also does a process, but let's ignore it and go to the important one of this example).

Player 2 jumps in order to avoid the bullet. The network message is sent.

Player 2 achieves to avoid the bullet and not die. But as the network connection of Player 2 is terrible, it takes some time to reach the computer of Player 1. This means the Player 2 dies in the Player 1’s game.

Then the jump of the Player 2 arrives. Player 2 has already been killed in Player 1’s computer, but we know when this input was executed.

Everything that happens in the next two images is executed in a single frame.

So the Rollback system kicks in. As we know the frame in which the Player 2 jumped, we can restore the state of the level in that exact frame. So we “roll back” to that frame, and restore everything. Restoring implies a bunch of things; first, we need to destroy everything that has been created since the frame; second, we need to create everything that was destroyed since that frame; and last, we need to update the state of every object that is still active since that frame. Once all of this is done, our game will be in the same state as it was in the specific frame.

Now that we are back there, we can insert the input of the Player 2 in the system. We’ve rolled back to this point because a change so small as a jump can have enormous changes in the state of the level, so the frames that we had computed after this frame are not valid. Now that the input has been inserted, we can now re-compute every single frame until the present one. If everything was done correctly, we should now be in the present, but the Player 2 should still be alive.

And that’s how the Rollback system works. I did not want to add code to this post, and tried to get a bit more into detail without making it boring. There are still some other systems to explain, but we’ll do them in another post not to bore you with so much text.

If there’s anything you did not understand or are curious to know, please ask me and I’ll be happy to answer.

Thanks so much for sticking with me!  Smiley
Logged

wizered67
Level 1
*


View Profile Email
« Reply #102 on: February 24, 2017, 02:14:46 am »

Wow, that was a very well done explanation. So the rollback happens fast enough to not be noticeable? The whole thing is really intriguing. It sounds like it shouldn't work, and yet it does!
Logged
Eneko Egiluz
Level 1
*



View Profile Email
« Reply #103 on: February 24, 2017, 03:31:18 am »

Thank you! So it all depends on the network connection of the rest of the players. The better connection the other players have, the faster their packets are going to reach your computer, so the less 'rollback' you're going to apply to your game, creating a smoother experience.

Up until now, it seems to be working pretty well. We recently did a test with a friend in Canada (we're from Spain) and the average 'rollback' was about 4 frames. It was surprisingly smooth.

PC specs are also important with this network implementation. In the end, the CPU is what's going to determine how fast your computer re-simulates all of the frames.

We've added some new systems to detect bad connections or slow PCs and try to give them a second chance if their game gets out of sync. I'll talk about these in a future post. I hope you'll like it as much as this one! Smiley
Logged

Reyn
Level 0
***



View Profile Email
« Reply #104 on: February 24, 2017, 06:04:58 am »

Up until now, it seems to be working pretty well. We recently did a test with a friend in Canada (we're from Spain) and the average 'rollback' was about 4 frames. It was surprisingly smooth.

4 frames of default FixedUpdate()? As in running 50 times per second? Thats 80ms from Canada to Spain, holy shitmuffin thats good, really gud.
Logged
Eneko Egiluz
Level 1
*



View Profile Email
« Reply #105 on: February 24, 2017, 08:51:17 am »

We've actually reduced the FixedUpdate frequency from 50 times per second to 30 times per second. Sounds terrible, but it's actually quite nice. First remember that is the logic frequency. Graphics are not capped, and if your computer can handle rendering the game at 1000 fps, you will feel that smoothness as we'll be interpolating everything.

So here are the main reasons:
- By giving more time to the frame to complete, we are also giving more time to the network packets to arrive. This means that by the time they reach the other computers, not so many frames have been completed, so the 'rollback' count is reduced compared to the game running at 50 frames per second.
- It also helps a lot in terms of performance. Having to run the game at 50 frames per second no matter what is a challenging requisite, and not all (non-gaming) computers can handle that. By reducing it to 30 we are giving access to the game to many other players.
Logged

Eneko Egiluz
Level 1
*



View Profile Email
« Reply #106 on: February 26, 2017, 04:10:30 am »

More Vikings!
This is Eerika, the Shieldmaiden. She uses her spear for both melee and ranged attacks, and this combined with her shield makes she a really complete fighter.



Logged

Eneko Egiluz
Level 1
*



View Profile Email
« Reply #107 on: March 01, 2017, 08:33:53 am »

Hello everybody!
FRESH NEWS TODAY!!
DYNASTY FEUD ANNOUNCES ITS OPEN BETA  Hand Clap Hand Clap Hand Clap

Join this 2D multiplayer party brawler open beta, pick your dynasty and show everyone you are the best warrior in the world!

Vikings, pirates, samurais, cowboys — they have one thing in common: they all love a good fight. But there's one thing they love even more: laughing at their rivals after kicking their sorry asses! Do you want to show everyone you are the best warrior? Well, you have a chance now: join Dynasty Feud open beta from March 10th to April 9th on Steam.


This open beta will let all players choose between 4 of the 8 warring dynasties. Available dynasties will follow this rotation schedule.

Week 1 (March 10th): The Cartwrongs Dynasty and Clan Yngling Dynasty

Week 2 (March 17th): Clan Yngling Dynasty and The Crew of The Fancier Dynasty

Week 3 (March 24th): The Crew of The Fancier Dynasty and Nekoyama-shi Dynasty

Week 4 (March 31st): Nekoyama-shi Dynasty and The Cartwrongs Dynasty

The best players will be ranked on a leaderboard every week, and the results will be broadcasted on Dynasty Feud’s social media platforms and website. And every week the top players will receive an extra key of the game! Stay tuned to Dynasty Feud social media accounts and Steam page, more prizes coming soon!









See you in the battlefield!! Well, hello there!

Logged

Eneko Egiluz
Level 1
*



View Profile Email
« Reply #108 on: March 06, 2017, 04:24:55 am »

Hello again!
The Ynglings love axes, both for melee and ranged attacks. Arvid knows about this stuff. Enjoy his video!




Logged

Eneko Egiluz
Level 1
*



View Profile Email
« Reply #109 on: March 20, 2017, 07:32:34 am »

After almost two weeks of beta, we finally got some time to write about it.

It's been some really busy and stressful weeks, but we are pretty happy with the results. There have been over 2000 matches played and the second week hasn't finished yet, but most of the matches are played during the weekend.
So we've got some interesting data that will help us balance the game.




The first week we got the Yngling Clan and the Cartwrongs. With an uncontestable victory of the first by 65% of wins over the 35% of the second, but this can be a deceiving stat as the Yngling was chosen more than the Cartwrongs. That's why we usually look at the Kill/death ratio, and there we can see that there is an imbalance.


The shieldmaiden performed better than what we expected, but mainly the gatling, gunslinger and sharpshooter performed worse. So we will probably have to do some changes in that regard. We are aware that there are more variables at work, as how easy it is to play with a character for a newcomer, and also who is the matchup it is playing against, in what level etc... But the idea of doing some changes to the Cartwrongs has been wondering around a while and this data is the trigger to do so.




The second week started last Friday with the Fancier's Crew and the Nekoyama-shi. There is still more time until this Friday but we already got some interesting data. This time we got a closer battle, 54% for the Fancier's Crew and 46% for the Nekoyama-shi.



The k/d ratio shows that there is a difference, but it is less dramatic than in the first case and particularly in this we believe it is due to the complexity of how to play the different dynasties, so we will wait for more data until we do any big change.
Logged

Eneko Egiluz
Level 1
*



View Profile Email
« Reply #110 on: April 26, 2017, 06:12:00 am »

The wait is over! Dynasty Feud arrives May 23 on Steam!! Hand Clap
Logged

Eneko Egiluz
Level 1
*



View Profile Email
« Reply #111 on: May 03, 2017, 06:16:27 am »

Check out our release trailer!
Dynasty Feud is out on Steam on May 23rd!


http://store.steampowered.com/app/493180/Dynasty_Feud/



Logged

Spinal Games
Level 0
*


Independent Game Developer!


View Profile WWW Email
« Reply #112 on: May 10, 2017, 02:39:27 am »

That trailer looks brutal. You got me on the giant skull crying lava. Hand Metal Right
Logged

Follow me: Twitter
Webpage: Spinal Games
Krucho
Level 0
**



View Profile Email
« Reply #113 on: May 10, 2017, 06:10:36 am »

When you say GGPO predicts what the user will do based on the current inputs, im pretty sure what they do in fighting games with good netcode is first of all have a buffer on inputs if you send your input the exact frame or 3 frames before it will be the same action predicted and second of all they implement some kind of learning algorithm to predict that if a player starts a combo he is most likely going to finish it in an optimal way (if the learning algorithm determined he is a good player).

So what can you actually predict in your GGPO? If you have no buffer or no combo chains there is actually not much to predict, Smash 4 doesn't use a rollback system but a lockstep system for example. nonetheless very impressive to see that here!
Logged
Eneko Egiluz
Level 1
*



View Profile Email
« Reply #114 on: May 12, 2017, 07:33:11 am »

OK. So maybe predict was not the correct choice of a word. What we do is assume that you will keep pressing the same buttons that you are pressing in the current frame. This way, we only have to send the input changes to the rest of the players. This works surprisingly well. We, humans are not that fast pressing buttons. Smiley
Logged

Eneko Egiluz
Level 1
*



View Profile Email
« Reply #115 on: May 18, 2017, 01:18:39 am »



Only 7 Days Left!

Greetings Warriors,
We wanted to bestow upon you a small update and remind you that Dynasty Feud will be officially released next week on Tuesday, May 23rd!

It's been a long way since we started the project and we had a lot to do during the month after the beta.
 
Development Update
We've been pretty busy since the beta closed, here's an overview of the new features of the game:

NEW FEATURES:
  • Ranked mode.
  • Player progression system.
  • Tons of emotes to unlock.
  • Improved online performance.
  • Translated into 8 different languages!



Logged

Kebbab
Level 0
**


View Profile WWW
« Reply #116 on: May 18, 2017, 01:36:09 am »

Damn, I had a similar idea for a game (brawl with lots and lots of characters). Now I'm so jealous because your execution is perfect. No point wishing you luck since this game is a guaranteed success.
Logged

Eneko Egiluz
Level 1
*



View Profile Email
« Reply #117 on: May 22, 2017, 06:47:02 am »

Hey, thank you so much! Glad you liked our game. Can´t wait to play a match against you. Wink
Logged

Eneko Egiluz
Level 1
*



View Profile Email
« Reply #118 on: May 23, 2017, 07:31:05 am »



Dynasty Feud Steam Page

Dynasty Feud is finally OUT on Steam. Thank you for all your support and suggestions.  Hand Clap Toast Right
See you in the Battlefield!!  Hand Any Key
Logged

francismoy
Level 0
**


View Profile
« Reply #119 on: May 23, 2017, 12:04:03 pm »

Hey, congrats on the release! The game looks really cool, I'm pretty sure it will sell well. I actually haven't played it but I think I saw people playing it at some game convention (Gamelab 2016, maybe?).

We're about to release our game Breaking Fast. It's also a multiplayer game with brawling mechanics. If you have any advice, especially on how to raise awareness and boost visibility in the last weeks previous to launch, I'd be eager to listen to it Smiley
Logged
Pages: 1 ... 4 5 [6] 7
Print
Jump to:  

Theme orange-lt created by panic