There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

Tyfud ,

Unfortunately, those of us that make games in Unreal Engine are stuck writing a lot of C++, unless we want to do everything in BPs (no thanks, they’re fine, but it’s not coding, and it’s difficult to maintain and refactor for complicated projects, they’re good for taking C++ components and building bigger components out of the base C++ functionality though).

With that said, UE’s support for C++ is decent. Which is, that as long as you tag all your fields, properties, methods, classes, etc. with some UnrealEngine attribute filter (like UCLASS or UPROPERTY), Unreal will handle the memory management of those constructs for you. Which is nice.

Unfortunately it has some other limitations to the C++ language that you can’t work around, like disallowing pure abstracts because every C++ derivative class based on any UE construct (Actor, Character, Pawn, etc.) has to be instantiatable in the editor. So no pure abstracts and such.

In general, I’d give it a 6/10.

It’s still mostly C++, but some of the things suck less.

n3cr0 ,

Jokes aside, I struggle more with abominations like JavaScript and even Python.

mogoh ,

Do you have a minute for our lord and savoir TypeScript?

n3cr0 ,

As long as it can distinguish between int and uint - yesss!

Zangoose ,

TypeScript is still built on JavaScript, all numbers are IEEE-754 doubles 🙃

Edit: Actually I lied, there are BigInts which are arbitrarily precise integers but I don’t think there’s a way to make them unsigned. There also might be a byte-array object that stores uint8 values but I’m not completely sure if I’m remembering that correctly.

unionagainstdhmo OP ,
@unionagainstdhmo@aussie.zone avatar

Yeah JavaScript is a bit weird, semicolons being optional and compulsory at the same time: I remember trying to build an electron example ~5yrs ago and it didn’t work unless I put in the semicolons which the developers omitted.

Python is just glorified shell scripting. Libraries like numpy are cool but I don’t like the indentation crap, I’m getting used to it because University likes it.

void_star ,

Python has its quirks, but it’s much much cleaner than js or c++, not fair to drag it down with them imo

unionagainstdhmo OP , (edited )
@unionagainstdhmo@aussie.zone avatar

Disclaimer: I actually like C++ the language, I’m reasonably comfortable with it and enjoy it as an upgrade from C. I don’t use much OOP stuff as I’m writing a game using the flecs ECS. So things like abstract classes are mostly absent from my codebase.

What has been driving me up the wall the last month has been build systems and dependencies: don’t get me wrong; meson is great but the problem is not everyone uses meson. All I want to do is add some library built with cmake as a dependency without needing to rewrite the build system or install it on my OS. Apparently that is too much to ask!

I’m seriously considering dropping everything and jumping to Rust because of Cargo. Yes I’ve tried setting up conan but not having much fun since the recipes are all third party and out of date anyways

magic_lobster_party ,

So things like abstract classes are mostly absent from my codebase.

I believe the consensus nowadays is that abstract classes should be avoided like the plague even in languages like Java and C#.

void_star ,

I have not heard this consensus. Definitely inheritance where the base class holds data or multiple inheritance, but I thought abstract was still ok. Why is it bad?

magic_lobster_party ,

In 99% of the cases, inheritance can easily be replaced with composition and/or interfaces. Abstract classes tend to cause hard dependencies that are tough to work with.

I’m not sure why you would use abstract classes without data. Just use interfaces.

Zangoose ,

The way I was taught was that you usually start off with only an interface and then implementing classes, and then once you have multiple similar implementations it could then make sense to move the common logic into an abstract class that doesn’t get exposed outside of the package

SpaceNoodle ,

How do you implement an interface in C++ without an abstract class?

Doom4535 ,

Rust’s cargo is great, I’d say it would be best to make the switch sooner rather than later once your code base is established. The build system and tooling alone is a great reason to switch

unionagainstdhmo OP ,
@unionagainstdhmo@aussie.zone avatar

What sucks is I’ve been working on this hobby project for nearly 4 years now. It started in C#, moved to C, now C++. It’s at the stage where a lot of basic functionality has been implemented, with the largest component, the Vulkan based renderer being maybe 1/4 implemented. The core game stuff is ECS based and flecs has a rust binding so migrating that will be easy. Renderer will just become even further from completion. I’m worried that there will be new problems that are maybe more inhibiting, but this is meant to be a fun project and build systems aren’t fun. It’s a difficult balance and I’m not the only person involved, the other person isn’t as convinced by cargo as they haven’t spent days working on the build system

Skullgrid ,
@Skullgrid@lemmy.world avatar

Instructions unclear, attempted to learn JS

breadsmasher ,
@breadsmasher@lemmy.world avatar

“Give it six months”

It only needed 3!

kirk781 ,
@kirk781@discuss.tchncs.de avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines