packages feed

mischief (empty) → 0.1.0.0

raw patch · 5 files changed

+271/−0 lines, 5 filesdep +basedep +mischief-assetsdep +mischief-ecs

Dependencies added: base, mischief-assets, mischief-ecs, mischief-input, mischief-math, mischief-render, mischief-sdl

Files

+ CHANGELOG.md view
@@ -0,0 +1,5 @@+# Revision history for mischief++## 0.1.0.0 ++* First version. Released on an unsuspecting world.
+ LICENSE view
@@ -0,0 +1,29 @@+Copyright (c) 2026, Damon+++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++    * Redistributions of source code must retain the above copyright+      notice, this list of conditions and the following disclaimer.++    * Redistributions in binary form must reproduce the above+      copyright notice, this list of conditions and the following+      disclaimer in the documentation and/or other materials provided+      with the distribution.++    * Neither the name of the copyright holder nor the names of its+      contributors may be used to endorse or promote products derived+      from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ README.md view
@@ -0,0 +1,3 @@+# Mischief +This is the main Mischief library! It doesn't really contain anything in itself. It's a sort-of nexus with +gates to all the other Mischief libraries. Read more at the `Mischief` module above!   
+ mischief.cabal view
@@ -0,0 +1,109 @@+cabal-version: 3.0+-- The cabal-version field refers to the version of the .cabal specification,+-- and can be different from the cabal-install (the tool) version and the+-- Cabal (the library) version you are using. As such, the Cabal (the library)+-- version used must be equal or greater than the version stated in this field.+-- Starting from the specification version 2.2, the cabal-version field must be+-- the first thing in the cabal file.+-- Initial package description 'mischief' generated by+-- 'cabal init'. For further documentation, see:+--   http://haskell.org/cabal/users-guide/+--+-- The name of the package.+name: mischief+-- The package version.+-- See the Haskell package versioning policy (PVP) for standards+-- guiding when and how versions should be incremented.+-- https://pvp.haskell.org+-- PVP summary:     +-+------- breaking API changes+--                  | | +----- non-breaking API additions+--                  | | | +--- code changes with no API change+version: 0.1.0.0+-- A short (one-line) description of the package.+-- synopsis:+-- A longer description of the package.+-- description:+-- The license under which the package is released.+license: BSD-3-Clause+-- The file containing the license text.+license-file: LICENSE+-- The package author(s).+author: Damon+-- An email address to which users can send suggestions, bug reports, and patches.+maintainer: pvdoriginal2019@gmail.com+homepage: https://codeberg.org/mischief/mischief+synopsis: The Haskell Game Engine (with rats).+description:+  Mischief is an ECS-based game engine written in Haskell. It provides+  a refreshing, fun experience to game devs, whether or not they are familiar with Haskell+  or ECS.++  It makes use of both data-oriented and functional paradigms to create a weird but clean API+  that gives you easy control over the flow of data in your games.++  It is decentralized, meaning you are able to easily experiment with various libraries.++  Mischief puts creativity, human expression, and fun above anything else.++-- A copyright notice.+-- copyright:+build-type: Simple+-- Extra doc files to be distributed with the package, such as a CHANGELOG or a README.+extra-doc-files:+  CHANGELOG.md+  README.md++-- Extra source files to be distributed with the package, such as examples, or a tutorial module.+-- extra-source-files:+common warnings+  ghc-options:+    "-Wall,"+    -Wno-name-shadowing++library+  -- Import common warning flags.+  import: warnings+  -- Modules exported by the library.+  exposed-modules:+    Mischief++  -- Modules included in this library but not exported.+  -- other-modules:+  other-modules:+  -- LANGUAGE extensions used by modules in this package.+  default-extensions:+    DefaultSignatures+    DeriveAnyClass+    DuplicateRecordFields+    FunctionalDependencies+    ImportQualifiedPost+    MagicHash+    NoFieldSelectors+    OverloadedRecordDot+    OverloadedStrings+    QuasiQuotes+    RequiredTypeArguments+    TemplateHaskell+    TypeFamilyDependencies+    UndecidableInstances++  -- other-extensions:+  -- Other library packages from which modules are imported.+  build-depends:+    base >=4.21.0.0 && <4.22,+    mischief-assets ^>=0.1,+    mischief-ecs ^>=0.2,+    mischief-input ^>=0.1,+    mischief-math ^>=0.1,+    mischief-render ^>=0.1,+    mischief-sdl ^>=0.1,++  -- Directories containing source files.+  hs-source-dirs:+    src++  -- Base language which the package is written in.+  default-language:+    GHC2024++  ghc-options: -fno-omit-yields
+ src/Mischief.hs view
@@ -0,0 +1,125 @@+module Mischief+  ( -- * What is Mischief?+    -- $whatis++    -- * Our Values+    -- $values++    -- * "AI" Disclaimer+    -- $ai++    -- * What do I Need to Know?+    -- $know++    -- * Setting up+    -- $setup++    -- * Where to Start+    -- $howtouse++    -- * Libraries+    -- $libs++    -- * Community+    -- $community++    -- * Contributing+    -- $contributing+  )+where++import Prelude ()++-- $whatis+-- Mischief is a free, open-source, ECS Game Engine written in Haskell. It is a unique blend of+-- data-oriented design and functional programming.++-- $values+-- Mischief is all about creativity and human expression and having fun. Is is a celebration of programming,+-- art, and the creation of unique games and projects.+--+-- It is not an engine meant to fit everyone, to be the "best game engine ever" or to make money. It is+-- a project born of passion for data-oriented design, functional programming, and the art of crafting video games.+--+-- You can read more about our values [here](https://codeberg.org/mischief/mischief/src/commit/321bfb3058b91f985c5149d88cb93618ae104c7f/Values.md).++-- $ai+-- Mischief uses no "generative AI" (in code or otherwise) and strives to be a space that fosters creativity and wholesome human interaction.++-- $know+-- You should generally be able to read through the official books and understand most logic without needing to have written Haskell before.+-- However, you'll have a way better time if you have at least a basic knowledge of Haskell syntax, so it is recommended that you first follow a beginner+-- tutorial for Haskell if you are not familiar with the language.+--+-- The official books try not to assume any prior knowledge of ECS or game engines in general.++-- $setup+-- In order to use Mischief, you'll first need to install @GHC@ and @cabal@. We recommend doing so through the [ghcup](https://www.haskell.org/ghcup/) installer.+--+-- After you have set up a project, add @mischief-ecs@ under @build-depends@ in you @.cabal@ file.+--+-- We recommend using @GHC2024@ as the language standard (set in your @.cabal@ file).+--+-- == Language Extensions+-- We generally recommend using the following language extensions in a Mischief project:+--+-- @+-- DeriveAnyClass+-- DuplicateRecordFields+-- NoFieldSelectors+-- DerivingStrategies+-- OverloadedRecordDot+-- MultiWayIf+-- OverloadedStrings+-- QuasiQuotes+-- TypeFamilyDependencies+-- ImportQualifiedPost+-- @+--+-- @QuasiQuotes@ and @OverloadedStrings@ are especially important because some Mischief features are not available without them (namely quasi-queries and logging).+-- The rest of the extensions are optional.+--+-- You can paste these extensions in the @default-extensions@ field of your @.cabal@ file.+--+-- == Text+-- Mischief uses @Text@ instead of @String@ where possible, including in its logging system.+--+-- You'll often see functions from @Data.Text@ being used, such as @T.show@, so it's recommended to add @text@ as a dependency to your project and to qualify it when you want to use it:+--+-- @+-- import "Data.Text" qualified as T+-- @++-- $howtouse+-- Mischief is made up of a fully decentralized ecosystem of libraries built on top of [mischief-ecs]("Mischief.ECS").+--+-- Most of the them are indeed made by the same people who also make the core ECS. But plugging libraries in and out is highly encouraged+-- and one of the main focuses of the engine. So feel free to experiment with various libs to find what suits your game, or even make your own+-- plugins to share with others!+--+-- To get started, check out the [startup guide]("Mischief.ECS.Startup") from the [Learn You and ECS for Great Mischief!]("Mischief.ECS") book. You can+-- also click on each of the links in the next section to see their documentation / book and learn to use them! You don't need to read any one book to completion before moving on,+-- feel free to switch between them depending on what you wish to learn about.+--+-- If you want to skip ahead past the introductory stuff and get a feel for what Mischief can do, check out the [Rendering Book]("Mischief.Render").+--+-- Note that this library that you're reading right now, @mischief@, isn't meant to be added as a dependency or to be used directly.+-- It exists just for centralizing documentation and helping keep the version of each library in check.++-- $libs+-- This is a list of the current libraries that exist within the ecosystem:+--+-- * [mischief-ecs]("Mischief.ECS"). The core ECS library.+-- * [mischief-assets]("Mischief.Assets"). Load and play with assets.+-- * [mischief-input]("Mischief.Input"). Read input from the player.+-- * [mischief-math]("Mischief.Math"). Transforms and algebra.+-- * [mischief-render]("Mischief.Render"). Render stuff and write shaders.+--+-- Feel free to open an issue or PR in the [official repo](https://codeberg.org/mischief/mischief) if you want your library to be added to this list.+-- The ["AI" policy](https://codeberg.org/mischief/mischief/src/branch/main/AI_Policy.md) applies.++-- $community+-- You can keep in touch with the maintainers and the rest of the community by joining the official [discord server](https://discord.gg/WcpPqrwpuk).++-- $contributing+-- You can contribute to the official Mischief repository by opening issues to request features or report bugs. PRs may also be accepeted.