Live data from Hacker News

Show HN: A puzzle game inspired by functional programming, written in PureScript

david-peter.de

31–40 of 50 posts

Re: Show HN: A puzzle game inspired by functional programming, written in PureScript

#31
post #19
post #9

PureScript is a game changer. Compilation is fairly simple (unlike GHCJS), full Haskell'ish type system and modern/compact syntax, picked up a lot of momentum lately. It find it by far the best AltJS implementation currently available. Have a look at the code implementing the transformer functions, so clean! https://github.com/sharkdp/cube-composer/blob/master/src/Tra... Nice demo!

Thank you! I started this project with plain JS + lodash, went on to JS + ramda and ended up using PureScript. I absolutely recommend it. I also have been using Haste before (Haskell to JavaScript), but I really like the lightweight architecture around PureScript, the super-simple FFI and the generated JS.

Thanks for these insights. I used the Fay project to compile Haskell to JS for some time. But in the next overhaul I probably switch to GHCJS, as for my project interop with server-side Haskell code it a requirement.

If I did not need that interop I go for PureScript in a heartbeat. CoffeeScript/TypeScript/ES6/Opal, they all don't come close to what PureScript delivers.

Re: Show HN: A puzzle game inspired by functional programming, written in PureScript

#34
post #2

This is still work in progress. I would love to hear your feedback. GitHub link: https://github.com/sharkdp/cube-composer

* Rather than saying to hit 'R' to reset have a button (keyboard can work too, but only allowing the keyboard goes against the rest of the game which is mouse/touch driven).

* On the right have the words "Goal" on top of the image, maybe put a box around it or something to separate it from the other images that appear.

* For the first level you need a "pit of success". Limit the available functions to only the one that works.

* The first few levels need to introduce and teach the user how to use each and every function separately. Say for 12 levels the first three teach/introduce a concept, the next 6 are actual simple/medium levels and the final 3 are the more difficult (but not impossible) levels before repeating and introducing a new concept.

* When you solve it don't put the message up top in little text, but next to the program and bigger bolder so the user knows. Ideally with some sort of css transition.

* When you solve it put a link to "Play next level" or automatically go to the next level after a short animation or something

* Only expose levels after you have beat them.

* After doing a function rather than instantly showing the next cube put a .5 second opacity transition (or something) so the user will notice what they did.

Lastly, but most importantly play test in person. Show someone your game, but don't say a single word. Write down everything they do wrong and debate how you can improve it and try again. Do not give them advice on what to do. If they can't figure it out neither will a ton of random people on the internet (I didn't the first time I saw the game and just closed it as I didn't realize I had to drag it over and I was on a tablet and saw the 'R' command and figure there was other keyboard only commands.)

Remember it is not fun to lose. Hard is fun, but you want to guild the user to have fun, be challenged, and build on the game concepts you have taught them. It isn't fun to give up because you have no clue what to do.

If you build in a way that users can create puzzles and share them (say by putting the user generated level in the url) the game would have more life as users spread the word by showing off their creations.

Re: Show HN: A puzzle game inspired by functional programming, written in PureScript

#35
post #34
post #2

This is still work in progress. I would love to hear your feedback. GitHub link: https://github.com/sharkdp/cube-composer

* Rather than saying to hit 'R' to reset have a button (keyboard can work too, but only allowing the keyboard goes against the rest of the game which is mouse/touch driven). * On the right have the words "Goal" on top of the image, maybe put a box around it or something to separate it from the other images that appear. * For the first level you need a "pit of success". Limit the available functions to only the one th…

Wow! Thank you so much for the detailed feedback. This will be very helpful for the future development. Most of these are 'small/easy' changes but I definitely see how they will improve the user experience. I think I agree with all of your points and will try to use it as a roadmap :-). The 'play test in person' tip is also very helpful. I will try this!

Re: Show HN: A puzzle game inspired by functional programming, written in PureScript

#37

Always nice to see isomer [0] in the wild :) Cool game - I hope the library didn't slow you down too much! [0]: http://jdan.github.io/isomer/

On the contrary. It was a pleasure working with Isomer! It's an integral part of the game .. thank you very much!

Re: Show HN: A puzzle game inspired by functional programming, written in PureScript

#38
Great implementation! I'm researching functional programming front-end solutions for my latest web app project. PureScript has been on my radar but would love to hear about others' experiences. Has anyone else here used PureScript? What was your experience like?

Re: Show HN: A puzzle game inspired by functional programming, written in PureScript

#39
post #34
post #2

This is still work in progress. I would love to hear your feedback. GitHub link: https://github.com/sharkdp/cube-composer

* Rather than saying to hit 'R' to reset have a button (keyboard can work too, but only allowing the keyboard goes against the rest of the game which is mouse/touch driven). * On the right have the words "Goal" on top of the image, maybe put a box around it or something to separate it from the other images that appear. * For the first level you need a "pit of success". Limit the available functions to only the one th…

> After doing a function rather than instantly showing the next cube put a .5 second opacity transition

Please, no animation. Instantaneous feedback is perfect as it is. My 2cts.

Re: Show HN: A puzzle game inspired by functional programming, written in PureScript

#40
post #2

This is still work in progress. I would love to hear your feedback. GitHub link: https://github.com/sharkdp/cube-composer

When you try to apply all functions, the space becomes limited and you cannot see the resulting piece, especially when it gets tall.
Post reply on HN