Hi, I want to test the capabilities of Halogen + Purescript for managing medium complexity board games. In order to test that I want you to create a Proof of Concept (PoC) in SVG that allows me to evaluate suitability of the technological stack. Instead of going through that myself (still learning halogen and svg) I’ve crossposted this to several freelancing sites, but maybe here I’m able to find truly Purescript developers and we can avoid fees of freelancing platforms.
So if you are interested, read the requirements below and send me a message stating why you could tackle this and how much it would cost me.
Requirements:
-
I need a component un Purescript using Halogen that is able to draw a functioning minimal boardgame.
-
It needs to be in Purescript and as idiomatic as possible, no React, no vanilla Javascript, no other frameworks. Purescript + Halogen
-
It needs to build and package the application using spago.
-
The graphical engine needs to be SVG. No OpenGL, no HTML5 canvas, just plain SVG. Library JordanMartinez/purescript-halogen-svg-elems could be helpful.
-
The frontend will have a dropbox with two options:
- Bitmap
- SVG
-
When selecting one or the other, the SVG element will load a predefined map in corresponding format and will load as a background image. As an example of image for background, pick any map from https://www.amcharts.com/svg-maps/ and create the bitmap version from the SVG one.
-
Both the SVG and Bitmap need to be local assets packaged during the
spago build-app
step. -
Superimposed in the map, there needs to be a grid of hexagons. The grid needs to cover the whole background image. See https://codepen.io/SanderMoolin/pen/BRLvNb as inspiration but mind that you need to cover the whole background.
-
If you clik with the mouse in the interior of the hexagon, the hexagon is filled in red, and the surrounding 6 other hexagons are in yellow, both with a transparency so we can still see the background map. Clicking again remove all the coloring.
-
In the webpage, when we display the map it is viewed using a viewport of 500x500, so only a portion of the map is visible.
-
If I left click and drag, the portion of the map that is displayed follows the mouse so we can see different parts of the map using this pan functionality.
-
Using the mouse wheel, I should be able to zoom in and zoom out on the map. Superimposed hexagons should resize accordingly.
-
When zooming out, stop the moment either the height or the width of the background image hits the size of the viewport.
-
When zooming in, stop the moment a single hexagon is being displayed.
-
Draw a square that could fit in an hexagon. It will act as a game piece. If I click on the piece, the effect will be to change the border of the rectangle making it thicker. There won’t be any highlighted hexagons as the default behaviour for empty hexagons.
-
If I drag the piece, the behaviour will be to move the piece until I release the mouse. The map won’t pan, only if the piece reaches on the borders of the viewport.
-
Instructions on compiling and running the code base need to be provided.
-
The code needs to act as a reference, so make the effort to making it as readable and understandable as possible.