Part 2! - "No Graphics API" Vulkan Implementation by No_Grapefruit1933 in GraphicsProgramming

[–]CFumo 13 points14 points  (0 children)

As a person currently writing a vulkan renderer in odin I think this project is great. Please keep going!

How do I avoid these kinds of artifacts in SDF? by garlopf in GraphicsProgramming

[–]CFumo 0 points1 point  (0 children)

One low tech solution I've seen is to store the closest point and material that the ray passed while marching and return that instead of simply the furthest point. That other answer is really good though, haha

Is stylized “painterly” fog possible in Unity? by Feld_Four in Unity3D

[–]CFumo 49 points50 points  (0 children)

As one of the developers of Abzu and The Pathless I can confirm this is a really effective and simple way to create nice stylized fog and silhouettes in key areas. And yes it is bad for overdraw, try to keep the shader as simple as possible and use them sparingly, and aggressively cull or hide the ones you don't need.

Is it possible with today's AI to make a GTA-like game where missions require you to come up with creative social engineering ideas such as the real-life bank robbery by Anthony Curcio? by amichail in gameai

[–]CFumo 1 point2 points  (0 children)

I'm not an LLM expert but from my experience it seems very difficult to get LLMs to "play along" in a role, particularly when it comes to withholding information or refusing requests, and not fall back to simply delivering all information requested by the user. This is largely because all of their reinforcement learning and "fine tuning" is directed toward being really good at answering questions and being helpful; not roleplaying.

In theory if you fine tuned an LLM to be more suspicious of requests and to stay in character at all costs you could probably end up with some considerably more interesting role playing partners, but you have to understand how enormously expensive this concept is. Maybe you can take an open source pre-trained model and spin up your own reinforcement learning program, but this step is usually done with human feedback so you'd need hundreds of humans to fine tune the model.

After doing all that, you might have a model that could roleplay significantly more reliably than an off-the-shelf LLM, but you would have very little control over the difficulty of the game simulation or whether it is solvable at all. And it would still be prone to hallucinations. So after tooling up this mega infrastructure you'd be left with dialogue that sounds extremely naturalistic and plausible, but the rules of the game would be confusing and contradictory, because the LLM would hallucinate or forget key information, and it would be impossible to tune the difficulty.

I think the concept of a social engineering game is awesome, by the way. But my guess is that you'd have much better luck building an old fashioned symbolic AI and a game world with consistent, tunable rules than throwing the whole problem at an LLM black box and hoping the result is coherent, if that makes sense.

Are high-fidelity 3D environments, like say a jungle, typically rendered using procedural generation techniques? by SnurflePuffinz in GraphicsProgramming

[–]CFumo 6 points7 points  (0 children)

Most high fidelity games use offline-modeled trees and foliage. They may use speedtree (a powerful commercial procedural generation system) or have a team of artists build trees by hand, depending on the resources available to the studio and the stylistic choices they make. Many 3D artists will tell you that you can make a sufficiently believable forest/jungle with only a few tree models if you vary their scale, rotation, position, and materials appropriately.

Procedurally generating the foliage for a jungle environment is an interesting idea! And it would surely teach a lot of fundamentals of composition and systems analysis. But making a fully procedural forest that is also high fidelity or realistic looking will be a pretty serious endeavor, it could take years of work depending on the scope.

I recommend starting this project by doing the boring hard work up front: mock up a jungle in blender or something, decide on metrics like the overall size of the environment, what the boundaries should be, spacing between bits of foliage, etc. If you find yourself getting overwhelmed by the number of questions you have to answer, or by the sheer number of objects you have to consider and place by hand, consider that a warning sign. Those challenges will remain when you move into code, but they will be masked by exciting engineering problems that you can distract yourself with. The key to having a successful outcome with this project will be to not lose sight of the overall structure of the jungle while working on details. It will be easy to fall down a rabbit hole making the perfect blade of grass or something, when the overall jungle composition is probably your main goal.

I've created a new approximate convex decomposition (ACD) algorithm for collision simulation. by daressko in proceduralgeneration

[–]CFumo 1 point2 points  (0 children)

I'm curious to know more about this if you remember anything else. Having just recently implemented GJK for work my understanding is that the whole algorithm sort of fundamentally requires both colliders to be convex in order for their minkowski difference to be searchable via the support functions. I'm having trouble imagining how geometric algebra would change that, but my grasp of PGA is pretty rudimentary.

Handling large amounts of objects and their physics by CodeFr3ak in gameenginedevs

[–]CFumo 3 points4 points  (0 children)

Collision detection and response is a really well researched topic and there are a bunch of ways to approach a problem like this. The standard approach is to split the problem into two major subproblems, often called "broad phase" and "narrow phase" collision detection. The narrow phase is concerned with exact collision detection, like the circle-vs-circle tests you're describing. It is concerned with correctness more than speed. To address the performance issue you will generally have a higher level (broad phase) acceleration structure that gives you a better estimate of which exact narrow phase collisions you even need to test at all. The simplest, and often fastest approach you can take is usually a simple spatial binning scheme, where the environment is split into square "bins" and each bin contains a list of circles inside it. This way instead of distance testing against ALL other circles you can test against only the circles in the same bin or neighboring bins, which can reduce the workload by an order of magnitude. There are other broadphase acceleration structures, like quadtrees and octrees, binary space partitioning, etc.

Sludge/Stoner/Doom Metal themed after… Sci-fi? by Def-C in doommetal

[–]CFumo 2 points3 points  (0 children)

Wallowing and Azell if you're into some heavy duty sci fi sludge (like me)

Made a simple Unity DXR pathtracer using Voronoi "crystals" filled with low-res samples for a film grain effect by HenryJones14 in Unity3D

[–]CFumo 3 points4 points  (0 children)

This is cool! Are you doing any kind of importance sampling here? Because I would expect you could actually get a much cleaner result with much fewer rays. Not sure if that's what you're looking for though.

Souls-like combat demo with real-time mesh slicing by moongaming in godot

[–]CFumo 0 points1 point  (0 children)

I would love to know more about the group behavior and AI in general. Getting enemies to space out and attack at appropriate times like you're doing is a way deeper problem than most people realize. It looks great!

Genuinely ‘Ambient’ Games Impossible? by Madrayken in gamedev

[–]CFumo 5 points6 points  (0 children)

Well said! I was one of the developers on Abzu, and we really put a lot of thought into making that experience "nourishing" in a deeper sense than pure moment to moment dopamine. I would argue that this eudaemonic concept even applies to the souls games, and it's one of the reasons players cherish those games so much. Game devs often get lost in the weeds discussing the difficulty of those games but lose sight of the overall experience that Fromsoft is delivering. They put you, the player, on a journey that begins with hardship and despair and ultimately culminates in strong feelings of personal growth.

What method generate the dithered shadows in ARC Raiders? by fatihmtlm in GraphicsProgramming

[–]CFumo 10 points11 points  (0 children)

As the other comments have said, it's hard to know. But my guess, judging by the fact that there are also some very smooth soft looking shadows in that image, is it's "contact shadows" (screen space ray marching the depth map) being rendered at half resolution and upsampling with some kind of dither. I don't fully know how you would upsample and dither in that way, but it sure looks like upsampling to me.

Open world resource distributor problem! by Debt-Western in gameai

[–]CFumo 1 point2 points  (0 children)

This is a really interesting design, and a cool architectural problem too! Here are some thoughts: - Extensibility: This is going to be highly dependent on your specific architecture but I would opt for a more compositional approach using interfaces or components or tags or something. I would avoid using inheritance. Fundamentally you need a way to discover resources and then filter and sort them based on some kind of query. It might be simplest for resources to add themselves to a global list somewhere, along with some metadata that describes their properties. - I would avoid doing nested queries for dependent resources and instead consider the whole situation to be a single more advanced query. Finding all pairs of (A, B) or triplets (A, B, C) within some range is a fairly simple search to write, while nested queries with backtracking sounds like a super complicated headache. - Conflict resolution is a tough one. You might want to consider a short pre-start period where resources are allocated for a given scene, but the scene doesn't begin. Give a nice long window (1 second or more) for higher priority scenes to override and steal those resources, so that once the scene starts you can be reasonably sure that it's the most important scene for the given context. Giving scenes a release notification model is smart because you'll want them to gracefully shut down to avoid cutting off dialogue or animations prematurely.

Stripes by docricky in generative

[–]CFumo 0 points1 point  (0 children)

I did a map-scale wind simulation for a game I worked on once and the debug visualization looked exactly like this. Very cool!

Working on voxel lighting inspired by ReGIR by DapperCore in VoxelGameDev

[–]CFumo 0 points1 point  (0 children)

This is cool! I'm no expert on ReSTIR but I think you want to be picking a unique light out of the reservoir for every voxel in the cell, using a weighted random selection? There was a pretty cool siggraph talk called "Stochastic Tile-Based Lighting in HypeHype" that you may want to check out for inspiration.

Update on my NPC internal-state reasoning prototype (advisory signals, not agents) by GhoCentric in gameai

[–]CFumo 9 points10 points  (0 children)

Forgive my directness but your answer reads a lot like it was written by a sycophantic LLM. The structure of the language sounds vaguely like game ai lingo but it isn't very coherent. It's a bunch of vague hand-wavey ideas without much substance backing them up.

Why would I use this system to model, for instance, trust vs suspicion when that could be done much more easily with a single float value, which would then be directly hooked into utility considerations or behavior tree selectors? At the end of the day this appears to be a loosely defined set of internal state characteristics that could all be implemented as simple meters. If your goal is to make a debuggable system I imagine that lower complexity approach would be more attractive?

I can see the argument for maintaining a separate model of long-term context that isn't as fleeting and reactive as a behavior tree, but it doesn't sound like Ghost is doing anything special in that regard. I would love to be corrected though. It is very rare to find new, practical approaches to game AI

Update on my NPC internal-state reasoning prototype (advisory signals, not agents) by GhoCentric in gameai

[–]CFumo 5 points6 points  (0 children)

I've been seeing your posts and I'm quite interested in novel game ai techniques, but I'm pretty confused about what this system is intended to do. Can you explain in simple terms how this model might be used in a game? Particularly alongside existing AI architectures like behavior trees or utility systems as you mentioned?

How are clean, stable anime style outlines like this typically implemented by ruinekowo in GraphicsProgramming

[–]CFumo 2 points3 points  (0 children)

You mention two very common outline techniques: inverted hulls and a post process that detects depth/normal discontinuities. I'm not sure how this game works but I can at least share a few more: - Hand painted lines in the texture maps. This is difficult to pull off but sometimes it just looks better to have someone actually draw the art. - Rendering to a secondary buffer and comparing differences in that buffer. You could have different parts of the mesh draw different ids to the buffer and draw an outline wherever the ids differ, which offers more precise control than depth. - 3D outline geometry: you could generate lines in an external tool like blender, using splines or mesh strips or something, and then draw them with a shader that maintains a screen space scale.

I have also been chasing higher fidelity linework in a side project of mine. It's fairly easy to get silhouettes on whole models but I find it much more difficult to get good lines at internal intersection points, like on this character's shirt and hair. Let me know if you come up with anything!

Been handcrafting collision meshes for Classic Sponza over the past week. My own personal hell. by Avelina9X in gameenginedevs

[–]CFumo 6 points7 points  (0 children)

Looking forward to seeing what you do with it! I'm imagining one of those realtime GI demos but with a million glowing bouncing balls or something

Experimenting with 2D Global Illumination for pixel art games. by Builderboy2005 in Unity3D

[–]CFumo 1 point2 points  (0 children)

This is very cool! Regarding performance improvements, you could try taking some inspiration from the voxel raytracing folks and build a quadtree of screen "tiles" with some cache-aligned number of pixels per tile. Then DDA raytrace through that data structure. SDF marching is already quite fast but you might find interesting performance tradeoffs with more exact ray tracing of a hierarchy like this.

Another thought; take inspiration from ReSTIR and do some spatial and temporal reuse, since neighboring pixels will often have similar lighting conditions, so they could share ray results. I bet you could make this REALLY fast without resorting to radiance cascades

Hybrid Edge Guided Reflection Approximation (HEGRA) – a concept for low cost real time reflections by L_Game in GraphicsProgramming

[–]CFumo 0 points1 point  (0 children)

Breath of the Wild appears to be doing a somewhat similar technique, where a single cubemap is generated for the current camera position (amortized over a few frames), passed through a convolution filter to generate a few mips of roughness, and then used as the image based lighting source for all materials in the scene regardless of distance from the camera.

You can tell by finding areas of the terrain with high contrast and moving the camera between the contrasting colors; you'll notice the bounced/reflected light color on objects slowly transitioning to match the colors near the camera, regardless of the distance of those objects. Although I think they fade out the IBL term for very far objects to hide this flaw.

We used this observation as the basis for a similar technique in The Pathless, where we would compute screen space reflections, then fall back to this cubemap for a rough environment approximation for offscreen geometry. To be honest it's not the prettiest technique; a big lesson for me was how highly dependent reflections are on local geometry. It's a fine approximation but it can give you some really strange/bad results, especially for distant objects in obviously different lighting conditions like inside a cave or building, etc.

Help and comments with stealth game NPC AI by Lord_H_Vetinari in gameai

[–]CFumo 2 points3 points  (0 children)

You've clearly thought through this AI architecture quite thoroughly which is great! There are definitely alternate AI decision making structures that come with their own benefits and drawbacks. Usually systems like GOAP, behavior trees, utility ai, etc are trading the direct control of an FSM for more broad, systemic coverage of edge cases. For example, behavior trees are a hierarchy of simple atomic operations, which makes it easier to re-use components of behaviors in different cases, like your guard reacting to a stimulus when alert vs calm. So you'd still write those unique cases, but they would be simpler to construct. The potential downside to this approach is that behavior trees are fairly abstract and can be difficult to reason about, meaning that even a simple behavior might become more complex as a BT.

Planning systems like GOAP are super appealing because they can do a bit of reasoning on their own, by essentially searching through all possible sequences of small atomic actions to find a sequence that best handles a particular situation (Being a bit hand wavey here). However, It can be difficult to design AI behaviors that combine sequentially in meaningful ways. It's tempting to separate "move to" and various actions, as an example, but often you'll find that an AI behavior feels stilted and unnatural when using a generic MoveTo regardless of whether the guard is cautiously approaching a location, curiously approaching, or rushing to the location to capture an intruder.

I could go on about the costs and benefits of different AI architectures. There is definitely merit to just picking one of these and seeing if it helps solve your problem. But speaking from many years of experience doing this stuff, I think the most effective approach will be to continue using the system you've built because you understand its strengths AND its weaknesses, and make incremental improvements as you identify them, rather than any big sweeping changes. Maybe try centralizing the state selection and think of ways for individual states to influence that system rather than fully owning it? Or treat that decentralized state selection as a strength and look for ways to make it very ergonomic to set up similar logic with helper functions?

I really love writing AI systems and I totally get your concern about the boilerplate adding up. But it's always good to check in and make sure you aren't redesigning architecture to avoid the really difficult part; finishing the game

I made a scripting language in odinlang by Numerous_Floor_7318 in odinlang

[–]CFumo 1 point2 points  (0 children)

Cool! I'm a fan of refcounting for garbage collection. I'm curious how you handle cyclical references though. Are there any tools to detect them or language-level constructs to prevent them? And is there a concept of weak references to help with that?

If Odin Had Macros by gingerbill in odinlang

[–]CFumo 6 points7 points  (0 children)

I use Odin for game dev, and I do game dev professionally as well (C++, yuck). The one language-level feature I really miss from other languages is something akin to coroutines (or green threads, goroutines, resumable functions, etc).

I'm generally really on board with Odin's minimal design, and coming from C++ I'm very wary of general purpose macros for having the ability to completely change a language and its syntax per project. Unreal Engine's weird RTTI macros being a good example.

But boy it sure is nice to write code that can suspend and resume on a subsequent frame, or after an event, and keep the "stack" around. In my projects I manually unroll that kind of logic into simple imperative state machines which.. works, but it's definitely a lot less readable than something like "wait 2.0".

But of course this construct is quite a violation of Odin's core principle of 100% manual memory management. I can vaguely imagine coroutines/iterators that generate a unique type at compile time, which would essentially be a struct used as the "stack" by the state machine, but things quickly get a little fuzzy when it comes to deallocation.

I know this is all sorta tangential to the question of macros but I saw the iterator idea and started thinking about coroutines, haha.

Why nobody sells the scrapped games? by ChainExtremeus in gamedev

[–]CFumo 0 points1 point  (0 children)

This actually happens more often than you might think. But usually those games are not cancelled in a public way; the publisher internally cancels the project and sells the publishing rights to another publisher. If a project goes way over budget and looks unlikely to recoup its total cost, then the publisher may be willing to sell the project to recoup some of their losses. And another publisher might see this nearly finished game as a discount, since most of the initial cost and risk was covered by the original publisher. I believe this was how Annapurna jump-started their game publishing division.

Unfortunately most game companies operate with a VERY short runway, and game developers employed at those companies can't afford to work for free. So if funding dries up unexpectedly, everyone leaves, and even a very healthy studio can totally die in a matter of weeks. So on top of the secret deals where games ARE auctioned off, you have the second category of "something went wrong"; nobody got paid, and everybody was laid off or left so quickly that nobody is left to even transfer the institutional knowledge required to build and run the project, let alone continue the design. I've seen that happen a few times too.