Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 8 9 [10] 11

Author Topic: Co-op Dwarfmode (online simultaneous multiplayer)  (Read 12490 times)

flabort

  • Bay Watcher
  • Still a demilich
    • View Profile
Re: Co-op Dwarfmode (online simultaneous multiplayer)
« Reply #135 on: May 20, 2020, 01:51:00 pm »

Firewall may be blocking those ports. Try port 80, that's usually not blocked.
I'm not even trying to do a remote connection, it's just within my own network. Not even that, it's on the home computer that I'm trying to connect.

But also, no, that didn't help when I tried it. Not in either place in data/init/dflex.txt, nor in hack/www/config.js; even when the port number defaulting to 1234 in both files matches as port 80, it's less responsive than default settings.

I'm just going to delete the folder and start again.

Edit:
Spoiler (click to show/hide)
edit 2:
Spoiler (click to show/hide)
« Last Edit: May 20, 2020, 02:23:32 pm by flabort »
Logged
The Cyan Menace

Went away for a while, came back, went away for a while, and back for now.

bowdown2q

  • Bay Watcher
    • View Profile
Re: Co-op Dwarfmode (online simultaneous multiplayer)
« Reply #136 on: May 22, 2020, 01:05:29 am »

ey! This is great; I've got it up and running with the bf next to me on LAN, and a buddy on the opposite coast over the net. Almost no latency, BUT I'm running at pretty low FPS. I bottomed out at 9... huh as I write this its back to 64.... but it's only usin- OH WAIT. okay, right, DF is single threaded, that's why its maxing at 15% CPU. Uhh...I'll leave this here in case anybody else is having similar issues.

The graphics didn't seem to install correctly (I used the all-in-one .bat downloader/installer) - i've got walls and trees... and dwarfs, but a lot of sprites are missing. (Phoebus) Is it because I f'ed up the install, or is it not fully supported, or can I manually fix it orrrr? Looks like the df.exe is all ascii

Spoiler (click to show/hide)

white-rabbit

  • Bay Watcher
    • View Profile
Re: Co-op Dwarfmode (online simultaneous multiplayer)
« Reply #137 on: May 22, 2020, 10:16:41 am »

Trying to connect with the host computer still gives
Code: [Select]
A new client has joined.
  Client addr: "???"
  Client is admin.
in dfplex_server.log and "New connection" in the console, but still has the display in above spoiler.

Oh, right. To get dfplex to build on windows, I had to switch it over to using the IXWebSockets library (though Websocketpp is still the default on linux, and on any OS you can select which one when compiling via cmake). While IXWebSockets does seem to work on windows, I couldn't figure out how to get the client IP address out of IXWebSockets, so it just displays as "???" for now. (I know the message is really opaque. Sorry.) Theoretically, though, if you're seeing "client connected" that should mean that the connection is going through.

Now, I've noticed on my own test windows machine that even after it "connects" it takes about 5 seconds for the websocket communication to actually start (i.e. for the graphics to appear), but it was instantaneous on the 0.44 version which used websocketpp instead. I've also noticed that it takes like ~30 seconds for me to connect to the server mentioned in the OP (and that server has been using websocketpp, not IXWebSockets). I'm not an expert in how the websocket protocol works, so I really don't understand what it's doing or why it takes so long to connect sometimes. Anyway, if you haven't tried it, you could try waiting for a minute upon seeing the orange "connecting..." bar; maybe that will work. (Or maybe you can find someone who understands websockets and ask them if they understand what's going on here -- if you do find someone, please do relay what they say to here!)

If worse comes to worst, you could try building it using websocketpp instead of IXWebSockets -- I've gotten websocketpp to work on windows on my own, it just seems the boost date_time dependency is problematic on the build server. Building on windows sure is a pain though, so I hope there's a way to solve your problem without having to build it manually.

The graphics didn't seem to install correctly (I used the all-in-one .bat downloader/installer) - i've got walls and trees... and dwarfs, but a lot of sprites are missing. (Phoebus) Is it because I f'ed up the install, or is it not fully supported, or can I manually fix it orrrr?

Right now dfplex does not support any graphics other than just tilesets. (Eventually graphics support may be added.) Furthermore, it does not use the tileset specified in the data folder. Rather, the tilesets available to use with dfplex are in hack/www/art. You can add your own tileset to that folder.

Additionally, you must edit config.js in the www folder (it might be in the js subfolder) to set the three tilesets (map, text, area/overworld). Client players will use those by default, but they can change the tileset by adjusting a url parameter if desired (see the main post for details).
« Last Edit: May 22, 2020, 10:37:24 am by white-rabbit »
Logged

flabort

  • Bay Watcher
  • Still a demilich
    • View Profile
Re: Co-op Dwarfmode (online simultaneous multiplayer)
« Reply #138 on: May 22, 2020, 11:46:45 am »


Oh, right. To get dfplex to build on windows, I had to switch it over to using the IXWebSockets library (though Websocketpp is still the default on linux, and on any OS you can select which one when compiling via cmake). While IXWebSockets does seem to work on windows, I couldn't figure out how to get the client IP address out of IXWebSockets, so it just displays as "???" for now. (I know the message is really opaque. Sorry.) Theoretically, though, if you're seeing "client connected" that should mean that the connection is going through.
That's good to know.  But...
Quote
Now, I've noticed on my own test windows machine that even after it "connects" it takes about 5 seconds for the websocket communication to actually start (i.e. for the graphics to appear), but it was instantaneous on the 0.44 version which used websocketpp instead. I've also noticed that it takes like ~30 seconds for me to connect to the server mentioned in the OP (and that server has been using websocketpp, not IXWebSockets). I'm not an expert in how the websocket protocol works, so I really don't understand what it's doing or why it takes so long to connect sometimes. Anyway, if you haven't tried it, you could try waiting for a minute upon seeing the orange "connecting..." bar; maybe that will work. (Or maybe you can find someone who understands websockets and ask them if they understand what's going on here -- if you do find someone, please do relay what they say to here!)
I do successfully connect to the linked web server after ~30 seconds too, with orange bar the whole time. On my windows machine, though, it goes from orange bar straight to red bar with "click to retry" instantaneously. Leaving it in that state for any amount of time does not seem to help.
Quote
If worse comes to worst, you could try building it using websocketpp instead of IXWebSockets -- I've gotten websocketpp to work on windows on my own, it just seems the boost date_time dependency is problematic on the build server. Building on windows sure is a pain though, so I hope there's a way to solve your problem without having to build it manually.
Alright, guess it's back to trying to compile. I was having such troubles, though... ugh. And what parameters do I have to set in the build files to do this?

Edit:
Spoiler (click to show/hide)

Edit 2: I have seen a lot of examples (1)(2) that have -T v141 instead of -T v140_xp which the generate files have by default. Of course, changing that gives an entirely different error than the one in my first edit to this post.
Spoiler (click to show/hide)
How do I tell which toolset I have from the various programs I've had to install to get this far? Alternatively, if the original (140_xp) was correct, how do I solve the other error?
« Last Edit: May 22, 2020, 03:07:20 pm by flabort »
Logged
The Cyan Menace

Went away for a while, came back, went away for a while, and back for now.

white-rabbit

  • Bay Watcher
    • View Profile
Re: Co-op Dwarfmode (online simultaneous multiplayer)
« Reply #139 on: May 22, 2020, 04:11:25 pm »

I do successfully connect to the linked web server after ~30 seconds too, with orange bar the whole time. On my windows machine, though, it goes from orange bar straight to red bar with "click to retry" instantaneously. Leaving it in that state for any amount of time does not seem to help.

Hrm. I really wish I knew more about websockets so that I could have some idea of how to debug this. I hope other people aren't encountering this as well, or I may need to find yet a third library. :'(

Alright, guess it's back to trying to compile. I was having such troubles, though... ugh. And what parameters do I have to set in the build files to do this?

:/ good luck. The compile option (to pass to CMake) is -DDFPLEX_IXW=OFF. I don't really know about the other build errors you're getting (I don't really do MSVC much...)
Logged

flabort

  • Bay Watcher
  • Still a demilich
    • View Profile
Re: Co-op Dwarfmode (online simultaneous multiplayer)
« Reply #140 on: May 22, 2020, 07:40:25 pm »

I do successfully connect to the linked web server after ~30 seconds too, with orange bar the whole time. On my windows machine, though, it goes from orange bar straight to red bar with "click to retry" instantaneously. Leaving it in that state for any amount of time does not seem to help.

Hrm. I really wish I knew more about websockets so that I could have some idea of how to debug this. I hope other people aren't encountering this as well, or I may need to find yet a third library. :'(
No worries! I understand this is just something you're doing for fun, so I don't want to pressure you or anything. Unfortunately, I don't know anything about websockets either, just what I've learned over the course of trying to make this work. Which is practically nothing, except that telus doesn't allow port forwarding, which I believe is irrelevant to this issue (unless for some reason the second library is reaching out further than the original?).

Quote
Alright, guess it's back to trying to compile. I was having such troubles, though... ugh. And what parameters do I have to set in the build files to do this?

:/ good luck. The compile option (to pass to CMake) is -DDFPLEX_IXW=OFF. I don't really know about the other build errors you're getting (I don't really do MSVC much...)
No luck.
Spoiler: screenshot (click to show/hide)
I still get the same errors. If I could make heads or tails of them, or find someone in the dfhack thread with a similar issue, I could compile this.
Logged
The Cyan Menace

Went away for a while, came back, went away for a while, and back for now.

lethosor

  • Bay Watcher
    • View Profile
Re: Co-op Dwarfmode (online simultaneous multiplayer)
« Reply #141 on: May 22, 2020, 09:43:47 pm »

Ok, it looks like CMake can't find your compilers at all; that's not dfplex-specific. I probably won't be much help with MSVC/Windows building either, but were you able to install the 2015 toolchain? I'm pretty sure the "-T v140_xp" arguments are telling CMake to use the 2015 toolchain. You could try changing those to "-T v141" to use 2017, but see my warnings about 2017 above (I truly don't know if 2017 will result in a build that crashes or not at this point, but the DFHack docs link to the 2015 build tools, which I would try if you can get them to install.)
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

flabort

  • Bay Watcher
  • Still a demilich
    • View Profile
Re: Co-op Dwarfmode (online simultaneous multiplayer)
« Reply #142 on: May 23, 2020, 02:09:58 pm »

Ok, it looks like CMake can't find your compilers at all; that's not dfplex-specific. I probably won't be much help with MSVC/Windows building either, but were you able to install the 2015 toolchain? I'm pretty sure the "-T v140_xp" arguments are telling CMake to use the 2015 toolchain. You could try changing those to "-T v141" to use 2017, but see my warnings about 2017 above (I truly don't know if 2017 will result in a build that crashes or not at this point, but the DFHack docs link to the 2015 build tools, which I would try if you can get them to install.)
Well, I know I downloaded 2015 this week, and installed it. Before that, I had 2017 for a modding project for another game, but apparently Neither is enough. Apparently they don't by default include the actual files needed, and you need to prompt them to download the compilers AFTER you've already installed them. Your response did help me find that link/answer, so thanks for that.

I feel like, once your computer has everything needed to compile this, the actual compilation should be relatively straight forward. It's just getting all the tools together which is driving me insane. I've got VS2015 getting what SHOULD be the last tools I need now, I'll edit this again to report back once I finish trying.

Edit: Nope, still get the same error. Weird. So taking the advice and looking in CMakeError.log, this is what this attempt looks like:
Spoiler (click to show/hide)
I feel like  the most important line is
Code: [Select]
warning MSB8003: Could not find WindowsSdkDir_71A variable from the registry.
Perhaps I didn't get visual studio to DL the right packages? The right build tools? Probably.
But I found one more idea to try. Instead of v140_xp, or v141, try just v140

Edit2: That's progress, but now I need 2010 edition?!
Spoiler (click to show/hide)
« Last Edit: May 23, 2020, 03:46:59 pm by flabort »
Logged
The Cyan Menace

Went away for a while, came back, went away for a while, and back for now.

bloop_bleep

  • Bay Watcher
    • View Profile
Re: Co-op Dwarfmode (online simultaneous multiplayer)
« Reply #143 on: May 23, 2020, 08:44:01 pm »

I think I installed the entirety of Visual Studio, Community version, either 2015 or 2017. That should include all of the build tools and the SDK.
Logged
Quote from: KittyTac
The closest thing Bay12 has to a flamewar is an argument over philosophy that slowly transitioned to an argument about quantum mechanics.
Quote from: thefriendlyhacker
The trick is to only make predictions semi-seriously.  That way, I don't have a 98% failure rate. I have a 98% sarcasm rate.

flabort

  • Bay Watcher
  • Still a demilich
    • View Profile
Re: Co-op Dwarfmode (online simultaneous multiplayer)
« Reply #144 on: May 23, 2020, 09:36:23 pm »

I think I installed the entirety of Visual Studio, Community version, either 2015 or 2017. That should include all of the build tools and the SDK.
Well, I've got Community version of both 2015 and 2017, and NOW I have all the build tools and SDK for 2015, as far as I can tell. They give the two following logs:

Spoiler: command prompt log (click to show/hide)
Spoiler: CMakeError.log (click to show/hide)
From what I can tell, pthread is the linux implementation of threads, and once not found, cmake goes on and looks for the windows implimentation, and does, so that is not the issue.

From what I can see, this one IS dfplex's fault (or webfort's). Specifically in/near this part:
Logged
The Cyan Menace

Went away for a while, came back, went away for a while, and back for now.

bloop_bleep

  • Bay Watcher
    • View Profile
Re: Co-op Dwarfmode (online simultaneous multiplayer)
« Reply #145 on: May 23, 2020, 11:28:27 pm »

Well, the latest commit in the Github repository for webfort was on May 25, 2015, so that check might be a holdover from webfort.
Logged
Quote from: KittyTac
The closest thing Bay12 has to a flamewar is an argument over philosophy that slowly transitioned to an argument about quantum mechanics.
Quote from: thefriendlyhacker
The trick is to only make predictions semi-seriously.  That way, I don't have a 98% failure rate. I have a 98% sarcasm rate.

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Co-op Dwarfmode (online simultaneous multiplayer)
« Reply #146 on: May 24, 2020, 02:00:04 am »

Trying out the new version, I use Chrome (at First) and it can't seem to connect, however using Edge (new IE) I can connect fine

this was the Win64 version that you have compiled. I'll test it out some more later

Edit:

Just didn't want to post and Overbump White_Rabbit it works for Firefox too. I was also running a experimental build of DFhack, so I reinstalled DFhack and the current 2.0 version of DFPlex.
Chrome still has issue (can't connect, not sure what the difference is) But Edge and Firefox work for Win10 x64
« Last Edit: May 24, 2020, 12:29:24 pm by Hugo_The_Dwarf »
Logged

white-rabbit

  • Bay Watcher
    • View Profile
Re: Co-op Dwarfmode (online simultaneous multiplayer)
« Reply #147 on: May 24, 2020, 12:03:33 pm »

Trying out the new version, I use Chrome (at First) and it can't seem to connect, however using Edge (new IE) I can connect fine

flabort: have you tried using a different browser?
Logged

flabort

  • Bay Watcher
  • Still a demilich
    • View Profile
Re: Co-op Dwarfmode (online simultaneous multiplayer)
« Reply #148 on: May 24, 2020, 06:16:56 pm »

Trying out the new version, I use Chrome (at First) and it can't seem to connect, however using Edge (new IE) I can connect fine

flabort: have you tried using a different browser?
...

It works in Edge. I was using Brave (A chrome clone).

Well, that's interesting. So chrome doesn't like that style of websockets, but other browsers are fine with it. Huh.
Logged
The Cyan Menace

Went away for a while, came back, went away for a while, and back for now.

MorsDux

  • Bay Watcher
  • If you only have a hammer, all problems seem nails
    • View Profile
Re: Co-op Dwarfmode (online simultaneous multiplayer)
« Reply #149 on: May 25, 2020, 03:25:13 am »

Awesome project!

Does anyone know if 32x32 tileset is supported or not? If it is, what is the setup process?
Logged
Pages: 1 ... 8 9 [10] 11