facundoolano / advenjure-example Goto Github PK
View Code? Open in Web Editor NEWExample game for the advenjure engine
License: Eclipse Public License 1.0
Example game for the advenjure engine
License: Eclipse Public License 1.0
Hey, so I've been experimenting a bit more and I tried to separate out all the items into a different file i.e. from rooms.cljc
to items.cljc
and export the items much like npc-dialog
in dialog.cljc
.
Imported these as
example.items :refer [my-items]
But while compiling, I run into the following error message ( shortened for brevity). If it's not too troublesome, could you please show me around - I do miss the documentation)
Exception in thread "main" java.lang.ClassCastException: advenjure.items.Item cannot be cast to clojure.lang.IFn, compiling:(items.cljc:53:9)
Hi,
I stumbled across the Advenjure game engine while looking for something to get me up to speed on creating a project which runs in both Clojure and ClojureScript. Since I am a fan of the old-time text based adventure games, this looks like a marvelous choice! So I downloaded the advenjure example with the intention of first running it and then using it as a reference to create a new advenjure game of my own. Unfortunately, I ran into a snag right at the beginning.
When I try "lein run", the game appears to start up fine and displays the initial description, including the small table and contents. But typing at the prompt (@Bedroom [0] >) does nothing. The game appears to be hung.
When I try "lein figwheel dev", I get this error message: "java.lang.StackOverflowError: at line 29 resources\public\js\out\advenjure\verbs.cljc". I took a look at the source code, but I'm a long way from knowing how to debug this.
Any ideas?
Thanks for creating this!
Cheers,
Bob Pfeiffer
P.S. Here are a few additional notes which I'm including for completeness, but which I don't currently believe are related to my problems.
Both "lein run" and "lein figwheel dev" produce this warning as the game starts up "WARN ignoring checkouts directory ... as it does not contain a project.clj file."
I also tried doing "lein cljsbuild once main" and "lein cljsbuild once dev". They seem to work without issue, other than producing the same warning about the checkouts directory.
Hii @facundoolano
I'm really fascinated by textgames and I admire simplicity and elegance of clojure so I'm really diving deep into this engine but sadly while compiling clojurescript I ran into this error.
lein cljsbuild once main
Could you please help me out a bit?
Compiling ClojureScript...
Compiling "main.js" from ["src"]...
Compiling "main.js" failed.
clojure.lang.ExceptionInfo: failed compiling file:/Users/eklavya/Projects/bitworld/CLOJURE/advenjure-example/target/base+system+user+dev/cljsbuild-compiler-0/advenjure/game.cljc {:file #object[java.io.File 0x520e6089 "/Users/eklavya/Projects/bitworld/CLOJURE/advenjure-example/target/base+system+user+dev/cljsbuild-compiler-0/advenjure/game.cljc"]}
at clojure.core$ex_info.invokeStatic(core.clj:4617)
at clojure.core$ex_info.invoke(core.clj:4617)
at cljs.compiler$compile_file$fn__3420.invoke(compiler.cljc:1372)
at cljs.compiler$compile_file.invokeStatic(compiler.cljc:1338)
at cljs.compiler$compile_file.invoke(compiler.cljc:1318)
at cljs.closure$compile_file.invokeStatic(closure.clj:473)
at cljs.closure$compile_file.invoke(closure.clj:464)
at cljs.closure$eval5162$fn__5163.invoke(closure.clj:540)
at cljs.closure$eval5098$fn__5099$G__5087__5106.invoke(closure.clj:430)
at cljs.closure$compile_from_jar.invokeStatic(closure.clj:522)
at cljs.closure$compile_from_jar.invoke(closure.clj:510)
at cljs.closure$eval5168$fn__5169.invoke(closure.clj:550)
at cljs.closure$eval5098$fn__5099$G__5087__5106.invoke(closure.clj:430)
at cljs.closure$compile_sources$iter__5283__5287$fn__5288.invoke(closure.clj:870)
at clojure.lang.LazySeq.sval(LazySeq.java:40)
at clojure.lang.LazySeq.seq(LazySeq.java:49)
at clojure.lang.Cons.next(Cons.java:39)
at clojure.lang.RT.next(RT.java:688)
at clojure.core$next__4341.invokeStatic(core.clj:64)
at clojure.core$dorun.invokeStatic(core.clj:3033)
at clojure.core$doall.invokeStatic(core.clj:3039)
at clojure.core$doall.invoke(core.clj:3039)
at cljs.closure$compile_sources.invokeStatic(closure.clj:866)
at cljs.closure$compile_sources.invoke(closure.clj:855)
at cljs.closure$build.invokeStatic(closure.clj:1998)
at cljs.closure$build.invoke(closure.clj:1937)
at cljs.build.api$build.invokeStatic(api.clj:210)
at cljs.build.api$build.invoke(api.clj:198)
at cljs.build.api$build.invokeStatic(api.clj:201)
at cljs.build.api$build.invoke(api.clj:198)
at cljsbuild.compiler$compile_cljs$fn__5808.invoke(compiler.clj:60)
at cljsbuild.compiler$compile_cljs.invokeStatic(compiler.clj:59)
at cljsbuild.compiler$compile_cljs.invoke(compiler.clj:48)
at cljsbuild.compiler$run_compiler.invokeStatic(compiler.clj:168)
at cljsbuild.compiler$run_compiler.invoke(compiler.clj:122)
at user$eval5945$iter__5981__5985$fn__5986$fn__6004.invoke(form-init324699016811572542.clj:1)
at user$eval5945$iter__5981__5985$fn__5986.invoke(form-init324699016811572542.clj:1)
at clojure.lang.LazySeq.sval(LazySeq.java:40)
at clojure.lang.LazySeq.seq(LazySeq.java:49)
at clojure.lang.RT.seq(RT.java:521)
at clojure.core$seq__4357.invokeStatic(core.clj:137)
at clojure.core$dorun.invokeStatic(core.clj:3024)
at clojure.core$doall.invokeStatic(core.clj:3039)
at clojure.core$doall.invoke(core.clj:3039)
at user$eval5945.invokeStatic(form-init324699016811572542.clj:1)
at user$eval5945.invoke(form-init324699016811572542.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6927)
at clojure.lang.Compiler.eval(Compiler.java:6917)
at clojure.lang.Compiler.load(Compiler.java:7379)
at clojure.lang.Compiler.loadFile(Compiler.java:7317)
at clojure.main$load_script.invokeStatic(main.clj:275)
at clojure.main$init_opt.invokeStatic(main.clj:277)
at clojure.main$init_opt.invoke(main.clj:277)
at clojure.main$initialize.invokeStatic(main.clj:308)
at clojure.main$null_opt.invokeStatic(main.clj:342)
at clojure.main$null_opt.invoke(main.clj:339)
at clojure.main$main.invokeStatic(main.clj:421)
at clojure.main$main.doInvoke(main.clj:384)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:383)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: clojure.lang.ExceptionInfo: No such namespace: clojure.core.async.impl.protocols, could not locate clojure/core/async/impl/protocols.cljs, clojure/core/async/impl/protocols.cljc, or Closure namespace "clojure.core.async.impl.protocols" in file /Users/eklavya/Projects/bitworld/CLOJURE/advenjure-example/target/base+system+user+dev/cljsbuild-compiler-0/advenjure/game.cljc {:tag :cljs/analysis-error}
at clojure.core$ex_info.invokeStatic(core.clj:4617)
at clojure.core$ex_info.invoke(core.clj:4617)
at cljs.analyzer$error.invokeStatic(analyzer.cljc:610)
at cljs.analyzer$error.invoke(analyzer.cljc:606)
at cljs.analyzer$error.invokeStatic(analyzer.cljc:608)
at cljs.analyzer$error.invoke(analyzer.cljc:606)
at cljs.analyzer$analyze_deps.invokeStatic(analyzer.cljc:1708)
at cljs.analyzer$analyze_deps.invoke(analyzer.cljc:1687)
at cljs.analyzer$ns_side_effects.invokeStatic(analyzer.cljc:2559)
at cljs.analyzer$ns_side_effects.invoke(analyzer.cljc:2554)
at cljs.analyzer$analyze_STAR_$fn__2162.invoke(analyzer.cljc:2644)
at clojure.lang.PersistentVector.reduce(PersistentVector.java:341)
at clojure.core$reduce.invokeStatic(core.clj:6544)
at clojure.core$reduce.invoke(core.clj:6527)
at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:2644)
at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:2634)
at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:2659)
at cljs.analyzer$analyze.invoke(analyzer.cljc:2646)
at cljs.compiler$emit_source.invokeStatic(compiler.cljc:1239)
at cljs.compiler$emit_source.invoke(compiler.cljc:1219)
at cljs.compiler$compile_file_STAR_$fn__3397.invoke(compiler.cljc:1290)
at cljs.compiler$with_core_cljs.invokeStatic(compiler.cljc:1154)
at cljs.compiler$with_core_cljs.invoke(compiler.cljc:1145)
at cljs.compiler$compile_file_STAR_.invokeStatic(compiler.cljc:1279)
at cljs.compiler$compile_file_STAR_.invoke(compiler.cljc:1275)
at cljs.compiler$compile_file$fn__3420.invoke(compiler.cljc:1360)
... 60 more
Subprocess failed
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.