Re: Packaging and Distributing Dlang Applications with GtkD Dependency?

2019-09-27 Thread Jacob Carlborg via Digitalmars-d-learn
On Wednesday, 25 September 2019 at 11:46:04 UTC, Ron Tarrant wrote: Hi y'all, I've been Googling how to do this, but coming up with nothing definitive. Are there any articles for how to do this for: Windows? Linux? other UNIX-alike OSs? For macOS you should distribute a GUI application for

Blog Post #74: Cairo IX - Doodle a Noodle

2019-09-27 Thread Ron Tarrant via Digitalmars-d-learn
Because at this point we've covered almost every widget GtkD has to offer, today we're taking a departure from that to do something non-standard. Nodes-n-noodles are becoming more popular as UI elements, so this is the beginnings of how we can get this paradigm working in GtkD. You can find

Re: Help making a game with transparency

2019-09-27 Thread Murilo via Digitalmars-d-learn
Sorry this is a bit vague. I suppose you're using engine.d or screen.d directly right? Depending on your setup (OpenGL or Software) transparency will be different. For example take a look at line 733, putpixel function and you'll see that It handle Color differently if it's OpenGL x

Re: Help making a game with transparency

2019-09-27 Thread Murilo via Digitalmars-d-learn
On Friday, 27 September 2019 at 11:32:53 UTC, Adam D. Ruppe wrote: On Friday, 27 September 2019 at 11:28:35 UTC, matheus wrote: Sorry this is a bit vague. I suppose you're using engine.d or screen.d directly right? those two are obsolete, new stuff should use simpledisplay but with

Re: Help making a game with transparency

2019-09-27 Thread matheus--- via Digitalmars-d-learn
On Friday, 27 September 2019 at 16:36:14 UTC, Murilo wrote: ...Do you know the arsd library? Yes but I use mostly terminal.d and others. On the other hand I use to code games too using SDL and OpenGL. I know for example in OpenGL you can do: glEnable(GL_ALPHA_TEST); to enable alpha channel

Re: Help making a game with transparency

2019-09-27 Thread Murilo via Digitalmars-d-learn
On Friday, 27 September 2019 at 17:53:33 UTC, matheus wrote: On Friday, 27 September 2019 at 16:36:14 UTC, Murilo wrote: ...Do you know the arsd library? Yes but I use mostly terminal.d and others. On the other hand I use to code games too using SDL and OpenGL. I know for example in OpenGL

How to use Dbus to detect application uniqueness in D?

2019-09-27 Thread Hossain Adnan via Digitalmars-d-learn
Hi I need to detect application uniqueness using dbus. I have a working code in Rust: fn run_as_unique_instance() { println!("First instance detected. Doing work..."); loop {} } fn run_as_nonunique_instance() { println!("Another instance is already running. Quiting...");

Re: Help making a game with transparency

2019-09-27 Thread matheus via Digitalmars-d-learn
On Friday, 27 September 2019 at 21:16:07 UTC, Murilo wrote: ... Here it is, how do I make the ship have a transparent background? First: Your PNG file has transparency data information right? Second: I was Looking into the drawImage function (Line 854):

Re: Help making a game with transparency

2019-09-27 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 27 September 2019 at 22:13:43 UTC, matheus wrote: https://github.com/adamdruppe/arsd/blob/b0d21de148ef0b23ea845be322af5e6931ca4cb6/screen.d I really should just remove that file as it is no longer well maintained. I haven't used it for anything in years and doubt anyone else is

Re: Help making a game with transparency

2019-09-27 Thread Murilo via Digitalmars-d-learn
On Friday, 27 September 2019 at 22:13:43 UTC, matheus wrote: On Friday, 27 September 2019 at 21:16:07 UTC, Murilo wrote: ... Here it is, how do I make the ship have a transparent background? First: Your PNG file has transparency data information right? Second: I was Looking into the

Re: Help making a game with transparency

2019-09-27 Thread Murilo via Digitalmars-d-learn
On Friday, 27 September 2019 at 22:40:14 UTC, Adam D. Ruppe wrote: On Friday, 27 September 2019 at 22:13:43 UTC, matheus wrote: https://github.com/adamdruppe/arsd/blob/b0d21de148ef0b23ea845be322af5e6931ca4cb6/screen.d I really should just remove that file as it is no longer well maintained.

Re: Help making a game with transparency

2019-09-27 Thread matheus via Digitalmars-d-learn
On Friday, 27 September 2019 at 02:54:27 UTC, Murilo wrote: Hi guys, I am making a game but for some reason the sprites do not show with the transparent background that they were supposed to. I'm using the arsd library. Can anyone help me? Sorry this is a bit vague. I suppose you're using

Re: Help making a game with transparency

2019-09-27 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 27 September 2019 at 11:28:35 UTC, matheus wrote: Sorry this is a bit vague. I suppose you're using engine.d or screen.d directly right? those two are obsolete, new stuff should use simpledisplay but with simpledisplay you need to use opengl for transparency since the xlib/gdi+

Re: Packaging and Distributing Dlang Applications with GtkD Dependency?

2019-09-27 Thread Hossain Adnan via Digitalmars-d-learn
On Wednesday, 25 September 2019 at 11:46:04 UTC, Ron Tarrant wrote: Hi y'all, I've been Googling how to do this, but coming up with nothing definitive. Are there any articles for how to do this for: Linux? For Linux there are 3 new options: 1. Appimages (https://appimage.org/): This is

Help playing sounds using arsd.simpleaudio

2019-09-27 Thread Murilo via Digitalmars-d-learn
Can anyone just please show me how to play a background sound(like those in games) using arsd.simpleaudio? I'd like something simple with a code snippet please.