Integrated ClojureScript with Construct 2 Plugin

For developers using the Construct 2 Javascript SDK

Post » Sat Jul 11, 2015 2:42 pm

I'm very excited, so I had to share.

For those who don't know, ClojureScript is a modern Functional Lisp that compiles down to JavaScript using Google's Closure compiler. I like using it (and it's parent, Clojure) for AI development and controller logic.

Anyway, ... I figured in theory I could use it in the plugin for Construct 2, but as far as I know it hasn't been done before.

Success!

I just integrated some compiled ClojureScript (:optimizations :simple) with my custom Construct 2 plugin. I replaced the ClojureScript plugin's common.js with my compiled ClojureScript and called the ^:exported ClojureScript function from my runtime.js with no problems.

I'll write up the steps I went through and post a link for anyone that wants to try it, too.
B
29
S
16
G
23
Posts: 68
Reputation: 13,723

Post » Tue Jul 28, 2015 11:11 pm

I'd like to know how to integrate a javascript library for my plugin so please do! Thanks!
B
16
S
7
Posts: 46
Reputation: 1,344

Post » Wed Jul 29, 2015 12:37 pm

I was starting to think no one cared ;-)

Here are the steps for integrating clojurescript with construct 2 via a plugin. Doing so with a behavior would work the same way.

http://javajdk.net/tutorial/clojurescri ... nstruct-2/
B
29
S
16
G
23
Posts: 68
Reputation: 13,723


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 1 guest