Re: Help making a game with transparency

2019-10-01 Thread Murilo via Digitalmars-d-learn

On Tuesday, 1 October 2019 at 12:45:35 UTC, Adam D. Ruppe wrote:

On Monday, 30 September 2019 at 23:52:27 UTC, Murilo wrote:

{​
window.redrawOpenGlSceneNow;​


like I said on email, this is the ONLY thing you should to in 
the event loop to trigger the redraw.


glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | 
GL_ACCUM_BUFFER_BIT);​

glLoadIdentity;​
ship.draw(20, 20, 41, 47);​


All this actual drawing stuff should be attached to the 
`window.redrawOpenGlScene` delegate. Just do 
`window.redrawOpenGlScene = { that stuff } ` after creating the 
window but before the event loop to set it up.


It worked! :D Thank you so much man. Now I will finish 
refactoring the code and then I will be able to finish your 
tutorial.


Re: Help making a game with transparency

2019-10-01 Thread Murilo via Digitalmars-d-learn

On Tuesday, 1 October 2019 at 12:46:58 UTC, Adam D. Ruppe wrote:

On Monday, 30 September 2019 at 20:14:56 UTC, Murilo wrote:

What are your pages that you want people subscribing to?


I'm just trolling.


And what is your patreon page?


https://www.patreon.com/adam_d_ruppe

but as you'll notice, it is currently $58. To reach "quit my 
job and work for y'all all the time" I put $8000.


Realistically, that is never going to happen.

thus why i troll.


Alright, sending you money every month on Patreon would be a 
problem for me so I figure I can patron you in another way, I am 
writing a tutorial for your library and I have showed lots of 
people how useful your library can be, I have also sent several 
PR to add stuff to it. That will be my way of contributing.


Re: Saving and loading large data sets easily and efficiently

2019-10-01 Thread JN via Digitalmars-d-learn

On Monday, 30 September 2019 at 20:10:21 UTC, Brett wrote:
So it much more difficult than POD but would still be a little 
more work to right... hoping that there is something already 
out there than can do this. It should be


I'm afraid there's nothing like this available. Out of 
serialization libraries that I know, msgpack-d and cerealed don't 
store references and instead duplicate the pointed-to content. 
Orange does it, but it doesn't support binary output format, only 
XML, so it isn't a good fit for your data.


Re: want to know precise GC benchmarks

2019-10-01 Thread Mike Parker via Digitalmars-d-learn

On Tuesday, 1 October 2019 at 16:24:49 UTC, a11e99z wrote:



why I want to know such info?
CodinGame sometimes use time-limit for bot move for example 
100ms, and bot will be disqualified in case no answer


Simple solution: don't allocate every frame. The GC only runs 
when it needs to and it only needs to if an allocation request 
takes it over a certain threshold. If you need to allocate at 
all, do it up front. Or better, do it statically. Then the GC 
won't run at all.


What sort of CodinGame bot would you need to allocate from the GC 
for anyway?


Re: want to know precise GC benchmarks

2019-10-01 Thread a11e99z via Digitalmars-d-learn

On Tuesday, 1 October 2019 at 16:12:18 UTC, a11e99z wrote:
does anybody some kind of benchmark to test conservative and 
precise GC?

precise GC is better or not? is STW improving?


and another question about GC and app parameters:
program.exe “–DRT-gcopt=gc:precise parallel:4” 
“–DRT-scanDataSeg=precise” output.data

are this 2 -DRT params combined or overwriting each other?
link to doc for DRT+GC 
https://dlang.org/spec/garbage.html#gc_config


I know about rt_options[] but asking about program args

why I want to know such info?
CodinGame sometimes use time-limit for bot move for example 
100ms, and bot will be disqualified in case no answer


want to know precise GC benchmarks

2019-10-01 Thread a11e99z via Digitalmars-d-learn
does anybody some kind of benchmark to test conservative and 
precise GC?

precise GC is better or not? is STW improving?


Re: Help making a game with transparency

2019-10-01 Thread Adam D. Ruppe via Digitalmars-d-learn

On Monday, 30 September 2019 at 20:14:56 UTC, Murilo wrote:

What are your pages that you want people subscribing to?


I'm just trolling.


And what is your patreon page?


https://www.patreon.com/adam_d_ruppe

but as you'll notice, it is currently $58. To reach "quit my job 
and work for y'all all the time" I put $8000.


Realistically, that is never going to happen.

thus why i troll.


Re: Help making a game with transparency

2019-10-01 Thread Adam D. Ruppe via Digitalmars-d-learn

On Monday, 30 September 2019 at 23:52:27 UTC, Murilo wrote:

{​
window.redrawOpenGlSceneNow;​


like I said on email, this is the ONLY thing you should to in the 
event loop to trigger the redraw.


glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | 
GL_ACCUM_BUFFER_BIT);​

glLoadIdentity;​
ship.draw(20, 20, 41, 47);​


All this actual drawing stuff should be attached to the 
`window.redrawOpenGlScene` delegate. Just do 
`window.redrawOpenGlScene = { that stuff } ` after creating the 
window but before the event loop to set it up.


Blog Post #75: Cairo X - Noodling with the Mouse

2019-10-01 Thread Ron Tarrant via Digitalmars-d-learn
Here's the second installment of the Nodes-n-noodles coverage in 
which we get the mouse involved: 
https://gtkdcoding.com/2019/10/01/0075-cairo-x-mouse-noodle.html