Jump to content
  • Advertisement
DaTueOwner

Anyone who wants to write a little game engine?

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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++.

Edited by Fulcrum.013

Share this post


Link to post
Share on other sites

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. :)

 

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Edited by Fulcrum.013

Share this post


Link to post
Share on other sites

 

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Edited by Oberon_Command

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!