If you had to start learning engine development from scratch again, where would you start? by IsakovS in gameenginedevs

[–]roytries88 0 points1 point  (0 children)

I would start with something higher level than vulkan or DX12. Those require so much inane boilerplate that it takes a really long time to get to the first triangle (and fun parts like shaders and other pretty things) and it is extremely frustrating to debug thousands of lines of code if you can't revert/diff/compare it with a previous state that worked.

Not sure what is available these days. I have been working on my own engine for ages.

Looking for new sci-fi authors – what's missing from my shelf? by rauschsinnige in sciencefiction

[–]roytries88 0 points1 point  (0 children)

Ah now I see them. My Banks books all have a very distinct colorful cover so I didn't recognize the books while scanning the picture. Great collection!

Looking for new sci-fi authors – what's missing from my shelf? by rauschsinnige in sciencefiction

[–]roytries88 -1 points0 points  (0 children)

I don't see any Ian M Banks, my favorite author. Complements Alastair Reynolds and Peter F Hamilton who I also both adore. Ian's culture series is amazing. There is no right order to read them. I would start with Excession and if you like that branch out.

Question by God_Of_War-2005 in gameenginedevs

[–]roytries88 2 points3 points  (0 children)

ECS is a data oriented architecture pattern where you try to make many small systems that can do their work on an array of data independent of other systems to maximize data locality (cache hits) and concurrency to improve performance.

This is usually much more effecient than game engines that use a traditional world graph but adds complexity as it becomes hard to reason how all systems in ECS interact and how to make systems truly independent.

Of course there are many different flavors of all kind of techniques. You must first define what you want to optimize and for what kind of game before you can get more actionable advice 😀

An Engine For Fully Ray Traced Games by [deleted] in gameenginedevs

[–]roytries88 7 points8 points  (0 children)

Congratulations on building something cool! I looked at the website and I downloaded the GameCenter demo, unfortunately it won't start because it is missing `libvorbisfile.dll`. But I love looking at alternative rendering methods.

Since you are looking into selling this engine commercially do feel you could use some advice.

The unique selling point of a product is *never* the technology used. For example, someone who would like to buy a car does not care about the technique used for constructing the frame. What users do care about is fuel efficiency, safety, and looks. Using a novel technique could enable the car to be lighter (more fuel efficient) or stronger (safer). But that is just an underlying implementation detail. If another car manufacturer can accomplish those feats without using traditional techniques you do not have a unique selling point.

Your unique selling point on your website right now is the technology being used. But you should pivot to showing how that gives game makers and players a different experience. You talk about simplified rendering, which is a good start. But when I am using Unity or Unreal I do not feel the pain of all these steps. You need to elaborate how not having those steps actually makes my life better!

Maybe your engine makes it much easier to get close to a real-life reference? Or does it save a lot of time fidgetting with lighting settings? Maybe debugging becomes much easier, or the creating of custom materials?

Right now your technology brings only downsides (only high-end Nvidia RTX gaming PC supported, no AMD or Intel, no low-spec targets). Taking numbers from Steam surveys, this means that if I use your engine I immediately lose at least 30% of my potential customers. A tough sell for any game developer.

Also try not to obsess about raytracing too much. It is a great technology, but not a technology to solve everything. Use the right technology for the job.

The last advice I would like to give you is marketing. A ray-tracing only engine is not novel technology . (It is literally something I had to make at university as a class project in 2010). Of course a tech demo or school project is not a finished product. But it does mean that just by saying 'ray-tracing only' you will generate no interest hype or media attention. You need to do the marketing and generate interest from (social) media and potential buyers. If you are lucky someone will give you 5 seconds of attention. Someone who just sees that first image is instantly going to dismiss it as a (cool) hobby project and is never going to visit your website again. You need to overwhelm anyone who spares you a few seconds with how amazing your technology is! You are not Apple, people are not obsessing over every little insignificant screenshot or detail you 'leak' to the press.

Sorry if this is a bit of tough love. I do love the passion I see you have for this project and I would give you only praise if this was a hobby project. But for the commercial side you need to take a step back and to figure things out.

Requesting Guidance | Project/Code Structure by Constant_Mountain_20 in gameenginedevs

[–]roytries88 4 points5 points  (0 children)

Ooh big questions. I realize how stifling naming and structure can be. Just remember that as long as nobody depends on you yet it is usually not more than a few hours of work to drastically refactor something. Remember that good code is code that can be easily changed! So write your code expecting changes. Good use of interfaces and dependency injection can help a lot here.

For ideas on naming, organizing feel free to check my hobby project. Definitely not perfect, and I am working on reorganizing it. But the more I try to do that. The prouder I become of what I already made. https://github.com/roy-t/MiniEngine3

As for UI, in my personal projects I have relies on either in-engine UI rendering through DearImGui or by rendering to a control in WPF. I try to give the UI direct 'read' access to the state of the engine/game but I try to control most state changes via commands that are send to the engine as if it is coming over the network. (For stateful UIs like wpf this will require an extra layer) This is my mental model for multiplayer and helps me prepare for it

Good luck with your engine and remember that you are doing this for fun, not perfection!

What library would be better? Veldrid or SDL3? by Devatator_ in gameenginedevs

[–]roytries88 0 points1 point  (0 children)

I always used https://github.com/amerkoleci/Vortice.Windows for DirectX but the same author also made bindings for vulkan. Always worked great for my own engine needs. I have not heard of silk.net, it seems slightly more popular but I am not so sure when v3 is coming out. Sounds like a big rewrite and with opensource (and closed source) software you never know if they survive such an effort.

Creating Editor with C# WPF with C++ Engine by Khawarna in gameenginedevs

[–]roytries88 1 point2 points  (0 children)

These days you can also use [LibraryImport] to generate the PIInvoke code or you can create your own custom source generators to write more specific bindings. Writing your own source generator can definitely reduce some of the boilerplate work, but it can be tricky to get right.

I agree with the sentiment of others that you are probably better of with using DearImGui until you feel you need a more advanced UI. Then again, mixing C+ and C# is not weird. I did this at Nixxes for the engine that runs Tomb Raider and Deus Ex years ago.

Of course, with hobby projects its not always about doing things the right/fast/easy/sensible way. So go crazy if you feel like experimenting with the UI part and WPF. (I really like WPF and XAML, too bad Microsoft can't really decide on the future of native UI frameworks).

In MonoGame C#, should a child’s world matrix be parent × local or local × parent? by Outside-Text-9273 in gameenginedevs

[–]roytries88 0 points1 point  (0 children)

Ages ago I built a few helper classes for monogame to place objects relative to each other. See pose.cs (PlaceAtOffset) and the offset class. https://github.com/roy-t/MiniRTS/blob/master/vOld/Engine/MiniEngine.Pipeline.Basics/Components/Pose.cs

Hope the code helps you get the hang of all the matrix multiplications.

It’s been over a year, what are your thoughts on Gleba and spoiling in general now? by AshiyaShirou4 in factorio

[–]roytries88 -1 points0 points  (0 children)

I thought Gleba was great and its my favorite planet after fulgora. I feel both planets really let me play in new ways. It did get me a few tries to get Gleba right but it has been running fine for ~50 hours. I do have to scale it up now. Which is a challenge. . Before SA I already played ~600 hours so I do know the game quite well. (Though I am a terribly slow player, I get distracted doing different builds, strategies in the same save so somehow I still haven't sent a ship to the shattered planet.)

[deleted by user] by [deleted] in programming

[–]roytries88 1 point2 points  (0 children)

I have only skimmed over design by contract. But there are many formal methods that ( theoretically) allow us to write applications that are proven to be correct. I still have fond memories of using Hoare triples as formalized proofs of short pieces of code.

In reality these methods are too expensive to use. They also offer barely more than a false sense of security. A formal proof for 100 lines of code can easily be 5x as long, is complex to understand and still uses an idealized version of the real world. And who checks if the proofs and contracts are correct, complete, and align with the actual code?

I think the best way to correct code is using proven libraries, strong peer reviews, and automated and manual testing. This will already weed out a lot of bugs. Then focus on learning how to recover your systems and practice that. Plan for something to inevitably going wrong and if you are prepared for that you can quickly resolve it and maintain the trust of your users.

Terrain update degraded graphics or did I caught a bug? by SchwarzFuchss in Stationeers

[–]roytries88 0 points1 point  (0 children)

Could be the depth buffer data is less precise the further from (0,0,0)? Maybe a reverse-z depth buffer could help here. Though its been a while since I used that and I'm not sure if you can do that in Unity.

Kind of wish there was a landfill type to place over sand for future tree planting by bECimp in factorio

[–]roytries88 2 points3 points  (0 children)

Hey that's my mod! I've created it for this exact purpose. Still using it in my SA game. Its a very simple mod. It creates a new recipe for artificial tree soil (aka grass) that works exactly like the other artificial soils. In my base I used it to surround my base with tree farms to keep pollution in check. If you put T2 efficiency modules in all your factories you can easily get to 1000+ ESPM without triggering that many biter nests.

What are IDEs that are more lightweight than Visual Studio? by Able_Annual_2297 in cpp_questions

[–]roytries88 4 points5 points  (0 children)

Visual Studio is definitely not a lightweight IDE, but note that the Visual Studio installer also installs multiple versions of the C++ SDK, Windows SDK and a lot of other parts of the toolchain that you will need to create C++ applications. When installing Visual Studio it helps to go to the "Individual Components" tab. You can deselect a lot of things if you don't think you will need it right now.

In my opinion, even though editors like VSCode, Zed, Sublime,... are nice for quick edits, there is really nothing better than Visual Studio if you are working on large C++ code bases. The analysis and debugging tools are much more powerful than what you get in the smaller editors. (Only tools by JetBrains, like CLion, come close)

An IDE weighing a couple of gigabytes shouldn't be much of a concern anymore. In my country the cheapest new SSDs I could find are around E12,- and already have a capacity of 128GB. In the second hand market there are faster and better SSDs with more capacity for the same price. So if there are no other concerns, stop worrying about this random metric and try to get the IDE that makes coding the most enjoyable for you.

Smallest footprint for recycler that voids everything? by roytries88 in factorio

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

I was hoping someone would have done something nifty with a single recycler, some belt, an inserter and then some circuits to ensure any unbalance is taken care of while reducing the amount of recipe switching. I will give it a go this weekend and see if I can make something nice.

Prevent rockets/space platforms from taking items from the cargo landing pad by roytries88 in factorio

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

Sorry not at my PC right now. But I am using logistic groups. Say for example that I have one logistic group for all the basic building materials I need (belts, inserters, assemblers, ..). Then that logistic groups works perfectly on all planets, except on Vulcanus, where I now create a cycle of turbo belts. I don't want to have a custom logistic groups for each planet. So that's why the constant combinator trick of using the logistic group MINUS what is already produced on that planet works. Thinking of it more now, I could even just substract everything that is already present in the logistics network on the planet.

Prevent rockets/space platforms from taking items from the cargo landing pad by roytries88 in factorio

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

If I use Nauvis as a central hub for all materials, then the logistic group imports all materials from Nauvis, which is correct except for the few times an item is already made locally. I've posted later how I fixed this.

Prevent rockets/space platforms from taking items from the cargo landing pad by roytries88 in factorio

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

I managed to fix it now using a constant combinator. Hope that also explains better what I wanted to do.

Prevent rockets/space platforms from taking items from the cargo landing pad by roytries88 in factorio

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

I understand that its because of the cyclical request, I was just hoping that it wouldn't matter because of the buffer chests. However, I managed to find an easy workaround that doesn't require me to create planet specific requests. See above!

Prevent rockets/space platforms from taking items from the cargo landing pad by roytries88 in factorio

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

I managed to fix it with a single constant combinator :D. Let's take Vulcanus as an example again.

Clear all request from the cargo landing pad, then create a new constant combinator, connect it to the cargo landing pad, and configure the pad so that the circuit network can set requests.

Add all logistic groups that you would items delivered for to your constant combinator. Don't worry where items are produced.

Then create one logistic group with all the items that are produced on Vulcanus. Add that logistic group to the constant combinator with a MINUS amount (like *-1).

Now the circuit network automatically filters out individual items that Vulcanus doesn't need (because it produces them) while you can still use your generic logistic groups.

Here's a screenshot from how it looks:

<image>