noeda / dfterm3 Goto Github PK
View Code? Open in Web Editor NEWRemote Dwarf Fortress playing
License: ISC License
Remote Dwarf Fortress playing
License: ISC License
Hello,
when I want to register a new game in the web interface, there appears a message that contains following:
"Happstack 7.3.0
Your file is not found
To try again is useless
It is just not here"
All ports are open, and the game ist found.
What can I do?
Lightman from the forums:
"
I think there is a bug with the -w options, if you don't use the -p option, as well.
I have to specify all the ports and then it works. Otherwise, I get this error:
bind: failed (Permission denied (WSAEACCESS))
"
I'll check if there's anything going on in the code when I have the chance. I think this may be a case of misunderstanding how the command line options work.
I saw this when I went to Putnam's server. You need to shut the game down and back up to fix it. On the reddit thread, someone also complained that input did not work which sounds like there is a good chance it is related.
No idea yet what causes this so this issue is going to be vaguely described for now.
I add add_subdirectory (dfterm3-plugin) to the end of dfhack/plugins/CMakeLists.txt and try compile, but linker fails:
Linking CXX shared module dfterm3.plug.so
Undefined symbols for architecture i386:
"_SDL_PushEvent", referenced from:
_plugin_init in dfterm3.cpp.o
"___progname_full", referenced from:
__ZL15sendHandshakingRN6DFHack13color_ostreamEP13Dfterm3Client.clone.33 in dfterm3.cpp.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
make[2]: *** [plugins/dfterm3-plugin/dfterm3.plug.so] Error 1
make[1]: *** [plugins/dfterm3-plugin/CMakeFiles/dfterm3.dir/all] Error 2
make: *** [all] Error 2
We should tag logging messages in such a way that we can tell from which part of Dfterm3 error message comes from.
In issue #15 we have this error message:
HTTP request failed with: Network.Socket.ByteString.recv: failed (no error)
I cannot be certain where this error message comes from but if, for example, it came from the HTTP server (there are at least two of them running most of the time) we could tag it like this:
[playing-interface] HTTP request failed with: Network.Socket.ByteString.recv: failed (no error)
Putnam wrote in the Bay12 forums:
"Okay, so sometimes DFTerm3 loses contact with DF. And then it opens a new copy without checking for the old one first."
This needs to be investigated and fixed.
Just released 0.3 and PeridexisErrant said "There are a few minor issues though - one is that the arrow keys aren't working for me (Chrome) when they did on an older version someone opened up on Reddit.".
I need more information what causes this before I can start working on a fix.
Launching dwarf fortress with the dfterm3 dfhack plugin on windows xp sp2 immediately pops up a dialogue box saying:
The procedure entry point QueryFullProcessImageNameW could not be located in the dynamic link library KERNEL32.dll
followed by
Can't load plugin D:\df\df_34_11_win\hack\plugins\dfterm3.plug.dll
in the dfhack console. The rest runs normally, but obviously without dfterm.
Apparently QueryFullProcessImageNameW is only available in Vista upwards.
Once I launch DF through the web interface, the game only seems to function for about 10-20 seconds before the process terminates itself (regardless of if I leave it on title screen, load a game, create a world etc.) and then becomes unable to relaunch until I completely restart DFTerm.
I took a screenshot of the terminal to help you troubleshoot.
Dfterm3 at the moment ships with cootue curses square TTF font (with the author having given me permission to bundle it). Apparently sand is not shown properly on Chrome:
http://www.bay12forums.com/smf/index.php?topic=129995.msg5277557#msg5277557
We can either change or try to fix the TTF font.
Right now, the DFHack Dfterm3 plugin requires a change to DFHack itself.
The only change is to add SDL_PushEvent() to callable functions from plugins. Linux does not need the change (vanilla DFHack can be used) but Windows does require it.
I don't remember anymore why I could not use the same method on Windows to avoid custom DFHack as I can do on Linux but I'm sure I could at least write a hack so that no custom DFHack is needed.
We need an icon. Icon is needed for the planned feature of having a tray icon on Windows. And of course, icons are cool.
At least sizes 16x16 and 32x32 are needed.
I asked on the Bay12 forums if someone might want to create one:
http://www.bay12forums.com/smf/index.php?topic=129995.msg4626850#msg4626850
Additionally, Dfhack console cannot be used.
This is caused by Dfterm3 and Dfhack trying to use the same terminal and things going awry.
I'm not sure if this is intentional, but when trying to specify a different port for the playing server with --websocket-http=
(since I'm running a server on 8080 already), only the playing server starts (the admin server and socket don't). It would be nice to be able to use defaults for the other ports without specifying them explicitly. As an alternative, I suppose another option could be added to run only the servers specified, in case it turns out to be necessary.
This can happen if empty strings get into the Dwarf Fortress screen. The circumstances on which that happens, I don't know.
There is probably a way to do this with a DFHack plugin that disables certain menu options. Allowing these actions locally would be tricky (except for exiting, which can be done with "die" in the DFHack console).
This issue is to remind me to implement alternative way of feeding input to Dwarf Fortress that also works in PRINT_MODE:TEXT
The importance is that this makes running headless Dwarf Fortress servers easier if they can use PRINT_MODE:TEXT with Dwarf Fortress.
Edit: Duplicate
I cannot be sure, but I suspect the web interface itself is a major source of perceived lag. The current display is implemented as a two dimensional grid of -objects that get their classes and text contents changed all the time, probably triggering nasty, performance-killing things like reflows.
I think it may be worth it to experiment with a canvas object to see if it was faster and more CPU-friendly.
http://24.192.11.199:8080/playing/#
Pressing shift (just shift) zooms directly to a certain location. This means that < and > also don't work because they require pressing "shift" first. One possibility is that the JS keycode for Shift (16) is being translated to a function key at some point (F1-F4 and shift-F3 are the only hotkeys currently set up, so it's probably one of those)
It appears that it is a terrible problem that just anyone can control everything.
By "scriptable player control" I'm thinking of letting server admins implement something similar to IRC bots.
The chat can then be used to control who is going to play, who cannot play and server admins can have custom messages and stuff.
As for the scripting language, I don't think it's reasonable to impose Haskell on admins so I'm leaning on Lua. How exactly this will work I'll figure out as I start coding on it.
If the websocket port is changed (with --websocket
), the JS in playing.html still assumes the port is 8000.
A possible solution could be to generate a JavaScript/JSON file with Haskell containing the websocket port, e.g.:
dfterm3_ports = {
'websocket': 8000
}
which could be included in playing.html before connecting to the websocket server.
There should some kind of a list of players who are watching and/or playing a Dwarf Fortress game in the web interface. Right now, it is not possible to know who is watching, scheming, planning, lurking.
This requires changes to the protocol and the web interface.
I'm putting this as an issue so that I won't forget to implement this.
src/Control/Lens/Internal/Exception.hs:165:3:
‘typeOf’ is not a (visible) method of class ‘Typeable’
src/Control/Lens/Internal/Exception.hs:168:14:
‘typeOf’ is not a (visible) method of class ‘Typeable’
Failed to install lens-3.10.3
ghc 7.8.3
When trying to connect to a server (I was trying Putnam's, but that seems to have been taken down for now), after signing in, I cannot input anything or do anything. Chat seems to work, as I can input comments.
I cannot select "Continue", "start", or "generate new world", or anything of the sort, let alone play in a fort.
Trying multiple browsers, I have the same problem on all of them. However, on all tests no-one else appeared to be on the server - this may be related and needs more testing. If I could maybe log onto a server while someone else is confirmed on, and test the chat, that would yield more information.
Another forum member has brought this up (Vyro), though he has since apparently succeeded.
If this is related to open or closed ports, then perhaps some more information on opening ports would be useful. If this is something to do with hardware, that would also be useful. If it has to do with the settings on my browser (default settings, most recent version of firefox) that concern "websockets", information on setting this would be useful, too. If fact, since the problem is probably on my end, any information on solving this problem would be appreciated.
it would be great if i could whitelist ips that could connect to the server i'm running.
This is not a problem in Dfterm3 itself but in one of the libraries it uses, acid-state, that does not compile with GHC 7.8. We use acid-state to store all the persistent data in Dfterm3.
I'm currently compiling Dfterm3 with GHC 7.8 with a modified acid-state but I don't know when upstream will release a fixed version of acid-state.
This same issue also applies to type-level package that's depended upon the protobuf (used by Dfterm3 to communicate with the Dfterm3 Dfhack plugin in Dwarf Fortress) package.
And finally MonadCatchIO-transformers also does this.
I think I've been bitten by a dependency hell that I may have somewhat caused myself by not being careful which packages I use.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.