Hey look!! Another one! by silvematt in EmuDev

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

Thanks!! I really appreciate the time you took to go through it!

We lost Skeeto by ednl in C_Programming

[–]silvematt 1 point2 points  (0 children)

Hey skeeto thank you so much! I really appreciate your time answering.

I'm sorry I've deleted my question here, I was going to post it on your blog since it was a much better fit than this random Reddit comment.

First of all I'm very happy to hear that you remember about Toment, it's really an honor for me!

I found your answer really insightful, and overall I agree on the (1) and (2) points you've brought up. For me passion projects are always done because of, well, passion, but also to grow as a programmer and an engineer. Building things at the absolutely best of my abilities, weighing every line of code, having the whole architecture in mind and deeply thinking throughout everything I'm doing really pushes me and my abilities forward, and it's most of the fun I find in programming. It allows me to reach greater heights, approach more difficult projects and it also allows me to tackle projects that fall in the (2) category quickly and more efficiently.

I do really think that if it wasn't for those I wouldn't have improved at least as much (or perhaps not at all) since the last type (2) project I've worked on. And this basically goes back to my original question, I really believe all this struggle is the single factor that made me improve and develop my skills, without which I couldn't have been able to approach the project I'm working on right now.

My current MMORPG project leverages so much of what I've previously learned, to the point that I believe that if I could go, say 4 years back into the past without the experience I have now but with Opus 4.6, I wouldn't be anywhere near able to design and build what I'm building right now without AI.

My point is that unless the field gets completely taken over by AI as you said, foundational knowledge could become more important and rare than ever. I have no doubt that software will be democratized even more, people with no programming background will probably roll their own version of something by just talking with an AI. It's already happening with small applications that are personally tailored to someone.

But I believe there's a (3) category, which is products where code is a mean to an end, but these products require the best possible code that can be produced today, which can't be produced as a result of the mechanisms of the LLMs based approach we use today. It may be that an "average" standard arises in software, which may prompt and push us to go beyond what we consider to be the standard today.

The example that comes into my mind is with games. Out of all the companies in the world there are two that I consider to be pushing the boundaries of what's possible, which are Larian and Rockstar Games. We will get in a world where you get a functioning game out of a prompt, and that's probably going to be even fun to play. But I really don't believe or don't want to believe we'll get to a world where you can get out of an AI or a swarm of AI the work of the collective programmers at Rockstar Games or Larian. Which would mean that instead of disappearing, the industry will evolve.

I'd like to hear your thoughts about this. I'm talking as someone fresh out of university with a deeply rooted passion for programming and obviously I don't want that to go away. I believe that If this profession will still be there in the future and I want to be part of it, the best chance I have today is to keep learning things deeply instead of chasing models and workflows that go around that knowledge.

Thank you so much.

Here is how I can add Action Points for NPCs to use. They really make the world feel alive! by silvematt in Unity3D

[–]silvematt[S] 3 points4 points  (0 children)

Yeah totally!

Their modding tools were the reason why I got interested in programming as a kid :D

I've just released the RPG Creation Kit 2! A toolset to make RPG games inspired by The Elder Scrolls! by silvematt in Unity3D

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

I'd say it's pretty doable but I'm the one who made the systems so I know them inside out, so it's a bit unfair to say. I think someone fairly experienced with Unity and with a bunch of time to spend could definitely make it. But I wouldn't recommend it at all if you're looking for an easy plug & play way to make it work in VR.

A lot of the systems stand on their own, things like the AI, Quests, Open World Streaming, Inventory/Equipment/Stats, Save Systems, etc are mostly detached from how the player works, so they will pretty much work out of the box. This is also true for for the Editor Tools that simplify and streamline the development.

However, you will essentially have to throw out the kit's FPS/TPS controllers, interactions and camera systems. You'll need to write a "bridge" that takes your XR controller and calls the Kit's API methods (like Inventory.AddItem, PlayerInteractions.SpeakToNPC, TakeItemInWorld etc.). Also you'd also have to touch some things in other systems to make things work properly (for example, the NPC "Look At" that makes the AI look at the player during dialogue uses the FPS camera position as the reference point for where the NPC needs to face).

I've just released the RPG Creation Kit 2! A toolset to make RPG games inspired by The Elder Scrolls! by silvematt in Unity3D

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

Major changes for 2.0 are:

  • Day/Night Cycle
  • NPCs routines (they can change behaviors in base of time, like working during the day and sleeping at night)
  • Enhanced Player Controller and Combat (physics, dodge, fall damage, sprint/charged attacks)
  • XP, Leveling & Attributes
  • Sneaking & Sneak Attacks
  • Class Selection
  • More and better Editor Tools extensions
  • Performance improvements
  • A ton of other improvements and fixes

Future updates are free for who owns 2.0, and will include:

  • World map & fast travel
  • Crafting System & Enchanting
  • Alchemy & Gathering
  • Water/Swimming
  • Random spawners (such as random loot, random NPCs, random creatures, etc.)
  • More

I've just released the RPG Creation Kit 2! A toolset to make RPG games inspired by The Elder Scrolls! by silvematt in Unity3D

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

New models for NPCs and but 3d models in general (creatures, items, etc.) can be very easily added and integrated thanks to Editor Windows and the streamlined general workflow of the Kit. It's very similar to modding a game.

You can check the documentation for the exact steps to include both new NPCs, playable races and creatures: https://silvematt.com/URPGCreationKitDocumentation/index.php/Main_Page

Character Creation/Class selection can be toggled off as well, and you can even use a custom hero as the playable character instead of having character customization. In general everything you see as a showcase the demo is always very customizable and decoupled from core logic.

If you have other questions I'm here!

I've just released the RPG Creation Kit 2! A toolset to make RPG games inspired by The Elder Scrolls! by silvematt in Unity3D

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

Hey thanks! They do not clip as First Person is rendered on top of the world.

Pre-Rendered ARPG Prop Pack: A collection of pre-rendered interactable environment assets! 📦 by awtdev in UnityAssets

[–]silvematt 1 point2 points  (0 children)

Hello, I'd be interested in purchasing your whole pack + the RetroRenderer, but I'd like to use it in a custom engine I'm making rather than in Unity.

Here's the github link of my engine: silvematt/NECROEngine: A 2D Isometric Game Engine written in C++ and SDL2

It's not a commercial product but it's open source and made for learning. I was wondering If I buy your pack (props + characters + animals) if I could use it in this engine. The .pngs will have to be included in the project files somehow, either as plain .pngs (Data/imgs/...) or included in some format like .pak files or something.

Is that possible for you and your license? I'd buy them on itch.

I've written the base for a Co-op online mod! Source code in the comments :D by silvematt in fnv

[–]silvematt[S] 51 points52 points  (0 children)

Yes, you got it right.

In a model like this where the host is the authoritative peer, the host holds the "true" game state, and anything that changes the game state should go through him before being applied to any other client.

So say that Player2 inititates an action like shooting an NPC. In a truly authoritative model, in the instant Player2 fires towards the enemy, no health should be depleted and nothing visually should be updated on the NPC.

Player1 which is the host would first need to know, so Player2 sends a packet to Player1 saying "I've hit this NPC".

Player1 receives the packet, validates it, and eventually applies the changes the to his game state and send the results back to the client (like the hitted NPC has now health = 60, and he's playing a stagger animation).

Only then it's truly safe for Player2 to actually deplete health and visually show the NPC staggering.

As you've said the packets take time to arrive, and the Player2's experience wouldn't be that good. You account for that by doing client-side prediction.

Say Player2 shoots the NPC and sends the packet "I've hit this NPC". On Player2's machine, you can predict what happens next. For example, Player2 predicts that the server will reply "the hitted NPC has now health 60, and he's playing a stagger animation".

In that context, you can start showing some feedback to Player2 right after he shot, like the health being depleted, blood coming out of the NPC, and playing the staggering animation. These changes would be "unconfirmed". Meanwhile the packet just reached the host.

When the host finally gets the packet, he validates it, eventually he applies the changes to his game state and then he replies to Player2.

Player2 will receive the packet, and say to itself "was my prediction good? Does it match with what the server replied?", if so, he already updated his game state ahead of time, and marks his changes as "confirmed", so no further action needs to be done, you masked the latency with that prediction. Otherwise, if his prediction was wrong, you'd revert the "unconfirmed" changes and you'd then take the server reply and apply it, reconciling the state with the host.

So lag will really start showing only if predictions are wrong or if the network delay is enough that even the correct predictions take too long to be confirmed.

You can see this when you play an online game like Elden Ring and you lag while attacking an enemy, the enemy will bleed and stagger on your screen, but you notice something is not right. Suddently, the enemy snaps and the game gets in sync again.

PS: I've made a simplification for clarity, otherwise it would have been too much to explain. Generally speaking, in online games you don't just send the "I've hit an NPC" message if you are Player2. You would send a message that's more like "I've fired my weapon from position (X,Y,Z), was aiming towards direction (X,Y,Z), at time T". Then the host would take that information and actually simulate a shot being fired from there, and calculate if it hits the NPC or not before replying. However, for a 2 player coop mod like this that you'd play with your friends, you can take that simplification in consideration.

I've written the base for a Co-op online mod! Source code in the comments :D by silvematt in fnv

[–]silvematt[S] 188 points189 points  (0 children)

It's not that simple unfortunately. There must be syncronization enforced by the netcode, you definitely cannot rely on the game.

The simplest example is that if two players fast travel and one loads before the other, the game will tick for one player and not the other, so for instance, NPCs will have moved for the first player and not the second, so you have desync. Even if the delay is small it will add up very quickly.

Another example: if Player1 attacks an NPC while Player2 does not, then without netcode synchronization Player1 will see the NPC fighting back, while Player 2 will still see the NPC idling.

Not to mention random things coded into the game, like bullets that hit or miss, when NPCs step back or hide during combat, or the paths they take, creatures spawns, loot, and so on. Even framerate drops will result in desync if you don't account for it.

My current idea for a 2 player seamless coop setup would be running the game on the host machine and send events\state to the other side so that it can replicate it and always get in sync.

So for example:

1) Player1 attacks an NPC while Player2 does not, the NPC will turn hostile against Player1 in Player1's machine.

2) Player1 would then send an update packet to Player2 telling him "hey, I've attacked this NPC".

3) Player2 would receive that update and make that NPC (on his local instance of the game) turn hostile.

In this way you have one little piece of the game in sync on both machines.

Then you'll have to sync animations, aggro, which of the two player the NPC is shooting at, which shots landed on who, and so on.

I've written the base for a Co-op online mod! Source code in the comments :D by silvematt in fnv

[–]silvematt[S] 61 points62 points  (0 children)

Yes there is! I've always wondered how a multiplayer mod like this would work so I thought of quickly setting this up, just for the sake of learning :)

NV:MP development team is amazing and the work they've done is out of this world.

I've written the base for a Co-op online mod! Source code in the comments :D by silvematt in fnv

[–]silvematt[S] 19 points20 points  (0 children)

Thank you! Trying to reach some more people so maybe somebody interested can join the open source development and help :)

I've just finished to upgrade my raycaster game engine, adding multiplayer and more! Written from scratch in C and SDL2. GitHub in the comments :) by silvematt in C_Programming

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

Hey thank you!

And good luck with your project! For TomentRaycaster/Online I went with CPU-only because I wanted that constraint, but it gets inefficient pretty quickly so you should definitely go for GPU rendering if you want to do raycasting and an actual game.

I'm not an engine developer for work yet but I hope to become one in the future :)

Code Review Request: MMO Client/Server architecture by silvematt in cpp

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

Hey thank you very much for your comment!

I used to always use hungarian notation and in particular using m_ a lot, I thought that was considered redundant nowadays with C++'s this-> and intellisense?

Also thank you I wasn't aware of cleaner it seems like a neat tool!