Recent Posts

Pages: 1 ... 8 9 [10]
91
Super Mario War Fanmade Content / Re: Dingding22's Skins and more!
« Last post by dingding22 on October 25, 2016, 06:25:05 PM »
666 views guys!  :o
92
Super Mario War / Re: Netplay General Discussion
« Last post by fluffypillow on October 16, 2016, 04:17:36 PM »
Yup, the game has client side position prediction with confirmation from the server, position interpolation on difference, server reconciliation, roundtrip time corrected event handling, all the things you'd expect from a network game. The packets are compressed and tightly packed - for example, the player input is 2 bytes currently, but if it turns out that it's still a bottleneck, it could be reduced to just one with some more hacking. Another optimization would be to use half width floats, but that broke the game when I tried it; there's probably a way to improve that though.

However, it seems the issues are within the game code, not really with the network data. The gameplay issues are likely caused by a bug in the reconciliation code, which I didn't find it yet; requiring to reseed the clients every few seconds doesn't sound like a normal behaviour. It could be a minor thing, like one buggy package, but I can't really grasp it and it's driving me nuts.
93
Super Mario War / Built-in Game Help and controller question
« Last post by mapsking on October 16, 2016, 01:16:10 PM »
I was just thinking about this game, I've had it, and played it with my 3 kids for as long as I can remember, and love it.  However, for a long time, I didn't even really know a help file existed, it is not mentioned in the game anywhere I am aware of, and one day I was browsing with announcers or music or something, and I noticed the help file in the folder.  I actually read through the entire thing, and as there are so many options in terms of gameplay, without reading it, there is a lot of confusion just from playing.  Some things are intuitive, some menu settings and game adjustments can actually be quite confusing.  I know it might be some work, but would it be possible to implement a help section into the game?  I'm sure it could be made to look incorporated, and I'm sure there are more creative people than me who might have good implementation ideas, and ways to get the message across, but possibly simplify what changes actually do?

On a side note, I use four Xbox 360 controllers, and I notice if I leave the game, and then later plug/unplug controllers and play the game, the controls can be a bit confusing, as the game remembers which controller is assigned to which player.  However, if I play the game, and play it a month later, and just plug one or two controllers in, if it happens to be the same usb location as the last time, great, if not, then I can't control anything, and have to go manually set it up again.  Is there a way to make it automatically detect every time?

Thanks, Mapsking
94
Super Mario War / Re: Netplay General Discussion
« Last post by Felix-The-Ghost on October 15, 2016, 03:15:40 AM »
I know we both agreed synchronizing the PRNG among clients would be a good idea, but perhaps instead of relying completely on it we can use it for client-side prediction only, having the server enforce its own results (reseeding all clients if a conflict is detected)

I also assume you're optimizing packets sent (e.g. packing 8 Boolean values into a single byte)
95
I don't know who will see this, but I've updated the download section in the first post (not a new version) it's the same file I linked a few posts ago, with correction to the URL since the forum move corrupted all the existing links.

I added the standalone version that can be used without integration into the SMW files (it comes with required files so it's a slightly larger download and the files will be redundant if you decide to move it to the SMW directory)

Being an amateur I never had a safety check if 0smw.bmp existed or not, since I assumed installation into the SMW directory. It will crash on the first start (unless you create an options file as described in the first post)

I also want to reiterate that a completely redesigned editor may come in the future, though I don't know when. Currently I am working on my own game (unannounced) but I still want to bring this utility up to date.
96
Super Mario War / Re: Netplay General Discussion
« Last post by fluffypillow on October 14, 2016, 04:24:10 PM »
Yes, SMW works similarly. Important events are always being sent in-order, reliable, and can properly reproduce an event. Movement can be calculated locally, and only needs corrections from the server, in a way that when it turns out that there was a problem with a player's position, the game can correct it, and replay the input that happened since that moment of time seamlessly. It's kind of complex, but there are technical papers and documentations about how this works in details, it can work very well in practice, and that's how most works fast paced games (FPSes, MMOs, ...) work.

So I implemented it in SMW, and it worked well... for a few seconds, then everything blew up. Like, you start the game, don't press anything, then suddenly your character starts shaking then fly through the screen. I couldn't really find out the problem even though I did some extensive logging. In the binaries above, I turned this feature off, so its laggy, but at least playable.

The other buggy part is the syncing. Everything works fine as long as the random number generator produces the same values for all the players. That is, when you hit a [?] block, the same weapon pops out of it. Unfortunately, almost everything in the game is wired to the random generator, which means the generator runs about 1000 times a second. So if even one thing turns out a it different for a client (which can happen due to number rounding errors or tiny differences or bugs), then the player no longer produces the same values as the others, and the game breaks, and the players can end up in different positions and the boxes can contain different items. I think this bug could be fixed by some debugging and further hacking.

Well, other than these issues, the game seems to work fine, it supports all game modes, you can play any maps, using any skins. There's also proper hardware acceleration support and a prototype Android support in the source code, but these aren't stable yet.

97
Super Mario War / Re: Netplay General Discussion
« Last post by Felix-The-Ghost on October 13, 2016, 11:12:18 PM »
It works with LAN? Nice.

For your concerns with lag, usually what is done is packet enforcing with key events, like if the player gets a power up/collides with another player you absolutely want that packet received, but you are more lenient with general player movements/particles/etc.

I don't know that I can test unless we manage to get a group of people to schedule an event. A separate thread might help facilitate that. I have a garbage AT&T connection so I don't know if I'd be able to test well though.

One thing I've noticed with even AAA console games though is that they don't always gracefully acknowledge a lost connection, but actually crash/freeze. I could test that (lol) I assume your version has threading to ensure the game doesn't freeze up when the networking parts are still waiting for a non-existent connection.
98
Super Mario War / Re: Netplay General Discussion
« Last post by fluffypillow on October 11, 2016, 04:38:15 PM »
PS. If you find a bug you can reproduce, please create a video of it! Even a phone recording is fine, but it helps me very much if I can actually see the problem.
99
Super Mario War / Re: Netplay General Discussion
« Last post by fluffypillow on October 11, 2016, 04:35:56 PM »
So here's how the netplay works. I'll try to write it as detailed as possible, but feel free to ask if something isn't clear. It probably makes more sense if you've ever played Worms or something.

First, there's a central matchmaking server, called smw-server. People can join to this server, and create rooms, or join existing rooms. A room is where people gather before the game starts. There can be multiple rooms on the Server, and when you play with your friends, only one Server is needed, there's no need to everyone run one.

Here's the important technical detail: if the Server program runs on a computer that is behind a router, and you want to allow players from the internet to join ( = you are not playing in LAN), then you MUST set up port forwarding. "Port forwarding" is a fancy name for telling the router that it should allow connecting players on a certain network port, and that the players can find the game server on a certain local computer. Without setting this up, the players CANNOT connect, because routers don't allow incoming connections for security reasons. The method differs between routers, but you can find more details here. The Server requires forwarding the UDP 12521 port to the computer where the Server runs. The IP address of the Server is the external internet address of the router (not 192.168.xxx.xxx, but more like 54.32.10.xx), this is what the other players have to enter to join.

If you play on a local network (that is, every player is on the same network), then you don't have to set up the router. The IP address of the server is just the address of the computer.

After you set the Server up, the rest should be straightforward. You start the game, enter the Multiplayer menu, set your player name at the top, then go to Add/Remove Servers, press Add, type in the IP address of the SERVER, Ok, Back, then choose the Server on the Selected server list and Connect. You'll get the list of rooms when you connect or when you press Refresh.

Well I guess that's all for now, have fun and enjoy the bugs!
100
Super Mario War / Re: Netplay General Discussion
« Last post by fluffypillow on October 11, 2016, 03:42:54 PM »
Here are the latest versions:

  • Windows (all DLLs included)
  • Linux x64 (should work on most distro, dependencies on Debian/*buntu: libsdl1.2debian, libsdl-image1.2, libsdl-mixer1.2, zlib1g)
  • Web (this version doesn't have netplay, but it's useful if you just want to play without installing anything)

For other platforms (ARM, OSX, ...), you can find the source code here.
Pages: 1 ... 8 9 [10]