Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Releases: oakes/play-cljs

0.10.1

18 Feb 23:17
Compare
Choose a tag to compare

This release adds flip-x and flip-y to the :image element to make it easy to flip images. You can see examples of flip-x being used in the super-koalio project. Thank you very much to Github user rsnara for the PR.

0.10.0

29 Jan 01:56
Compare
Choose a tag to compare

This release updates p5.js to 0.5.6. Additionally, it makes use of the "inferred externs" feature in ClojureScript 1.9.456 to allow advanced compilation! I've been waiting quite a while for this, as it is critical for good performance, especially as your game gets more complex. I have recompiled all the example games linked in the play-cljs-examples README to use advanced compilation.

0.9.0

29 Jan 01:56
Compare
Choose a tag to compare

This release adds the :animation element, which allows you to flip between various elements (such as :image elements) based on a set duration. See the docs for a small example, or see super koalio, which now uses it to display the walking animation.

I also simplified :image and :tiled-map elements, so you can display them using just the associated name, rather than having to pass the actual object directly to it. In other words, you can do this:

; in your on-show
(p/load-image game "player.jpg")
; in your on-render
(p/render game [:image {:name "player.jpg"}])

; in your on-show
(p/load-tiled-map game "dungeon")
; in your on-render
(p/render game [:tiled-map {:name "dungeon"}])

0.8.0

29 Jan 01:57
Compare
Choose a tag to compare

This release prepares the library for the forthcoming "inferred externs" clojurescript feature. This will finally allow us to compile the library with advanced compilation. We still need to wait for a new release of clojurescript to come out to take advantage of it. Note that you will need to enable the :infer-externs compiler flag to make use of this, like so.

Secondly, there is another small breaking change: I removed the stop function. It was essentially pointless.

0.7.0

29 Jan 01:57
Compare
Choose a tag to compare

This release includes a breaking change that removes the on-event function from screens, and the second argument from the start function. This functionality provided no improvement over adding event listeners directly. It should be quite easy to transition your code. See this diff as an example of how to move code from on-event into a standard event listener:

oakes/play-cljs-examples@eb12b54

0.6.5

29 Jan 01:59
Compare
Choose a tag to compare
Don't use parent object so games can work in iframes

0.6.4

29 Jan 01:58
Compare
Choose a tag to compare

This release updates p5.js to the latest version. I also removed the ability to display multiple screens at once. This ended up being a fairly useless feature that incurred a performance penalty on everyone. Now, only one screen can be displayed at a given time.

0.6.0

29 Jan 02:01
Compare
Choose a tag to compare

This release adds support for tiled maps! Using the Tiled map editor, you can export your map as a JavaScript file and then import it into your game before the main.js. Then you can use the new load-tiled-map function to bring it in. I demonstrate how to do it in the super koalio example game:

Demo: https://oakes.github.io/play-cljs-examples/demos/super-koalio/

Code: https://github.com/oakes/play-cljs-examples/tree/master/super-koalio

0.5.0

29 Jan 02:02
Compare
Choose a tag to compare

This release adds the generate-image function, which allows you to pass any valid data structure and it will render it off-screen and return an object that you can pass to :img to display it. It also adds :rgb and :hsb which allow you to set the color mode for anything within it. You can see examples of all of these in the shapes demo.

0.4.0

29 Jan 02:02
Compare
Choose a tag to compare

This release adds :bezier and :curve and improves the behavior of :fill and :stroke. I still have no documentation so this may be largely useless at the moment. You can check out the shapes.core file for a totally random assortment of examples, which looks like this little oddity when run. Tons of more work to do but for now I'm coalescing around this idea of "game entities as hiccup-style data structures" and seeing how far I can go with it.