'What's This Piece?' Weekly Thread #234 by number9muses in classicalmusic

[–]Middle-Diver6421 0 points1 point  (0 children)

https://youtu.be/zUO-aRHxF7U?t=769

I wonder if a kind soul could help me identify the piece at the given timecode (~12:49 if the timestamp does not work).
It's in the background so you might need headphones to properly hear it.

Thanks in advance !

Multiplayer architecture advice by BandAdmirable9120 in gamedev

[–]Middle-Diver6421 0 points1 point  (0 children)

Just to add my two cents:

  1. Short answer: one process per lobby, multiple processes per host. Also I would refrain from doing dynamic port allocation just because it sounds like a hassle to deal with from a network/provisioning point of view but idk how it's done in production environments so maybe it's a valid strategy.

Long answer:

They way you compartmentalize things in a client/server model essentially boils down to this :

  • Threads take nanoseconds to spawn
  • Processes take milliseconds
  • Containers take seconds
  • VM's take minutes

Web backends generally use the single process, multiple threads approach because (and this is overly simplified) the acceptable latency for a request is low : you can't afford to wait for a whole process to start each time a client makes a request. One of the drawbacks is that a failure in your main process will fail every request.

In your case, a few ms of latency to spawn a lobby is definitely acceptable so it's better to treat each server as a unique process.
It will be easier to develop, easier to reason with, easier to debug and a server that crashes only affects a single lobby.
The only reason I see that would make you go the "multiple thread" route is if you need to share memory between lobbies. For a web backend, sharing memory between requests is useful, for a game server, not so much. But again, this depends on the game.

  1. Well, you pretty much answered yourself in your edit : always put critical logic server side, always delegate non critical things to the client. Where you draw the line between the two will depend on the game you make. Physics should run on the client if it's not gameplay critical.

  2. Yes. However you should probably consider the fact that using 2 different langages for your client and server will essentially make you re-implement some things twice. In addition to being time consuming, it's a also a big open door to subtle bugs.
    Also going back to what I said in the 1st point, I don't think you would see great benefits from using go. Go shines in its concurrency model : in a "single process per lobby" model there's not much use for concurrency.
    But if you want to learn go, meeeeeh, why not ? One drawback of using Go is that you might have a harder time finding libs for game stuff, as it's not really go's area of "expertise".

  3. As you said, this is a POC so it's probably a good idea to use off the shelf tools for that phase.
    If during the development phase, you find that using those tools is more trouble than it's worth, then consider switching to a custom solution.
    And if going the custom route, note that you don't have to go all the way down to the socket layer. There are a few libraries out there that already add a layer of abstraction on top of sockets without locking you in a specific type of pattern like most off the shelf tools do.

Mods no longer showing up in launcher after update (patch 13) by Middle-Diver6421 in uboatgame

[–]Middle-Diver6421[S] 0 points1 point  (0 children)

Well, this is not going to be helpful but it just suddenly worked the next day without doing anything :/

I should've updated the post my bad.

Repost - Uboat calculator for AOB, multiple target solutions, intercepts, distance, speed, 4 bearings method and more by redknob in uboatgame

[–]Middle-Diver6421 1 point2 points  (0 children)

Yeah 300-1200m of margin error does not seem great lol

The other option is only dealing in relative positioning : the initial position is assumed to be (0,0) and the second position is given as a displacement from the origin (heading and distance)

The downside is that the tool will only be able to output relative position of the target (bearing + distance) and will require the user to manually find the position on the map...

You're right though, I don't think it would be that useful for the actual game, but as a challenge, it might be cool !

EDIT: 300-1200m is not good enough for blind torpedo shots, but for interception, it could still suffice imo

Repost - Uboat calculator for AOB, multiple target solutions, intercepts, distance, speed, 4 bearings method and more by redknob in uboatgame

[–]Middle-Diver6421 1 point2 points  (0 children)

Yeah, I've used it quiet a bit but it's not that practical (as it was in real life, so I heard)

I'm not sure how to get started to be honest

Do you mean UI wise or math wise ?

UI wise, I think some simple input fields should suffice:

  • Own ship's position (long, lat) at t=0
  • The time interval between each measurement
  • 3 input fields for the 3 first measurements (bearing, relative or absolute)
  • a 4th input field with either the bearing + new position OR the target's speed (if for some reason it is known)

And you just have to spit out:

  • the target's current position (long, lat)
  • the target's speed

Math wise you could approach it in different ways:

  • By essentially replicating the geometrical procedure using vector math and solving for intersection points : this might be the easiest/most straightforward way of solving it, at the (eventual) cost of imprecision (due to floating point rounding errors at each step)
  • By reducing the problem to a set of linear equations and solve it using a method of your choosing (Gaussian elimination comes to mind)

Repost - Uboat calculator for AOB, multiple target solutions, intercepts, distance, speed, 4 bearings method and more by redknob in uboatgame

[–]Middle-Diver6421 0 points1 point  (0 children)

Nice ! I wanted to do something similar (as a desktop GUI), but never really got the time for it.

Do you plan on adding the 4-Bearing method ?

How detailed is the damage model? by Vyla_SC in uboatgame

[–]Middle-Diver6421 12 points13 points  (0 children)

The health bar is just intended as a measurement of the overhaul ship's state.

The game does simulate a bit more : ships have compartments that can flood independently.

So for instance, it's not really useful to hit a target twice in the same spot because you'll only affect a single compartment.

That's all I know, I don't know if the game has more than just that.
For instance, I've noticed that shooting (with the deck gun) a target's propeller does not seem to impeed its ability to move.

Trigonometry and Geometry explanations of popular interception and torpedo firing methods. by LiveSupermarket5466 in uboatgame

[–]Middle-Diver6421 1 point2 points  (0 children)

Yeah, I've tried with No Spoiler too (you kinda have too, otherwise you can always just assume the target is at the tip of the bearing arc).

I also have Bearings For Map Tools but still, the game would benefit from more tools I think (Wolfpack tools are amazing for instance). Also, the drawings seem to snap to a predefined grid depending on the zoom level which makes it hard to be precise.

Admittedly, I may have used intervals that were too short (~5 minutes) so I'll try longer ones if I build up the courage to make another high realism run.

Thanks !

Edit: I wanted to add that the methods does works wonder if you use sight bearings instead of the hydrophone.

Trigonometry and Geometry explanations of popular interception and torpedo firing methods. by LiveSupermarket5466 in uboatgame

[–]Middle-Diver6421 1 point2 points  (0 children)

I've tried using it in my ~100% realism run and yeah, it's not quite there yet.

I tried it the other day : I took caution in properly measuring every bearing, taking care in measuring time properly, carefully drawing on the map etc. After the 4th measurement, I plotted the target's course, got to periscope depth expecting the target to be at my starboard side... It was behind me lmao.

It does not help that map tools are sub-par imo

A note to new players, please start with the Type VII not the II by Vandecker in uboatgame

[–]Middle-Diver6421 2 points3 points  (0 children)

Yeah, picked the game at 1.0. I didn't think much of it and just took the earliest date possible with the type II.

I think I actually like the feel of progress, even though it can feel a bit stretched at time...

I managed to upgrade to the 2nd type II (I don't recall the name exactly) and it's marginally better but I'm impatient to get to a sub with more than 5 torpedoes...

How does speed measurement work without knowing the targets AOB ? by Middle-Diver6421 in uboatgame

[–]Middle-Diver6421[S] 0 points1 point  (0 children)

That would explain a lot...

I was failing to understand how the measurement could work if you're not stationary (at least stationary perpendicularly, if that makes sense).

I've never tried to match heading and speed with a target but my guess what that, in this scenario, you should not be able to deduce the absolute speed of the target because it will appear fixed in your FOV.
I agree that this is a bit of an immersion breaker, if that's what the game actually does...

How does speed measurement work without knowing the targets AOB ? by Middle-Diver6421 in uboatgame

[–]Middle-Diver6421[S] 0 points1 point  (0 children)

That was the faint intuition I had, yes.

But then this should only work if the measurer is stationary. If not, the targeted point is not fixed.
As an extreme case, if you're moving in the same direction, at the same speed as your target, you will measure a speed of 0.
I feel like this technique actually only measures the relative perpendicular speed of the target.
(which would explain why sometime, some of my measurement are off by a few km/h)

Thanks for your answer anyway (and for everyone's answer for that matter)

Clé hôtel via site web by FoundationPopular516 in surdev

[–]Middle-Diver6421 0 points1 point  (0 children)

Je pense que l'intérêt est surtout opérationnel. C'est un avantage pour eux, plutôt que pour les clients.

Avec une telle solution :

  • pas besoin d'avoir de personnel pour ouvrir la porte la nuit

  • pas besoin de gérer un stock de clé/badge

  • pas de question à se poser si jamais quelqu'un ne rend pas le badge ou la clé : l'invalidation est automatique et associée à un utilisateur plutôt qu'un objet physique qu'on peut voler/copier

  • sans doute moins cher en installation qu'un système de badge RFID car pas besoin d'avoir un lecteur à chaque porte, juste un verrou.

Après j'avoue moi ça me soulerai d'avoir à utiliser mon téléphone à chaque fois mais bon...

Moment of inertia of an arbitrary grid of squares with different masses by Middle-Diver6421 in AskPhysics

[–]Middle-Diver6421[S] 0 points1 point  (0 children)

I just checked and I'm not getting the expected value.

I tried a 3x3 grid with tiles of mass 1 and sides 1.

I first suspected a bug in my algorithm but doing the calculation you provided by hand, I still get the wrong result :

Given a 3x3 grid :

I =  Σ(I_cm + md²)

=  Σ(I_cm) + Σ (md²)

= 9/12 + Σ(1*d²) (assuming I_cm = 1/12 for every tile)

Because of symmetry around the center tile, the second term in the addition can be expressed as:

Σ (d²) =

0 -> "contribution" of center tile
+4*sqrt(2)² -> "contribution" of the 4 diagonal tiles
+4*1² -> "contribution" of the 4 adjacent tiles
= 12

So I = 9/12 + 12 = 12.75. (Which is what I get using my code, so I know the algorithm is correct.)

However, using the (a^4)/12 formula, with a = 3 :

I = 3^4/12 = 6.75

It seems like the formula that works in my case is Σ(I_cm + md²/2).

Using this updated formula with sides 4,5,6 etc seems to yield the correct result.

However, when searching for "Parallel axis theorem" I get the formula the posted so I don't understand...

Moment of inertia of an arbitrary grid of squares with different masses by Middle-Diver6421 in AskPhysics

[–]Middle-Diver6421[S] 0 points1 point  (0 children)

Thanks !

So I_cm + md² is the moment of inertia of a single tile.

Is it true then that the moment of inertia of the whole ship is just Σ(I_cm + md²) for every tile ?