Let's say I have a code like the following.   Crafty.c("SomeType",{//do something... }); var obj=Crafty.e("SomeType");   Can anyone tell me whether there is a function to check the type of the object?  Ex:   Crafty.isComponent(obj...
I've been trying to fix this for about 3 days now, and I can't seem to find why it doesn't work.  I've got this function, which loads an image, and loads through all the pixels to create a grid of walls for A* pathfinding. I'm usi...
I am starting to learn and develop games in Javascript.  I was just wondering if there are websites for Javascript game development analogous to http://pygame.org/news.html. Pygame/Python was the first language I learned how to develop games on, and...
I'm trying to make a CraftyJS scene size 100x100 pixels to display exactly as 100x100 pixels in mobile Safari on iOS.  The code is essentially this:  function init() { // Start crafty      Crafty.init(100, 100); Crafty.canvas.init(); Crafty.backg...
i've some problems with craftyjs, collision and polygons.  Here is my code: http://jsfiddle.net/haenx/85mhj/  As you can see, the player will hit the enemy each time both boxes are overlapping. But the given polygon has another form and it semms...
I'm trying to add a button to an app that uses Crafty, but, unlike the other buttons, I want this one to redirect the user to a different URL.  Notice that no-one ever taught me how to use Coffee or JavaScript, so I'm really new.  I'm try...
I am working on a top down video game with the crafty.js game library and I keep having to repeat a piece of code to make borders and the background sprite, So i want to put it into its own seperate function and call it, the problem is whenever I do...
I have three components, Ground, Block, and Player. I want player to stop falling when coming in contact with both Ground and Block entities. I have tried this.gravity("Ground, Block"); and this.gravity("Ground", "Block"); but...
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 Hardpunch is it possible to change the character width when playing a spe...
I've been trying to build a game using Crafty.js. I have an image that serves as a button, and once the user clicks on it he will be led to the next page. However, for some reason the mouse click just isn't firing. Any ideas?  Crafty.scene(&#...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.