Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

To Unity Developers: Will you switch engines?

Joined
Oct 26, 2016
Messages
1,914
C# allows you to ship a game made by 20 okay-to-good engineers and only needing 1-2 performance experts in the team.
Do you need some kind of library for that or can you do everything in C#? I've tried C# shortly, but it didn't feel that special. Maybe it's the libraries or connection to Unity etc. that makes it more useful. I think memory (resource?) management in C# is weird, but it could be just me.
Its not just you. Its weird.

There are much better libraries than Unity for use with C#. I don't know why anyone would use Unity when you have XNA/Monogame. It even has some decent UI libraries.
 
Joined
Oct 26, 2016
Messages
1,914
C# allows you to ship a game made by 20 okay-to-good engineers and only needing 1-2 performance experts in the team.
Do you need some kind of library for that or can you do everything in C#? I've tried C# shortly, but it didn't feel that special. Maybe it's the libraries or connection to Unity etc. that makes it more useful. I think memory (resource?) management in C# is weird, but it could be just me.
Fuck c#. For every plus it has there is some downside. I had this problem the past few days where I am trying to have a nav mesh node, and attach entities to "taking" that node up. I was storing the nodes as structs. This made some really horrible bugs.

Well....in c# structs are value types. That means it was essentially holding a copy and not a pointer, so I had to switch to class so its holds a pointer. This is just stupid. Its way of managing memory is horrible, horrible. I can't just say hold this struct as a unique memory object (like I can in C++).

I don't like C++ at all but hands down its better at knowing how to handle memory, there's no confusion.
 

MF

The Boar Studio
Patron
Developer
Joined
Dec 8, 2002
Messages
906
Location
Amsterdam
Well....in c# structs are value types. That means it was essentially holding a copy and not a pointer, so I had to switch to class so its holds a pointer. This is just stupid. Its way of managing memory is horrible, horrible. I can't just say hold this struct as a unique memory object (like I can in C++).

Even 'primitive' types in C# are structures. A float is System.Single for example.

The advantage over a class is that it's dropped on the stack and not the heap.

Use the unsafe keyword and * and & if you want pointer level of control.
 

pakoito

Arcane
Patron
Joined
Jun 7, 2012
Messages
3,098
`class shared_pointer<T>(val value: T)` grats you have a C++ shared pointer now. Except it doesn't have runtime identity, so no class-based lookups for you. You have to use a static tag object if your ECS supports that.

It's an OOP/VM thing rather than C#, you'll find this in the JVM and V8 too.
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom