Pixelpusher: An intuitive 2D multiplayer action game in Haskell

Hi everyone, I’d like to show you the Haskell project I’ve been working on for practically forever (5 years). It’s a video game!

I’ve written a post about it here.

From a technical perspective, the game is nothing special. I just did what I needed to do to get things to work. But it is a whole game!

If anyone tries out the game, please let me know what you think! I’d be thrilled to hear any and all feedback.

I’d also appreciate any suggestions for alternatives or improvements to the approach described for adding constraints to ECS.

Thanks

33 Likes

Congratulations! Inspiring writeup!

4 Likes

That’s incredibly inspiring, I love the polish! Smooth camera zoom, screen shake, particles, and the bot movement <3.

I could only play the demo on Steam since the full game says it’s not available yet, but it was fun enough. I’m not much of an avid gamer so it was a bit difficult for me, but that’s because I couldn’t figure out when my psionic storm gauge was full haha.

3 Likes

Thanks for the writeup! Can you also say a few words about the graphics? I only briefly skimmed through the source so this might be wrong, but it looks like you have used raw OpenGL bindings; have you also considered using a higher-level graphics library? I am curious about the decision process and trade-offs considered here.

1 Like

Looked at the trailer, looks really sick! Also appreciate the writeup, this will be good help for my journey also.

Been spending the last couple of weeks trying to figure out Websockets and TLS. So your networking source is effectively manna from the heavens for me today and clues on where to go and what to look for :').

Would you consider this complete and you want to move onto other things or do you have any plans to take it further? I personally can see something like this working in 3D and being just as fun :smiley:

EDIT: First things first, the game is extremly fun!

Secondly, the tutorial is fantastic and the help menus are a beautiful touch.

This is great work, man, really inspiring :smiley:

4 Likes

Congrats!! I thoroughly enjoyed reading through your write-up.

Looking forward to trying it out.

1 Like

I’m happy you appreciate the details I put into it! And it’s good to know about the psionic storm gauge, thank you!

Also, the demo is actually just the full game. So you already saw all the content, it’s quite limited :sweat_smile:

1 Like

Sure! That’s right, I’m using raw bindings from the gl package. But I think that’s just because I learned OpenGL by following OpenGL - Getting Started · Using Haskell, and it used gl.

Back then I did try to look at GPipe, but I had much less experience with Haskell in 2020 and I wasn’t able to understand it. IIRC, it seemed like a framework and I was worried that I might spend a lot of effort to learn it only to find that it wouldn’t work for my game. I think I was also feeling intimidated about learning graphics programming while also doing it in Haskell, so I wanted to stay close to the tutorial. After that it never crossed my mind to switch away from gl. I think I was having fun trying to figure out how to write my own abstractions for the little corner of OpenGL I was using.

So, no real decision making or consideration of trade-offs. Sorry that I can’t provide much insight!

6 Likes

Thank you for the kind words! And for appreciating the effort I put into the tutorialization.

I’m glad to hear that my code was helpful to you! My first networking implementation used websockets (though I didn’t implement anything for TLS), so maybe something in the git history could also be useful to you.

As for plans … hmmmmm, I don’t feel that the game is complete yet. I think it definitely needs more classes, and it could also use more game modes and powerups. And I think there’s a lot more that could be done for the bots. So I do want to keep working on it! Though, it’s been a long time since I’ve worked on any other projects, so it would be nice to take a break.

By 3D do you mean VR controls for the drones? I think that would be cool!

Q: For what reason is the game available on windows only?

I would guess there’s not a fundamental limitation but rather packaging being difficult.

I’d be happy to try and help you port it to macOS. I’ve in the past been able to package (read wrangle .plists) a game I did in Haskell using vulkan. Linux may also not be so hard

3 Likes

It runs great with wine64 fwiw! That’s how I’ve been playing it (on NixOS).

2 Likes

How did you know? You’re right, it is the packaging, haha.

I’ll admit I didn’t try very hard to figure out how to package a linux program for Steam, but I couldn’t get it to work when I tried. Hmmmmm, I suppose that’s because I don’t know how to package a linux program in general. I use AppImage for the builds I upload to itch.io (pixelpusher by aetup), but those didn’t work with Steam.

It would be great to learn how to package the game for linux and macOS! Though, for macOS, would I need to have some Apple hardware to run the builds on?

Also, I’m happy that you enjoyed my post!

4 Likes

And you can play on linux through Proton on Steam, too!

3 Likes

This is really incredible, thank you for sharing! I’m pretty sure I would have given up on the sound synthesis long before you did, and I appreciate how you persevered!

1 Like