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

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

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

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

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

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

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

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

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

Re: Game and GC

2018-02-22 Thread Mike Franklin via Digitalmars-d-learn
prevent you from writing a game in D. D is the most flexible language I have ever used; you just need to learn how to deal with the GC in your game. Jonathan M. Davis gave you some good advice and explained the fundamental problem with the GC in real time games (the potential for pauses

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

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

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

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

Game and GC

2018-02-22 Thread Leonardo via Digitalmars-d-learn
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)