Our great sponsors
-
adventofcode
Advent of Code solutions of 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 and 2023 in Scala (by sim642)
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
haskell-game-programming
A central repository of Haskell Game Programming resources, put together by Keera Studios
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
You're going to have a much easier time using something like Map.Map (Int, Int) GridSquare for your matrix instead of the nested lists. Although from a didactic perspective mapBoard was probably good to write, if you model the matrix as a Map it becomes trivially Map.mapWithKey. You can also filter, fold, and traverse the map, so e. g. getFallingPieces could be written:
Oh also good work! That nested list thing just stuck out to me because I went through that in advent of code which often requires representing a grid, and I finally figured out that Map.Map Point a relieved so much pain haha If you haven't heard of advent of code it's a puzzle series that comes out every December. It's pretty fun and a great way to acquaint yourself with unfamiliar programming languages.
well. clearly, writing a game in Haskell is very doable. ;-) For example, https://gitlab.com/gilmi/nyx-game some screencast of its prototype. https://streamable.com/0biaj
You can find some good links on the Awesome Haskell list (a good resource in general) and the Haskell Game Programming list. There are several basic libraries—Gloss, SDL2, OpenGL, Vulkan, Brick, Threepenny—and a handful of engine-ish things—LambdaHack, Apecs, and a scrillion FRP libraries: reflex, sodium, netwire, reactive-banana, Yampa, ramus, elerea…
You can find some good links on the Awesome Haskell list (a good resource in general) and the Haskell Game Programming list. There are several basic libraries—Gloss, SDL2, OpenGL, Vulkan, Brick, Threepenny—and a handful of engine-ish things—LambdaHack, Apecs, and a scrillion FRP libraries: reflex, sodium, netwire, reactive-banana, Yampa, ramus, elerea…