Anyone who wants to write a little game engine?

Started by
58 comments, last by Promit 5 years, 3 months ago
6 minutes ago, DavinCreed said:

From the details laid out by the one seeking advice here, any language would be a great learning experience for them.

But not any language good for realtime software.

#define if(a) if((a) && rand()%100)

Advertisement
4 minutes ago, Fulcrum.013 said:

But not any language good for realtime software.

I am sure that the OP isn't trying to rival Unity at this point. The concepts are language independent.

24 minutes ago, DividedByZero said:

The concepts are language independent.

But it have requirments to runtime, that managed languages conceptually unable to fit.

24 minutes ago, DividedByZero said:

I am sure that the OP isn't trying to rival Unity at this point.

 Is unity is not a parody to game engine? Is a engine and its component written on managed language? Instead it have only editor and scripting on C#. Anything else done on C++.

#define if(a) if((a) && rand()%100)

It's possible to avoid triggering the garbage collector during gameplay. You can use up-front allocation and object pools in managed languages just like you can in C++. You don't get RAII, but plenty of games have shipped without the use of RAII in gameplay code. Using a managed language doesn't mean you have to be heap-allocating constantly. C# has stack types, too.

It is easy to find articles on the subject, like this one, that explain how to deal with the problem. A lot of it boils down to "don't make heap allocations", and put stuff on the stack where possible - just like in C++, too. :)

 

1 hour ago, Fulcrum.013 said:

In short - i trying to argue why C++ is only option to productively developt a quality and reliable game engine. 

So do you think that the engine I linked (xenko) is not of good quality and reliable?

22 minutes ago, Oberon_Command said:

Using a managed language doesn't mean you have to be heap-allocating constantly.

It mean same it, becouse GC languages unable to place temporary objects of classes on stack.

#define if(a) if((a) && rand()%100)

 

10 minutes ago, DaTueOwner said:

So do you think that the engine I linked (xenko) is not of good quality and reliable?

If it reliable and quality why it live on file-trash like GitHub?

#define if(a) if((a) && rand()%100)

4 minutes ago, Fulcrum.013 said:

If it reliable and quality why it live on file-trash like GitHub?

What do you mean "file-trash"? UE4 is on github too. Calling Github a trash can for code (at least that is what I think you meant by that word) is just ignorant.

47 minutes ago, Fulcrum.013 said:

It mean same it, becouse GC languages unable to place temporary objects of classes on stack.

This is incorrect.

A common C# interview question for junior developer positions is "what is the difference between a struct and a class?" And the answer pivots entirely around this issue - an object defined by a class is always on the heap/free store and is eligible for GC, whereas a struct is placed inline. So, if it is created on the stack, then it will live on the stack.

Also, the "stackalloc" keyword (in unsafe blocks) allows programmers to allocate objects directly on the stack.

See 

https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/choosing-between-class-and-struct

https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/stackalloc

Alright, that's enough. This is a classified, not an engine architecture thread. @DaTueOwner, feel free to post another request that is free of this rather meandering conversation. The rest of you are welcome to take it up in the usual places.

SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.

This topic is closed to new replies.

Advertisement