city41 / reagent-breakout Goto Github PK
View Code? Open in Web Editor NEWThe game Breakout implemented with Reagent
Home Page: http://city41.github.io/reagent-breakout/
License: Eclipse Public License 1.0
The game Breakout implemented with Reagent
Home Page: http://city41.github.io/reagent-breakout/
License: Eclipse Public License 1.0
These examples pretty much say it all. Will make the event handling cleaner and more powerful.
Should probably also be able to add only one click handler and one mousemove handler for the life of the game
Add sound effects, they are located here
Need the CSS to be responsive so that on a mobile device only the game is seen.
Need to hook into touch events to move the paddle.
Hi,
I'am currently looking around for a nice game engine for some side project. I've been playing with react for some time and really like the whole concept. Being able to use it in a side project would be incredibly helpful to learn it better.
But I'am wondering if react is the right tool for creating games (in fact, I sincerely hope so) and what i'll loose compared to an established game engine like phaserjs, melonjs, etc. Maybe using react (and flux) for the whole architecture and passing the animations/rendering to something like snapsvg might do the trick.
This is not really an issue, I just want to hear what other, more experienced people, think about this. Most of the game examples are pretty basic but I have something RTS-like in mind, which is quite a different scope i guess. Any advice/recommendations you can give?
stop the madness.
Already forgot to add FF animations for the countdown, and there are no IE animations at all.
Currently when hitting the paddle the y velocity is deflected and that's it.
The velocities need to alter depending on where on the paddle the ball strikes, allowing the player some control in the direction the ball goes.
the primitive hit detection isn't cutting it. Not sure how far I want to take this, as this app is really just a proof of concept.
The hit detection algorithm only accounts for certain situations, and so often the ball can just plow through bricks.
The ball is animating itself with setTimeout
, this only works correctly the first time a ball is added. Need a more general approach.
Currently if a brick is hit, the ball deflects in both x and y. It should only deflect in one depending on which side of the brick was hit.
C:\dev\reagent-breakout>lein figwheel
Figwheel: focusing on build-id 'app'
Compiling ClojureScript.
Figwheel: Starting server at http://localhost:3449
Figwheel: Serving files from '(dev-resources|resources)/public'
Compiling "resources/public/js/app.dev.js" from ("src/cljs" "env/dev/cljs")...
←[31mCompiling "resources/public/js/app.dev.js" failed.←[0m
←[31mjava.io.IOException: ←[39m←[31mThe filename, directory name, or volume label syntax is incorrect←[39m
←[34m (Unknown Source) java.io.WinNTFileSystem.canonicalize0←[39m
←[34m (Unknown Source) java.io.Win32FileSystem.canonicalize←[39m
←[34m (Unknown Source) java.io.File.getCanonicalPath←[39m
←[34m (Unknown Source) java.io.File.getCanonicalFile←[39m
←[32m util.clj:79 cljs.util/mkdirs←[39m
←[32m closure.clj:818 cljs.closure/write-javascript←[39m
←[32m closure.clj:838 cljs.closure/source-on-disk←[39m
←[32m closure.clj:872 cljs.closure/output-unoptimized[fn]←[39m
←[35m core.clj:2559 clojure.core/map[fn]←[39m
←[36m LazySeq.java:40 clojure.lang.LazySeq.sval←[39m
currently ball movement is hardcoded to 2 pixels per frame. It should take framerate into account and use delta
to move the ball in a framerate independent manner.
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.