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.

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

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

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);​

Re: Help making a game with transparency

2019-09-30 Thread Murilo via Digitalmars-d-learn
Hi everyone, I tried creating a program which simply shows the image of the ship near the corner of the screen, just for testing sake. Here it is: import arsd.gamehelpers, arsd.image; ​ void main()​ {​ SimpleWindow window = create2dWindow("Space Invaders", 1000, 400);​ OpenGlTexture

Re: Help making a game with transparency

2019-09-30 Thread Murilo via Digitalmars-d-learn
On Saturday, 28 September 2019 at 14:33:03 UTC, Adam D. Ruppe wrote: But if you all want that, on your schedule, smash that like button, comment, subscribe, and be sure to ring that bell so you get a notification every time I parrot what people say on Youtube at the end of their videos. Then

Re: Help making a game with transparency

2019-09-30 Thread Murilo via Digitalmars-d-learn
On Saturday, 28 September 2019 at 13:41:24 UTC, matheus wrote: Ok, I took a look over my old projects and I found exactly what you want, by the way it's from 2012. It uses Derelict 2.0 bindings and will draw a PNG image where you can move around with cursor keys. If you want I can send you

Re: Help making a game with transparency

2019-09-28 Thread Murilo via Digitalmars-d-learn
On Saturday, 28 September 2019 at 05:57:55 UTC, Mike Parker wrote: On Friday, 27 September 2019 at 22:55:22 UTC, Murilo wrote: You might consider using SDL and SDL_image: Thank you very much. But I want to use only the arsd library.

Re: Help making a game with transparency

2019-09-28 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 28 September 2019 at 08:06:02 UTC, GreatSam4sure wrote: The last time I try this library on windows 10 it throws errors. Have you try it recently on windows What errors? I sometimes break it with careless pushes to master but it usually works for me. I want to know can the

Re: Help making a game with transparency

2019-09-28 Thread Mike Parker via Digitalmars-d-learn
On Saturday, 28 September 2019 at 13:41:24 UTC, matheus wrote: Ok, I took a look over my old projects and I found exactly what you want, by the way it's from 2012. It uses Derelict 2.0 bindings and will draw a PNG image where you can move around with cursor keys. Murilo, if you do decide to

Re: Help making a game with transparency

2019-09-28 Thread matheus via Digitalmars-d-learn
Ok, I took a look over my old projects and I found exactly what you want, by the way it's from 2012. It uses Derelict 2.0 bindings and will draw a PNG image where you can move around with cursor keys. If you want I can send you the whole project (Makefile, DLL's) and everything else to

Re: Help making a game with transparency

2019-09-28 Thread GreatSam4sure 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-28 Thread Mike Parker via Digitalmars-d-learn
On Friday, 27 September 2019 at 22:55:22 UTC, Murilo wrote: Ahhh, that clears everything up. I will then leave the program without the transparency and wait until you get around to implement the fixes to it, I am not a developer, I am a scientist, I only use libraries, I don't know how to

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 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 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 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 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

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

Help making a game with transparency

2019-09-26 Thread Murilo via Digitalmars-d-learn
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?