Re: Game and GC

2018-04-08 Thread solidstate1991 via Digitalmars-d-learn
On Monday, 9 April 2018 at 01:01:18 UTC, Chris Katko wrote: Why... associative arrays? Wouldn't that become expensive when you hit 1,000s, or 10,000's of objects, for something as tiny as a coordinate (two or three floats) lookup? Well, that's the other reason why I was looking for a different

Re: Game and GC

2018-04-08 Thread Chris Katko via Digitalmars-d-learn
On Monday, 9 April 2018 at 00:25:21 UTC, solidstate1991 wrote: On Saturday, 24 February 2018 at 07:12:21 UTC, Guillaume Piolat wrote: From my experience a combination of the following is necessary: - not having the audio thread registered - using pools aggressively for game entities Also you c

Re: Game and GC

2018-04-08 Thread solidstate1991 via Digitalmars-d-learn
On Saturday, 24 February 2018 at 07:12:21 UTC, Guillaume Piolat wrote: From my experience a combination of the following is necessary: - not having the audio thread registered - using pools aggressively for game entities Also you can save a lot of clockcycles if you put @nogc everywhere you do

Re: Game and GC

2018-04-07 Thread Danni Coy via Digitalmars-d-learn
gc causes unpredictabilities in performance*. With games it tends to be worst case performance that matters. I would reccomend using std.experimental.allocator (even if you still use the default GC backed allocator). This will allow you to swap out your allocator for a more specialised one as your

Re: Game and GC

2018-04-06 Thread Chris Katko via Digitalmars-d-learn
I'm in the same boat. I do games. But I love D's syntax and template power. So I'm doing a full experiment. Honestly, if D is that big a liability, you'll encounter it long before it's "too late" to port it to C++. Last night I had stuttering issues, but I realized there was a single, C-func

Re: Game and GC

2018-04-05 Thread Leonardo via Digitalmars-d-learn
On Friday, 23 February 2018 at 03:25:33 UTC, Norm wrote: On Friday, 23 February 2018 at 01:54:07 UTC, Leonardo wrote: Hi, I'm new to language and games. Many people say that GC is bad and can slow down your project in some moments. What can happen if I create a game using D without worrying wi

Re: Game and GC

2018-02-25 Thread Leonardo via Digitalmars-d-learn
On Saturday, 24 February 2018 at 07:12:21 UTC, Guillaume Piolat wrote: From my experience a combination of the following is necessary: - not having the audio thread registered - using pools aggressively for game entities I'll read the resources you gave. Thanks for the all answers. Great commun

Re: Game and GC

2018-02-23 Thread Guillaume Piolat via Digitalmars-d-learn
On Friday, 23 February 2018 at 01:54:07 UTC, Leonardo wrote: Hi, I'm new to language and games. Many people say that GC is bad and can slow down your project in some moments. What can happen if I create a game using D without worrying with memory management? (using full GC) From my experienc

Re: Game and GC

2018-02-23 Thread Dukc via Digitalmars-d-learn
On Friday, 23 February 2018 at 01:54:07 UTC, Leonardo wrote: What can happen if I create a game using D without worrying with memory management? (using full GC) If you do not worry about memory management at all, it will probably lead to a need to redesign your game. And that's regardless wh

Re: Game and GC

2018-02-23 Thread JN via Digitalmars-d-learn
On Friday, 23 February 2018 at 01:54:07 UTC, Leonardo wrote: Hi, I'm new to language and games. Many people say that GC is bad and can slow down your project in some moments. What can happen if I create a game using D without worrying with memory management? (using full GC) Most people who s

Re: Game and GC

2018-02-22 Thread Norm via Digitalmars-d-learn
On Friday, 23 February 2018 at 01:54:07 UTC, Leonardo wrote: Hi, I'm new to language and games. Many people say that GC is bad and can slow down your project in some moments. What can happen if I create a game using D without worrying with memory management? (using full GC) Have a look at ht

Re: Game and GC

2018-02-22 Thread Mike Franklin via Digitalmars-d-learn
On Friday, 23 February 2018 at 01:54:07 UTC, Leonardo wrote: Hi, I'm new to language and games. Many people say that GC is bad and can slow down your project in some moments. What can happen if I create a game using D without worrying with memory management? (using full GC) Don't let the GC

Re: Game and GC

2018-02-22 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 23 February 2018 at 01:54:07 UTC, Leonardo wrote: What can happen if I create a game using D without worrying with memory management? (using full GC) It depends what kind of game it is and how sloppy your code is in general. Every game I have written in D i don't think about it,

Re: Game and GC

2018-02-22 Thread Leonardo via Digitalmars-d-learn
On Friday, 23 February 2018 at 02:16:38 UTC, Jonathan M Davis wrote: The GC won't slow down your code in general (in fact, it will probably speed it up in comparison to reference counting), but whenever the GC does a collection, that means that it stops all threads that it manages. So, you coul

Re: Game and GC

2018-02-22 Thread Leonardo via Digitalmars-d-learn
On Friday, 23 February 2018 at 02:02:12 UTC, StickYourLeftFootIn wrote: On Friday, 23 February 2018 at 01:54:07 UTC, Leonardo wrote: Hi, I'm new to language and games. Many people say that GC is bad and can slow down your project in some moments. What can happen if I create a game using D witho

Re: Game and GC

2018-02-22 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, February 23, 2018 01:54:07 Leonardo via Digitalmars-d-learn wrote: > Hi, I'm new to language and games. > Many people say that GC is bad and can slow down your project in > some moments. > What can happen if I create a game using D without worrying with > memory management? > (using ful

Re: Game and GC

2018-02-22 Thread StickYourLeftFootIn via Digitalmars-d-learn
On Friday, 23 February 2018 at 01:54:07 UTC, Leonardo wrote: Hi, I'm new to language and games. Many people say that GC is bad and can slow down your project in some moments. What can happen if I create a game using D without worrying with memory management? (using full GC) What do you think