Questions tagged [crafty]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
49 views

How to Prevent Entities Snapping Through Platforms

I am using crafty.js to make a platformer. I assigned the main player entity the default jumping controls and movement with .twoway() and used ...
0
votes
1answer
141 views

How to Detect Collision Between Entity and Viewport

I am using Crafty.js. I want the player to die when they hit the side of the viewport (they need to keep moving to stay alive). How do I detect a collision between the player entity and the side/edge ...
1
vote
1answer
80 views

Image Not Loading Crafty.js

I am experimenting with Crafty.js, and I have called .image() on an entity, and the image is not loading. When I look through the web inspector, I can see that the cloud entity exists, and that the ...
0
votes
1answer
464 views

changing a sprite width when playing a reel using Crafty.js

can anyone help me with this : http://jsfiddle.net/B5UsC/20/ you can see that the sprite animation is not rendering correctly when the reel is in the last frame when animating ...
0
votes
1answer
152 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 ...
0
votes
1answer
482 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
2k 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 (...
1
vote
1answer
575 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
430 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
180 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?
-4
votes
1answer
163 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
203 views

How to fix thi gameover scene audio transition? [duplicate]

I created a gameover scene in a crafty.js project but it does not run. ...
2
votes
1answer
163 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
1k 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?
1
vote
1answer
2k views

Crafty.js multiplayer platform game, keeping players in sync

I'm using crafty.js to create a very simple platform game. It doesn't need to stop cheating, it's actually just seeing other players move around, and it doesn't need to have collision detection ...