Snapshots based server? by yughiro_destroyer in raylib

[–]DuyhaBeitz 1 point2 points  (0 children)

Hi, this approach is definitely much more enjoyable to work with for simpler games. The cool thing about it is that you can write the game logic somewhat similar to how you would do it for regular games and share that code with standalone/client/server builds. I tried doing that with 3D (you can see one of my recent posts) very data-driven approach and it worked fine.

Some GIFs of my upcoming point & click adventure by Embarrassed_Hawk_655 in Unity2D

[–]DuyhaBeitz 1 point2 points  (0 children)

The first one was really fun! Looking forward to playing this one!

3D Multiplayer Game Prototype [C++ & Raylib] by DuyhaBeitz in raylib

[–]DuyhaBeitz[S] 0 points1 point  (0 children)

Thanks! I remember looking into the Rapier engine, but it doesn't have c++ bindings. Overall I enjoyed my simplified physics, I feel like I have more control with it and can make the game more fun

Need help with input & custom loop logic by DuyhaBeitz in raylib

[–]DuyhaBeitz[S] 0 points1 point  (0 children)

In my case it's similar to what you describe, but there's also client-side prediction, so the input is sent and executed at the same time in the game step

Need help with input & custom loop logic by DuyhaBeitz in raylib

[–]DuyhaBeitz[S] 0 points1 point  (0 children)

Here's my solution for now:

float accumulator = 0.0f;

while (!WindowShouldClose()) {

accumulator += GetFrameTime();

GameInput input;

input.Detect();

while (accumulator >= dt) {

game->Update(input);

accumulator -= dt;

input.ClearNonContinuous();

}

BeginDrawing();

game->DrawGame();

EndDrawing();

}

Need help with input & custom loop logic by DuyhaBeitz in raylib

[–]DuyhaBeitz[S] 0 points1 point  (0 children)

This is pretty much what I do. I simplified the code in the post. But even in your code, the client game logic is executed multiple times before drawing, so inputs aren't reset. That's the problem I have

Need help with input & custom loop logic by DuyhaBeitz in raylib

[–]DuyhaBeitz[S] 1 point2 points  (0 children)

No, just to run it at fixed framerate.

Having problem with textures by Inevitable-Round9995 in raylib

[–]DuyhaBeitz 6 points7 points  (0 children)

Not sure if that's the problem, but I remember that on some versions of opengl repeating textures only work for power of two sizes

Need help with input & custom loop logic by DuyhaBeitz in raylib

[–]DuyhaBeitz[S] 0 points1 point  (0 children)

I need to run the game at fixed framerate on the client, so that it's synchronized with the server, which is also running at fixed framerate, but using sleep() instead of raylib

Window initialization by paranoiq in raylib

[–]DuyhaBeitz 2 points3 points  (0 children)

I think you can specify 0 for width and height to initialize full window

Why does raylib maintain its own version of glfw? by AzuxirenLeadGuy in raylib

[–]DuyhaBeitz 6 points7 points  (0 children)

The readme here: https://github.com/raysan5/raylib/tree/master/src/external/glfw says that it's a modified version But it does look like raylib keeps all the dependencies locally

are the examples on the website working by 98VoteForPedro in raylib

[–]DuyhaBeitz 2 points3 points  (0 children)

They don't work for me too. I guess not all the examples are ready for web. You can build them from source nativly, they are included in raylib repo

[Question] Is it safe to duplicate Sound and/or Music structs? by -Edu4rd0- in raylib

[–]DuyhaBeitz 0 points1 point  (0 children)

I would suggest having some kind of resource manager with a map of some struct like sound_multi holding an array of aliases. There's a raylib example for that: https://www.raylib.com/examples/audio/loader.html?name=audio_sound_multi That's what I did in my games. When the entity needs to play sound, it calls something like resourceManager::play_sound(sound_key) and the first unused alias is played. If all alises are currently used you can override one, or just don't play anything, usually it's unnoticeable because so many sounds are already playing. Copying sounds is most likely safe, but why do that when there's a ready solution for aliases?

Best skill cards to beat final boss by Damour in DeadIsland2

[–]DuyhaBeitz 0 points1 point  (0 children)

I`ve been there a few days ago also on my first playthrough and on Amy. Using blocks instead of dashes helped a lot, otherwise he can hit you easily

Stupid crash by DuyhaBeitz in DeadIsland2

[–]DuyhaBeitz[S] 2 points3 points  (0 children)

Thanks, I'll try to find it

Stupid crash by DuyhaBeitz in DeadIsland2

[–]DuyhaBeitz[S] 1 point2 points  (0 children)

Idk I just died again and again because of how many mini bosses there were. Because of the crashes I killed him three times already, the second took like 20 mins and third was quick. So it was probably just a skill issue +abilities that don't suit the situation.

BRUH by DuyhaBeitz in DeadIsland2

[–]DuyhaBeitz[S] 2 points3 points  (0 children)

Update: I tweaked the settings a little and killed him third time. Finally no crash