white-rabbit-dfplex / dfplex

Web Fortress
Other
50 stars 13 forks source link

Steam Edition support #32

Open xxSkyy opened 1 year ago

xxSkyy commented 1 year ago

are there planned steam edition support?

white-rabbit-dfplex commented 1 year ago

Yes, but dfhack isn't available for the steam edition yet.

PurHur commented 1 year ago

@white-rabbit-dfplex Dfhack is not building with the steam version: https://www.reddit.com/r/dwarffortress/comments/10bgz3g/psa_dfhack_nightly_builds_now_support_the_steam/

What do you think how much code has to be updatet in dfplex?

white-rabbit-dfplex commented 1 year ago

@PurHur

That's fantastic news. I poked around and got dfhack compiled, but not dfplex yet. I haven't yet investigated exactly what it will take to get dfplex to work yet -- of course, a lot of work will be involved due to the overhauled UI.

It turns out that 20k has picked up the torch and is making an alternate UI that could turn into multiplayer soon. I would recommend following that project.

Meanwhile, I'm working on getting a separate websocket plugin working for dfplex in order to facilitate either dfplex or df-ui multiplayer.

NateMarrocco commented 1 year ago

@white-rabbit-dfplex so df hack for steam is working on built in multiplayer?

white-rabbit-dfplex commented 1 year ago

@NateMarrocco well... @20k is working on multiplayer. Whether or not it will ship with dfhack I cannot attest to. DFPlex was intended to eventually be merged into mainline dfhack, but those plans were dashed by the v50 UI overhaul.

KimNikB commented 11 months ago

@20k is there any work still going into this? Can I help in any way? whats the current issue standing in the way? :)

20k commented 11 months ago

I ended up burning out on this a little, its not necessarily blocked by anything, it just needs a lot more work. The actual progress on the UI replacement is pretty good, and then multiplayer needs to be bolted on top

KimNikB commented 11 months ago

I'll read through the code a bit and see if I can progress it a little :)

Hyteel commented 11 months ago

I'd love to help out with the steamport if there is any particular issue you need help with

KimNikB commented 11 months ago

Hi @Hyteel, from looking through the code I think getting the plugin updated to the point where dfhack can enable it/run it should be the first and probably pretty doable step...I don't think it needs all that many upgrades...maybe we will run into trouble with the mouse controls but atm I can't say. Building the dfplex.plug.dll and trying to enable it in dfhack in the steam version it doesn't load as it cant find certain modules...still gotta find out which ones but I gtg right now, will check back later

KimNikB commented 10 months ago

So I am in the process of trying to recompile the dll files with dfhack and it seems cmake just completely skips the dfplex directory even tough it's in the plugins folder?...

My idea is recompilling it with the new dfhack and seeing what breaks so I can get to fixing the things one by one

white-rabbit-dfplex commented 10 months ago

@KimNikB If you're compiling dfplex (rather than 20k's module), you do need to make sure that you're using my fork of dfplex too. It has cmake configured to build dfplex.

Unfortunately, Github will require 2FA for me soon, and so my account may become permanently inactive and I will be unable to offer further advice. :/

KimNikB commented 10 months ago

soooo @white-rabbit-dfplex thanks for the tip, it's trying to build the module now :)

I finally had time to dig into it a little, I started integrating dfplex into the new dfhack version that supports v50+(the steam version) and while some functionalities have simply been renamed, the viewscreen system has changed considerably so I'll have to update all of that stuff to the new header files.

Also some libraries have been removed, for now I've added these locally but I'll see about getting rid of them later...

My next goal is to update the viewscreen-dependant code and then (absurdly optimistically) hopefully get to a "runnable" state in which I can start debugging...

KimNikB commented 10 months ago

Okey bad news everyone...Pretty much everything to do with the gui has changed completely...and (correct me if I am wrong) but the way this works is we determine what the player is looking at (which viewscreen he is in) and then enter the commands he does depending on that screen...well there is only one viewscreen during normal gameplay now and at first I thought that might make all this easier but after throwing a couple hours at it this looks bad...

I am no longer certain that rewriting from scratch / finding a new way to allow for multiple playscreens is not faster for the steam version...

KimNikB commented 10 months ago

Ill ask around a bit, maybe someone there has a good idea, if any of you have any ideas on how to do the whole two game-screens for the same instance thing let me know...

20k commented 10 months ago

I should note, the reason why I went with the ui rewrite approach that I did was because it was essentially impossible to port dfplex to the new ui system

The ui rewrite I was working on was very playable and had a significant amount of functionality implemented - it'd probably be much quicker to finish that and then add in multiplayer via that route

KimNikB commented 10 months ago

what kind of ui rewrite? I really like the steam-versions ui

white-rabbit-dfplex commented 10 months ago

This is, essentially, the pattern that we came up with when we started on dfplex. Everything else is just details and optimizations, including viewscreens. Suppose there are N players:

In short, dfplex makes the game do, at an extremely fast rate: enter menu, take screenshot, exit menu, repeat. It's an extremely twisted notion.

This can be done almost completely agnostic to the actual data of the game. We started with this for dfplex and then found lots of shortcuts. For instance, there is a function that lets dfplex force the game to render immediately -- this means we can render N times per frame instead of once every N frames, leading to a smoother experience. Without this, players would be playing with a framerate divided by N otherwise -- perhaps even slower, if feeding keystrokes to the game can only be done at a rate of one keystroke per frame.

This method is very general purpose, so I don't immediately see why it wouldn't work in principle for the steam version. It would most likely require a complete rewrite of dfplex though. But it might be easier than recoding the UI from scratch like 20k is doing.