sdl2 icon indicating copy to clipboard operation
sdl2 copied to clipboard

SDL2 compatible libraries

Open Rydgel opened this issue 10 years ago • 26 comments

This is not an issue, I'm just unsure where to post this. Feel free to move it.

First of all, congratulations on the release of sdl2-2.0.0. We have some really nice improvements here.

I would like to talk about the state of the various SDL2 sub-libraries. So far the most used ones are:

  • sdl2_image
  • sdl2_ttf
  • sdl2_mixer
  • sdl2_net
  • sdl2_gfx

There are existing wrappers for those ones. Some are not on Hackage, some are but relies on sdl2-1.3.1. And so on. Some work have been started, for example by @sbidin, he updated his libs to work with the current version of sdl2.

I'm not sure what is the best way to deal with this, like contacting old library mainteners or starting doing them on our own. They should have the same treatment that you guys did for the sdl2 one. I think it would be awesome to have those wrappers inside haskell-game and Hackage.

Please tell me what do you guys think about this.

I am willing to help doing them.

Rydgel avatar Sep 09 '15 11:09 Rydgel

I think it would be awesome to have those wrappers inside haskell-game and Hackage.

I agree, I would be more than happy to incorporate those wrappers into this repository in fact. I can imagine each wrapper having a hierarchy like:

SDL.Image
SDL.Image.Raw

where SDL.Image is a nice Haskell API and SDL.Image.Raw is the underlying FFI representation.

I wouldn't fold these libraries directly into the sdl2 project, mostly because it complicates distribution of the C libraries. However, having them versioned in this repository makes it easy to git grep for API changes, and gives us a nice central place to track issues (that may be cross-cutting concerns).

ocharles avatar Sep 09 '15 11:09 ocharles

I will be working on sdl2_image this weekend. I will study your high-levels bindings to make something similar and compatible. And working on small examples :)

Rydgel avatar Sep 11 '15 08:09 Rydgel

Fantastic! I suggest working in a fork of this repository, and creating an sdl2-image directory there.

ocharles avatar Sep 11 '15 09:09 ocharles

Might also make sense to import the others to give them more visibility and maybe attract more people willing to work on them

sdroege avatar Sep 11 '15 09:09 sdroege

Sorry people, I'm busier than expected. I couldn't start working on this. Also @ocharles, is this the way you see the directory structure?

Should I just drop a sdl2-image directory in the repo root. Or should I move everything to a sdl2 directory, then create a sdl2-image at the same level of it?

Rydgel avatar Jan 07 '16 15:01 Rydgel

Aside from sdl2_net (which is commonly not wrapped at all due to the language providing better networking mechanisms out of the box), the libraries mentioned in the introductory post are now all on Hackage and I believe compatible with the latest haskell-game/sdl2 version:

  • http://hackage.haskell.org/package/sdl2-image
  • http://hackage.haskell.org/package/sdl2-ttf
  • http://hackage.haskell.org/package/sdl2-mixer
  • http://hackage.haskell.org/package/sdl2-gfx

sbidin avatar Feb 02 '17 11:02 sbidin

Thank you this is awesome @sbidin

Rydgel avatar Feb 02 '17 12:02 Rydgel

@sbidin Any chance you'd like to add those to Stackage?

akhra avatar Feb 03 '17 04:02 akhra

@tejon Sure! I've opened a pull request to do so for all libs except sdl2-ttf, which I am neither an author nor maintainer of.

Edit: Possibly Rongcui might like to add sdl2-ttf to Stackage if he has the time? @rongcuid I believe only maintainers can add their packages to Stackage.

sbidin avatar Feb 04 '17 11:02 sbidin

I am glad to, but how do I add? Also, I am not entirely sure whether my package is stable enough, because I have not touched it recently, so it would be quite insufficiently tested.

rongcuid avatar Feb 05 '17 17:02 rongcuid

How to add.

As long as it builds within the current Stackage Nightly, I think it's fine; Stackage isn't concerned with what the package does, only that it's fully dependency-compatible within the environment. Worst case, you probably get some more eyes finding bugs!

akhra avatar Feb 06 '17 01:02 akhra

Stackage LTS 8.0 is now out, and it includes sdl2-image, sdl2-mixer and sdl2-gfx.

sbidin avatar Feb 13 '17 09:02 sbidin

Give me some time. I am hit by numerous deadlines these days

rongcuid avatar Feb 13 '17 17:02 rongcuid

Thanks

I think this needa the SDL_ttf C library to build?

juhp avatar Feb 15 '17 15:02 juhp

Yes it does

rongcuid avatar Feb 15 '17 17:02 rongcuid

Thanks (Sorry I meant to comment in the stackage ticket.:)

juhp avatar Feb 16 '17 02:02 juhp

Is there still interest in adding the rest of the sdl2 libraries to haskell-game? If so, I'd love to help migrate sdl2-image, sdl2-mixer and sdl2-gfx over here, adding any changes you deem necessary.

sbidin avatar Dec 21 '17 12:12 sbidin

@sbidin certainly, I think all you have to do is transfer them to the haskell-game organisation.

ocharles avatar Jan 23 '18 18:01 ocharles

@ocharles Great, I just need permission to do so. I get a "You don’t have the permission to create repositories on haskell-game" at the moment. I think an org admin needs to grant them explicitly somehow? Another option is for an org admin to fork my repos into haskell-game.

sbidin avatar Jan 23 '18 21:01 sbidin

Ok, let me look into that.

On Tue, Jan 23, 2018 at 9:13 PM, Siniša Biđin [email protected] wrote:

@ocharles https://github.com/ocharles Great, I just need permission to do so. I get a "You don’t have the permission to create repositories on haskell-game" at the moment. I think an org admin needs to grant permission explicitly somehow?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/haskell-game/sdl2/issues/79#issuecomment-359932443, or mute the thread https://github.com/notifications/unsubscribe-auth/AABRjgrpIuISJtGhipYk2n2SzTzarGapks5tNkuRgaJpZM4F6Mbe .

ocharles avatar Jan 23 '18 21:01 ocharles

@ocharles Any update? I'll soon be archiving my repos because I don't have time to attend to them, so if wanted one can clone them into haskell-game at a later date.

sbidin avatar Jun 18 '18 13:06 sbidin

@ocharles Ok, you've added me to the organization. I cannot transfer ownership of the repos however, until I'm granted "permission to create repositories on haskell-game".

sbidin avatar Jun 18 '18 18:06 sbidin

Alright, let me see if I can figure that bit out.

ocharles avatar Jun 18 '18 20:06 ocharles

Try now?

ocharles avatar Jun 18 '18 20:06 ocharles

Works! I'll transfer them now.

sbidin avatar Jun 18 '18 20:06 sbidin

Woohoo! Thanks, sorry it took me so long.

ocharles avatar Jun 18 '18 20:06 ocharles