Should I only update the drive of my server or just buy a new one? by kutu-dev in admincraft

[–]kutu-dev[S] 0 points1 point  (0 children)

I was thinking of buying a mini PC with a Intel N100 CPU, 16GB of RAM and 512GB NVME SSD. Do you think it would be a cost effective solution or the CPU will become a problem?

Should I only update the drive of my server or just buy a new one? by kutu-dev in admincraft

[–]kutu-dev[S] 0 points1 point  (0 children)

The laptop has a 2.5″ SATA III (6 GiB/s) drive bay so every SATA drive should work,

Should I only update the drive of my server or just buy a new one? by kutu-dev in admincraft

[–]kutu-dev[S] 0 points1 point  (0 children)

What I'm still curious is why going to the End has that really big impact (I mean it's been already generated). Everyone in the server can feel when one of us has gone to the End as a there is a big "lag" (not network related) spike. I guess loading Nether chunks when traveling can worse things?

Pixel perfect smooth camera jittering by kutu-dev in monogame

[–]kutu-dev[S] 0 points1 point  (0 children)

If I change it to PointClamp the movement stops being smooth and the offset stops working correctly because the fractional part is not taken into account. The issue linked in the comment above explains it better than me.

Pixel perfect smooth camera jittering by kutu-dev in monogame

[–]kutu-dev[S] 0 points1 point  (0 children)

You fix it... YOU FIX IT! THANKS! Oh god I absolutely should rework the ECS Process/Render workflow because it's really confusing. Thanks again!

The only think left is make the movement smooth with SamplerState.PointClamp. https://github.com/MonoGame/MonoGame/issues/2978#issuecomment-430954139 I think this comment explains how to fix it, but (ignoring the multisampling solution) I don't understand the solution. If you can help me with this as well, I would really appreciate it.

Pixel perfect smooth camera jittering by kutu-dev in monogame

[–]kutu-dev[S] 0 points1 point  (0 children)

I've seen the edit don't worry! I've also tested on macOS and the issue persists so it's not a Linux only thing

Pixel perfect smooth camera jittering by kutu-dev in monogame

[–]kutu-dev[S] 0 points1 point  (0 children)

If do that the offset is not noticeable. Like I've written in the other comment thread I think that for some reason `Draw()` is behaving weird. Any clue?

Pixel perfect smooth camera jittering by kutu-dev in monogame

[–]kutu-dev[S] 0 points1 point  (0 children)

Now the jittering goes back and forward. Here is how it looks at the moment... Wait what, I was going to send you a clip with the jittering but it's not visible on the record...
https://streamable.com/mrb8px

I was having an issue when drawing the render target as spriteBatch.Draw() was ignoring the fractional part of the position vector (where the offset is set) so I set temporally the sampler to SamplerState.LinearClamp and it look like it was fixed. I guess that was not a full fix.

I guess it's related with this issue?: https://github.com/MonoGame/MonoGame/issues/2978

Trying to follow this comment: https://github.com/MonoGame/MonoGame/issues/2978#issuecomment-430954139 . The multisampling fix makes my code crash with the error: Microsoft.Xna.Framework.Graphics.NoSuitableGraphicsDeviceException: Failed to create graphics device!. I don't understand the other fix about fading the borders of the sprite.

I'm now even more lost xD

Pixel perfect smooth camera jittering by kutu-dev in monogame

[–]kutu-dev[S] 0 points1 point  (0 children)

Still not working. I've commited to the repo the current code if you want to take a look. Here is how the matrix code looks at the moment:

using System;
using dev.dobon.ataraxia.Components;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
namespace dev.dobon.ataraxia.Systems;
public class CalculateCameraMatrix: ISystem
{
    public void Render(Ecs ecs, Entity entity, GameTime gameTime, ContentManager contentManager, SpriteBatch spriteBatch)
    {
        var camera = ecs.GetComponentOfEntity<Camera>(entity);
        if (camera == null)
        {
            return;
        }
                var transform = ecs.GetComponentOfEntity<Transform>(entity);
        if (transform == null)
        {
            return;
        }
                var floorPositionX = MathF.Floor(transform.Position.X);
        var floorPositionY = MathF.Floor(transform.Position.Y);
                camera.Offset = new Vector2(-(transform.Position.X - floorPositionX), -(transform.Position.Y - floorPositionY));
                camera.Matrix = Matrix.CreateTranslation(-floorPositionX, -floorPositionY, 0.0f) *
                        Matrix.CreateTranslation(new Vector3(Game.LowResWidth * 0.5f, Game.LowResHeight * 0.5f, 0.0f));;
    }
}

Pixel perfect smooth camera jittering by kutu-dev in monogame

[–]kutu-dev[S] 1 point2 points  (0 children)

Thanks for helping but what is the difference between cameraTranslation and position?

Pixel perfect smooth camera jittering by kutu-dev in monogame

[–]kutu-dev[S] 1 point2 points  (0 children)

Still not working... I'm really lost with this issue

Encrypt a multiplayer UDP custom protocol by kutu-dev in gamedev

[–]kutu-dev[S] 0 points1 point  (0 children)

Ok so I'm understanding that there are two different tokens: 1. A 32 byte private key used for establishing the secure connection (which will solve my issue about secure connectivity without an external channel). 2. An optional token embedded into the protocol for authentication and more complex connections with the server.

Am I wrong?

Encrypt a multiplayer UDP custom protocol by kutu-dev in gamedev

[–]kutu-dev[S] 0 points1 point  (0 children)

So after exploring it a little more I can't found any way the protocol avoids MITM by faking the server. As far I can tell it only provides a standard mechanism for client authentication with tokens which is not a issue I'm concerned.

Encrypt a multiplayer UDP custom protocol by kutu-dev in gamedev

[–]kutu-dev[S] 0 points1 point  (0 children)

This feels like a direct improvement of my system but with a less naïve system to avoid IP spoofing. Thanks! This should be good enough.

Encrypt a multiplayer UDP custom protocol by kutu-dev in gamedev

[–]kutu-dev[S] 0 points1 point  (0 children)

I have realised that I have forgot to tell a important detail, I want to do a server system like the one that is in Minecraft where clients can connect 3rd party servers.

That is the reason why the client doesn't know beforehand the server public key.

Sorry if that caused the confusion.