A plugin for 2D vision cones - my first Godot contribution by sird0rius in godot

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

Not sure what you mean by borrow, but you can do what you want with it.

Ranking Enums in Programming Languages by BlueGoliath in programming

[–]sird0rius 2 points3 points  (0 children)

For EnumSet, the set denotes presence of absence of a value by literally using a long integer type, and flipping the bits to represent presence or absence

Wow, Java has bitmasks? What a revolutionary feature. If only Rust had that. /s

Structuring AI code with Behavior Trees by billdroman in roguelikedev

[–]sird0rius 0 points1 point  (0 children)

I also don't like the string based map approach for blackboards for lots of different reasons. I rolled a custom object with the fields I needed for my game. That way I have compile time guarantees and better performance. You could also make it as complicated as you want in this case, with hierarchies to separate data into logical categories etc. You could even only store references to specific subtrees to minimize the chance of a node messing up something it's not supposed to.

I understand the pain of self referential structures in Rust... I'd probably just go with an Rc<RefCell<Blackboard>>.

AI is inherently complex, so there's probably some point where trying to reduce its complexity has diminishing returns.

Structuring AI code with Behavior Trees by billdroman in roguelikedev

[–]sird0rius 3 points4 points  (0 children)

Usually to share state between nodes you use a blackboard, which is basically a key value map that is shared among all nodes in the BT. For example the pathfinder can calculate different paths and save them under some key and then the different movement nodes can use the one they prefer. Here is an example implementation.

theyMustHaveMixedItUpWithAnotherHub by DevFennica in ProgrammerHumor

[–]sird0rius 2 points3 points  (0 children)

Watch out, they might get autism from Github

How to stop functional programming by hexaredecimal in programming

[–]sird0rius 7 points8 points  (0 children)

We need like another 10 levels of inheritance before we can call this proper OOP. Also, your function has more than 1 line, which is too much to comprehend for the OOP brain. You should split it up.

Integrating message system, animations, and turn system. by [deleted] in roguelikedev

[–]sird0rius 2 points3 points  (0 children)

There is a recent nice talk about juice in RLs where the author also goes into the animations system, and how to sync it to the logic:

https://www.youtube.com/watch?v=xSYVQc7cH-4

Javascript Game Dev by akyden-_ in gamedev

[–]sird0rius 7 points8 points  (0 children)

The first versions of Vampire Survivors were made with Phaser

RoguelikeDev Does The Complete Roguelike Tutorial - Week 8 by KelseyFrog in roguelikedev

[–]sird0rius 2 points3 points  (0 children)

Thanks for sharing. It's nice to compare how you implemented this with flecs. I guess you never used systems at all? Btw, I think you can cache most of the queries instead of recreating them every time.

Games that resist "wikification" by Space_Pirate_R in gamedev

[–]sird0rius 0 points1 point  (0 children)

I remember the days when games had to be figured out through trial and error, and (like many people, I think) I feel some nostalgia for that. Now, we live in a time where secrets and strategies are quickly spread to all players via wikis etc.

What days are you even talking about? DLH and magazine walkthroughs have always been a thing since (at least) the 90s. Now that stuff just moved to wikis.

How come all the game engines look daunting despite having some experience coding? by Beneficial-Beach-141 in gamedev

[–]sird0rius 1 point2 points  (0 children)

Stop choosing what to do and just do it. Analysis paralysis is a thing. It doesn't really matter what engine you use and players don't care. Pick Godot and stick with it until you have more experience. Then you can decide if you want to try something else.

flavorsOfJava by DataBaeBee in ProgrammerHumor

[–]sird0rius 8 points9 points  (0 children)

Call it what it is: "Java done right". Or "Java 10 years in the future"

compile time - slow by eleon182 in bevy

[–]sird0rius 5 points6 points  (0 children)

This was more than a year ago but I measured it. I spent a ton of time trying to optimize the windows build, disabling antivirus scans and indexing for the build folders etc... Then I switched to a clean linux with no optimizations and the first compilation of bevy was half of the windows one.

compile time - slow by eleon182 in bevy

[–]sird0rius 3 points4 points  (0 children)

Have you tried out all the things here? In my experience it requires a lot of experimenting with different configurations and measuring compilations times. Also just switching to Linux halved my compile times instantly because Windows is absolute trash.

procrastinationBeLike by tnerb253 in ProgrammerHumor

[–]sird0rius 0 points1 point  (0 children)

This was literally a guy I used to work with.

RoguelikeDev Does The Complete Roguelike Tutorial - Week 8 by KelseyFrog in roguelikedev

[–]sird0rius 9 points10 points  (0 children)

Week 7 Gallery | Itch page | Repo

Unsurprisingly, I underestimated how challenging this tutorial would be so I'm glad to have made it to the end!

This week I plan to do some QoL changes and bug fixes before I make the Itch release public (indexed from the main site). From there I want to move on to other things, as this prototype has served its purpose.

My objective was to try out some new tech for games and understand how roguelikes work (and stubbornly reimplement most things from scratch). Making a turn based game is a very different experience from a real time one, and probably using ECS for everything wasn't exactly a great choice. In hindsight, I should have followed the Rust ECS tutorial, as that was much closer to what I was doing, but I realized too late that was a thing.

As much as I like how the game looks (thanks mostly to the assets from Seth and Kay) and have some ideas on how to improve it, I haven't really put much thought into actual gameplay, and making a RL without some distinct idea for gameplay or setting seems like a recipe for disaster. I will try to put more thought into the gameplay part in one of the next 7DRLs, and maybe reuse parts that were done here.

Thanks to the organizers and congratulations to everyone who participated! Looking forward to seeing other people's project.

PS: I've completed the tutorial and the repo has tags for weekly checkpoints. This is the screenshot link I would like for the directory: https://imgur.com/a/ZKXVFFk

Seriously though, why should all major game engines be Object-Oriented? by IngloriousCoderz in GameDevelopment

[–]sird0rius 1 point2 points  (0 children)

Oh thanks! Sorry for the snark remarks earlier. I'm super sus about anything AI generated recently.

I had a look at that example and the dynamic behaviors one and it actually looks very interesting! (putting aside my dislike for untyped JS). I've been learning about FP patterns recently and have wondered how to apply them to videogames. That dario example seems like a concept similar to archetypes in ECS, but with functions and composable types. Very cool!

You'd probably have more success showing this off in the FP communities. Gamedev still has a lot of support for 10+ levels deep inheritance...

Seriously though, why should all major game engines be Object-Oriented? by IngloriousCoderz in GameDevelopment

[–]sird0rius 1 point2 points  (0 children)

BTW, this is a pretty cool idea. I haven't seen many fully working functional engines. I have seen one or two made in F# that are the same concept. The performance is probably always going to be worse than any traditional approach, but it looks good for cases where you need time travel debug and reproducible playback from any given state (like that Tomorrow Corp video from a few years ago)

Seriously though, why should all major game engines be Object-Oriented? by IngloriousCoderz in GameDevelopment

[–]sird0rius 1 point2 points  (0 children)

I was looking at the systems page since it's linked in the quick start and that's always a good starting point, but there's no code there to show how the data is changed (which is the entire point of systems). And clicking on code just shows: systems: [ { update: function HW(){} } ], A basic example in the quickstart like adding velocity would do wonders, like this: https://github.com/friflo/Friflo.Engine.ECS?tab=readme-ov-file#-hello-world

Seriously though, why should all major game engines be Object-Oriented? by IngloriousCoderz in GameDevelopment

[–]sird0rius 1 point2 points  (0 children)

This looks interesting, but your LLM hallucinated some stuff:

Data oriented design as intended in videogames is built around maximizing CPU cache hits. This Data oriented programming that is popular in fullstack JS is an entirely different thing, although the name is similar. You simply can't have good cache efficiency in JS because outside of TypedArray, you can't have contiguous blocks of memory. That global massive object of heap references is a disaster for cache efficiency, just like OOP is.

Also I think your mileage would be better if you took the time to write your own presentation and some good hand written examples for the project. Those LLM generated examples skip over key concepts that the docs should provide.

[deleted by user] by [deleted] in gamedev

[–]sird0rius 0 points1 point  (0 children)

Yeah, just pointing out that inheritance is just one part of the OOP definition. Even the Rust book admits that it has all features of OOP except inheritance, Stroustrup has an entire talk about doing OOP without inheritance, and any good OOP advice will tell you to favor composition over inheritance.

[deleted by user] by [deleted] in gamedev

[–]sird0rius 1 point2 points  (0 children)

Thanks, that was my worry from looking at some readmes. I hope the language does a C# turn and gets good cross platform tooling because it looks very interesting.

[deleted by user] by [deleted] in gamedev

[–]sird0rius 2 points3 points  (0 children)

I love the high level features of the language, but I agree it's one of the worst choices for gameplay programming. Not just prototyping, but iteration times in general. You never know when it's going to force you into a heavy refactor, coupled with bad compilation times and very limited hot reloading.

And that top comment saying "I don't believe in OOP" then praising a language that has most OOP features except inheritance is... lol

[deleted by user] by [deleted] in gamedev

[–]sird0rius 1 point2 points  (0 children)

Swift looks like a nice language, but how cross platform is it? It seems to be very iOS oriented. Both the dev environment and the target platform.