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'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'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(...
I'm currently developing a small game for a class using Crafty, and our game requires the passage of time. To give context, it's a tamagotchi-like game where the player controls a creature and feeds it, grooms it, etc., when required, so we n...
In my HTML, I have a section in which I have JavaScript that adds an event listener which runs my game: <div class="content"> <script> window.addEventListener('load', Game.start); </script> </div> Ho...
I wonder if you can set me straight on some javascript I'm a little confused with. The code is over here: http://jsfiddle.net/Lbd5k5zh/. The piece of code that escapes me is: [...] // Locate this entity at the given position on the grid at: fu...
I'm new to JS and trying to override a function in Craftyjs, here is my code: Crafty.c('TestA', { init: function() { Crafty.addEvent(this, Crafty.stage.elem, "mousedown", this._e_clickListe...
This is a follow-up question to this I started using the localStorage function, and am unsure whether or not its working as intended. I want to overwrite a boolean in my JSON file. Player hits an exit in a stage, then it triggers the load of the n...
©2020 All rights reserved.