#Iota Multiplayer - Noita local multiplayer mode

180 messages ยท Page 1 of 1 (latest)

deft stump
#

Steam version soon
Now steam version is here

dusty imp
#

Nice work! After some personal testing I tried it with a friend and it seems to function well

There are a few oddities here and there that might need some working on in the future but other than that it makes for a pretty intuitive experience

Just to mention two here: The cursor for the extra character's sometimes dissapears, usually this happens if I have the game out of focus but dying seems to also cause it. Something tangentially related is that p1's cursor when using a mouse follows the other player even if p1 is offscreen, I assume it just stays at the same position of the screen and this is causing it, it dissapears correctly after a second or three of not moving the mouse

The second thing I noticed I'm less sure if it's a bug, but if you share perks and one person picks one, the perks respawn, like mentioned, however, the same person can then again take perks once again

But all things considered this is definitely a lot of fun, thanks for making this!

haughty oasis
#

I have made a similar mod that allows for multiple keyboard/mouse on the same setup with splitscreen as an option.
You can use it if you are interested and @deft stump you can copy/paste anything from it if you want to continue working on this mod (no need to mention me).
https://github.com/Linksyx/noita_multiplayer
I'll continue it on my side if a gui lib allowing for a good inventory system is made at some point

GitHub

A local Noita Multiplayer mod that can be used locally and remetely (with Parsec for example) with several sets of mice and keyboards and which features 2-3-4 players splitscreen and no limit on sh...

dusty imp
# haughty oasis I have made a similar mod that allows for multiple keyboard/mouse on the same se...

Your mod also certainly peeked my interest, especially since it allows for multiple keyboards and mouses which is a really nice touch, I usually play with 3 others so hearing about the inventory issues makes me worried slightly about it. Also, theoretically speaking, would it be possible to somehow collect the inputs via something like parsec or steam play together to one pc without having the other players need to install the files? No worries if not, I think having only host needing to install something would really help out people to play more easily because some of my friends can not be trusted with files lol. Anyway I can only imagine the trouble you went through to get the mod working so really nice job on that! I'll probably try to test it purely locally sometime

haughty oasis
# dusty imp Your mod also certainly peeked my interest, *especially* since it allows for mul...

Unfortunately no, I tried with Parsec, Steam Remote Play and Rust Desk and none of them have mouse/keyboards inputs you can differentiate from other devices when received. I figured it was maybe possible with Rust Desk but out of the three it has the lowest visual quality and no sound (for me at least)
And about installation there's actually nothing to install, it's just executing the script so that should not be too hard (and for the one use case you mentionned you only have to send your friends the parsec installer, and a folder with the remote script alongside the settings.json)
If you are able to get some differentiated inputs with Parsec that would be definetely be great tho.

#

If you try to test locally it won't be the same script than what your friends would have to do, in your use case you should take a laptop for testing

#

And the local and remote folders are really not well named...

#

And I'll try to do a basic hotfix for inventory since ImmortalDamned got it to work for 4

#

Oh and finally if your friends happen to all have the game maybe use IQuant's mod instead

dusty imp
# haughty oasis Unfortunately no, I tried with Parsec, Steam Remote Play and Rust Desk and none ...

Gotcha, that makes sense as a noticed the same problem with steam together, keys are not really the problem as those can always be rebinded with mnee, it's mostly the mouse that seems impossible without your method so far as I know. And ah I might just be confused then? I was talking about the logistics of the settings json and just sending the file over. I fear I might not be the person to get differentiated inputs working but I might give it a looksie later

dusty imp
haughty oasis
#

@deft stump do you have any idea what makes your mod be able to display 4 hotbars instead of only 2 ?
I can't find anything special about that in your mod but it works.

deft stump
deft stump
#

And the cursor may not important - so I will fix this because you mentioned this

dusty imp
mellow sentinel
#

would really appreciate some help, for some reason when my friend connects via parsec with controller his joystick moves my inventory, swaps my wands and shoots them while im on keyboard, is there any way to stop this from happening?

#

there were no issues vice versa, when i used controller and he used keyboard everything worked smoothly

mellow sentinel
#

nvm turned mouse and keyboard off from guest in parsec and it got fixed

loud spindle
deft stump
#

NoitaPatcher also provides extra features more than 4 hotbars

quartz token
#

ive seen multiple people say noita patcher can get you to have multiple hotbars but i downloaded the mod and it is not very clear its not just another mod its like a library for mod makers to use so i have no idea how to make it work if anyone knows how or there is instructions somewhere that would be helpful

deft stump
#

The NoitaPatcher is ONLY USED BY DEVELOPERS

#

I'm surprised that many people misunderstood my meaning

#

I mean I will use this library to make multiple UIs work later

deft stump
#

@haughty oasis Mm, I think maybe there's no need to transmit multiple keyboard/mouse, because these inputs could be just mapped to different gamepads locally
Compared to using extra software to transmit the multiple keyboard/mouse over the network, this solution is significantly more convenient, and only requires players who need it to use it

#
GitHub

[ๆŒ‰้”ฎๆ˜ ๅฐ„ๅทฅๅ…ท] QKeyMapper๏ผŒQtๅผ€ๅ‘Win10&Win11ๅฏ็”จ๏ผŒไธไฟฎๆ”นๆณจๅ†Œ่กจใ€ไธ้œ€้‡ๆ–ฐๅฏๅŠจ็ณป็ปŸ๏ผŒๅฏ็ซ‹ๅณ็”Ÿๆ•ˆๅ’Œๅœๆญข๏ผŒๆ–ฐๅขž่™šๆ‹Ÿๆธธๆˆๆ‰‹ๆŸ„ๅŠŸ่ƒฝ๏ผŒๅฏ้ผ ๆ ‡ๆŽงๅˆถ่™šๆ‹Ÿๆ‰‹ๆŸ„ๆ‘‡ๆ†ใ€‚ - Zalafina/QKeyMapper

#

But for mouse position, I need a software to transform the mouse position to gamepad stick vector, so the vector could be transformed to mouse position in the host

#

I don't know too much about C++, it's hard to develop one by myself

loud spindle
deft stump
loud spindle
#

C is simple

shut skiff
#

probably better to just leave entangled worlds for that problem, since it would be a nicer solution because of the other problems parsec introduces besides needing to use gamepad

haughty oasis
# deft stump <@535153657587695627> Mm, I think maybe there's no need to transmit multiple key...

That could be good for players over Parsec, but I'm not sure you can use it for same room local play, or I didn't understand it.
And for your message about the mouse to gamepad in C, I'm not sure what you meant exactly but I can look at it if you explain it a bit more. Do you want to do mouse->joystick->parsec->host's joystick->virtual mouse in host->Noita ?
What is the point then as you still require software on the remote player's side? You found a way to make the mod safe?

haughty oasis
loud spindle
#

you can copy paste and spoof steam id

shut skiff
#

game doesn't have drm, so you can just copy game files, and then entangled worlds doesn't require you to have steam so you can still play

#

i just mean putting in developer time for something with large innate problems when theres a better solution is a bit silly

deft stump
# haughty oasis That could be good for players over Parsec, but I'm not sure you can use it for ...

With Parsec, my solution doesn't need additional network connecting to transfer multiple keyboard/mouse, players could just configure their key binds in the mapping software locally, and doesn't require everyone to use mapping software (if someone is host or gamepad user)
What I mean by that is mapping multiple keyboards/mice locally to different gamepad inputs, transferring those gamepad inputs via Parsec, and in the host, secondary players will use gamepad controls, so everyone could use keyboards/mice.
Yes the mouse to gamepad is roughly that
This is safe without additional network connecting ๐Ÿ˜„

loud spindle
#

๐Ÿค” you still need to manually install software, how is it any more convenient than entangled worlds?

deft stump
#

No, entangled worlds is not local multiplayer

#

Entangled worlds is still not perfect in some ways

shut skiff
#

the camera system alone imo makes entangled worlds nicer for non same-system play, main issue with entangled worlds is like, shared hp which some people dont like, i think its fine but thats preferences

loud spindle
#

i think they are making an option to not do shared health

shut skiff
#

yeah just not for a month or so, he wants to fix stuff up first

loud spindle
loud spindle
#

!

#

contributor!

echo lodge
vast fog
gleaming vault
#

I know you want an answer from someone who would know but attempting to ping the whole server wouldnt help

vast fog
gleaming vault
#

oh it was here not everyone

vast fog
#

Ahaha, no worries, anyway I managed to modify other coop mod to fix our issue c":

deft stump
loud spindle
#

why bother wiith mnee?

deft stump
#

I have discovered this problem, but it only happens once

deft stump
loud spindle
#

you can just use inputgetmousepos

deft stump
#

I mean mouse click

loud spindle
#

you can just use inputgetmousebuttondown

#

is not get*

solid plaza
solid plaza
#

To clarify also, this happens when P1 is controlled through the mouse?

vast fog
#

Yep, P1 controlled through the mouse

#

Also, it happens randomly, I have no idea how this could be triggered

solid plaza
#

My guess is that it's some typical noita engine bs (for example, just in the last 10 minutes of testing, I discovered that apparently no-shooting-in-inventory is fully hardcoded, aka complete piss). The best course of action would be to just blindly close all the potential gaps, so will see what comes out of this.

solid plaza
vast fog
deft stump
deft stump
#

Or you will get the old value ๐Ÿ˜ฆ

solid plaza
# deft stump Yes, you have changed the gui input filtering. I'll see if this works I noticed ...

There's some severe bs with how ControlsComp is handled in this game - for some ungodly reason they are delayed a whole frame (even FrameDown value updating is delayed a frame) while InputGetMouseButton is available immediately. To combat this, I'm storing the raw input value from the previous frame and only then comparing it with the ControlsComp one (I could indeed use just raw ControlsComp input here but since I'm trying to blindly fix a bug, better be tripple sure).

#

So yeah, the guied inmode lmb/rmb input will be delayed a frame from now on, cause that's apparently how nolla wants it to be.

loud spindle
#

your lua runs at the wrong point during the frame

solid plaza
#

Oh, and I cannot even guarantee that this change will fix anything regardless, we'll have to wait and see what feedback comes.

solid plaza
loud spindle
loud spindle
#

alternatively you could just be measuring wrong

solid plaza
#

If I'll put this on lua comp then the order of execution becomes unpredictable -> mnee state is no longer the same for all lua contexts
If I'll put this on post it's literally the same as gettin it a frame later except now I have a freefloating chunk of code in PostUpdate

vast fog
#

I'm curious why I was the only person reported that bug, maybe it's rare?

solid plaza
#

There's definitely no rush, especially since that's an exceptionally odd bug.

vast fog
#

Also, do you have an idea what triggered this bug?
We tried to do a lot of different stuff near Mountain entrance but couldn't replicate it
Usually it comes after 15-20 minutes of playing and as I said - restart helped to fix it for some time

loud spindle
solid plaza
vast fog
solid plaza
loud spindle
vast fog
solid plaza
vast fog
solid plaza
#

Yeah, they should start ticking immediately.

vast fog
#

Looks like it's not happening :D

#

Not sure why, I'm using old mnee

#

I think I need to actually play to test it, since again, we tried different things to trigger it near mountain and had no luck

solid plaza
#

No worries, I'll keep an eye on reports in general.

deft stump
# solid plaza There's some severe bs with how ControlsComp is handled in this game - for some ...

Don't you know the world update executing order?
The game executes all the OnWorldPreUpdate callbacks from mods at first of the frame,
then executes the "MidUpdate" (every components are updated at that time)
At last it executes all the OnWorldPostUpdate callbacks
So the internal code may seems like that:
for (;;){
WorldPreUpdateAll();
WorldMidUpdateAll();
WorldPostUpdateAll();
wait_until_next_frame();
}
It maybe not 100% correct, but should roughly like that

#

So, if you use ComponentGetValue2(controls_comp, ...) on MidUpdate/PostUpdate, you could get the latest value at current frame

solid plaza
#

oh, damn, I totally forgot about midupdate, will see

#

huh, was there just OnWorldUpdate? I could have sworn a second ago there was but nope?

deft stump
#

To run codes in WorldMidUpdate, pls use LuaComponent script_source_file

deft stump
#

I just call it MidUpdate, the game itself doesn't provide functions like OnWorldMidUpdate

solid plaza
#

putting it just on some lua comp will make it unpredictable

deft stump
#

What is "unpredictable"?

#

The game update ControlsComponent at first always, then execute script_source_file at next

solid plaza
#

as in, I have no control over the order of execution of lua comps themselves, so the chunk with mnee state update could have run 1st, 5th or last in the update stack

#

and this would cause synchronization issues between different lua contexts, so one will have lmb pressed while others will receive it only a frame later

#

in fact, if the execution order is not static within single run, this could cause some lua comps to never have lmb press reported, since at first they will be too early and then they will be too late

#

oh, actually, I can provide an easy way to apply filtering on your side, so per-luacomp solution

#

aka leave it to lua components to check for the controlscomp value

deft stump
#

Yes, I mean this, directly

solid plaza
#

nice, based

deft stump
solid plaza
deft stump
#

Just do something in mnee.mnin_* (those functions that used to get inputs)
You can do this only once each frame

solid plaza
#

I'll add inmode-like system that operates on per-component level though, so one can utilize it for cases that require such

solid plaza
#

yeah, this will be the best case

deft stump
#

It seems a bit like SettingAccessor ๐Ÿ™‚

solid plaza
#

nope, it actually is just a full frame delayed (running in lua comp; first number is frame, second is InputIsMouseButtonDown, third is ComponentGetValue2)

#

what a bullshit

#

last one is mButtonFrame

#

checking for init.lua context globals (to make sure I'm not running it there somehow) โ€“ all clean

deft stump
#

The game adds GameFrameNum by 1 in the between of PreUpdate and MidUpdate

#

for (;;){
WorldPreUpdateAll();
GameFrameNum += 1;
WorldMidUpdateAll();
WorldPostUpdateAll();
wait_until_next_frame();
}

#

And this also works

solid plaza
#

how very strange, I'll do more digging

solid plaza
# deft stump What are you doing now? Don't enable the IotaMP, because it already has 1 frame ...

oh, that makes sense, you are only printing the log when the actual delayed inputs are updated
while this works by itself, it's still an issue when integrated into a larger system, since mnee operates first and foremost on InputIsDown, all the comp checking is secondary

try running this code

if( InputIsMouseButtonDown( 1 )) then print(
  GameGetFrameNum(),
  tostring( InputIsMouseButtonDown( 1 )),
  tostring( ComponentGetValue2( ctrl_comp, "mButtonDownLeftClick" )),
  ComponentGetValue2( ctrl_comp, "mButtonFrameLeftClick" )
) end
vast fog
#

Sorry for this little intrusion, but why it wasn't working only for shooting down and up with mouse? ๐Ÿ‘€

#

Left and right was 100% fine, but I'm not sure about angle

solid plaza
#

considering that mnee gets the initial LMB state directly from SDL, there is a frame when I cannot accurately account for GUI filtering, hence the delay is needed
redoing the backend itself to operate on ControlsComp for the case of mouse buttons is out of question too, as the whole idea of mnee is to exist in complete independence from normal input

solid plaza
#

main working theory is that there was some kind of malformed gui object present at the top/bottom of the screen that was blocking the inputs but that's one hell of a bug to be so uncatchable

solid plaza
#

yeah, I've put just raw testing code on lua comp and it does indeed behave

#

however, for the current way you are doing input system this will still be an issue

#

so I guess the best course of action is to have 2 ways of gui filtering, Pre-Capable and Instant

#

Alright, now there are two inmodes: "guied", a more robust version that works everywhere yet has a frame-long delay, and "guied_instant", will only work for lua comps (will explode if you run it on PreUpdate) yet is immediate to respond.

solid plaza
#

reading back, I do be repeating myself a fair bit ngl

#

definitely gotta sleep more

deft stump
loud spindle
#

i dont see why you need one

#

the input api is perfectly fine

deft stump
loud spindle
#

ig, it really doesn't seem like you need anything complex though

solid plaza
jolly ginkgo
#

Great mod. Is it possible to add an indicator indicating which way the second player is behind the screen?

#

As in spelunky

winged stirrup
#

i have no clue how to setup this mod

shut skiff
#

did you read the guide? @winged stirrup

winged stirrup
#

yes i figured it out i forgot to delete this

tacit silo
#

So we have the setting on that should give us both a perk in the mountain (aka i grab one and 3 new ones are spawned for my friend) but so far after picking one no more appear and we just have one perk that also isnt shared

deft stump
#

Make sure you have turn on this
I can't reappearance this issue

jolly ginkgo
tacit silo
#

also sorry it took a while my friend couldnt play till now

deft stump
#

Pick up a perk and it will shows

granite pilot
#

Revive feature not working for me.

deft stump
#

refer to workshop page description

jolly ginkgo
#

Double GUI thing killing my FPS. Please make it toggable. And please return one player camera fix Hamisad konnasad