Tagged Questions

Crafty is a Javascript-based HTML5 game engine. http://craftyjs.com/

learn more… | top users | synonyms

0
votes
0answers
17 views

Crafty Bind “createView” to viewport - TiledMapBuilder

Is there any way to bind the createView function to the player entity? For Example: I am moving forward and the map is automatically loaded. I call the Map with: Crafty.e("2D, DOM, ...
0
votes
0answers
17 views

changing sprite coordinate when defining a new reel in crafty.js

this is my jsfiddle : http://jsfiddle.net/B5UsC/18/ this.bind('KeyDown', function () { if (this.isDown('A')) { this.__coord[0] = 57; ...
0
votes
1answer
51 views

Crafty - How to get the id of the collision element?

As the topic says, I want to know how to get the ID of an active colliding entity. My Player Entity is called with Crafty.e("Player") Please notice, that I do not want the ID of my Player Entity. ...
0
votes
1answer
60 views

animating a spritesheet using crafty.js

this is my jsfiddle : http://jsfiddle.net/seekpunk/ek6ub4u5/1/ i don't understand what i am missing it's been three days now working and trying to do the animation but i am stuck ...
0
votes
1answer
712 views

Loading tile maps from files on the fly in Crafty JS

I'm fairly new to Crafty and have been having problems loading large world maps. So i have a world split up into multiple js files. They are represented by two arrays of tiles: one for background ...
0
votes
1answer
163 views

Rotate 2d sprite towards pointer

I'm using Crafty.js and am trying to point a sprite towards the mouse pointer. I have a function for getting the degree between two points and I'm pretty sure it works mathematically (I have it under ...
1
vote
2answers
275 views

Optimize DOM game performance

I am working on a game developed on DOM using Crafty JS framework, and Greensock GSAP JS (http://www.greensock.com/gsap-js/) for animations. It is my first time working with these technologies. I ...
0
votes
1answer
149 views

Play .mp3 with Craftyjs

I want to play .mp3 sound files in a game I built with Crafty.js. Is this possible without converting the sound file?
-3
votes
1answer
117 views

How do I detect when one sprite is moving away from another? [closed]

I'm currently working with crafty.js. I need to know how to detect when one sprite is moving away from another sprite.
2
votes
2answers
141 views

Gameover scene transition [duplicate]

I created a gameover scene in a crafty.js project but it does not run. Crafty.scene('gameover', function() { Crafty.background("#ccc"); Crafty.audio.stop("bg"); }); var gameOver = ...
2
votes
1answer
123 views

Stop music in crafty.js

How do I stop a looping music file from playing in crafty.js? I want the music to stop playing once a gameover condition has been reached.
0
votes
1answer
622 views

How do I make an entity move once per second in crafty.js

I am trying to implement "Snake" using crafty.js but I can't seem to get the snake entity to move just once in a second. How do I do this?