Questions tagged [craftyjs]

Crafty is an HTML5 game engine written in JavaScript which helps you create games in a structured way. Its core features include Entities & Components, being able to use Canvas, DOM, WebGL and Event binding.

Crafty is an HTML5 game engine written in JavaScript which helps you create games in a structured way. Its core features include:

  • Entities & Components - A clean and decoupled way to organize game elements. No inheritance is needed!
  • Canvas or DOM - Choose the technology to render your entities, it will look exactly the same.
  • Eventbinding - Event system for custom events that can be triggered whenever, whatever and bound just as easy.

For more information, see http://craftyjs.com.

105 questions
0
votes
1 answer

Craftyjs buttons not working on tablet

I developed a browser game using Craftyjs, but I noticed that it doesn´t work on tablets even using browser there. Something strange happens as, the first click I make in the game from 7 options I have, always works fine, but the second click never…
Sascuash
  • 3,661
  • 10
  • 46
  • 65
0
votes
1 answer

CraftyJS how to make a ball move down and bounce

Is there any way to simulate velocity in an entity in Craftyjs.I am currently making a simple pong game and the ball needs to be "pushed" down,I can't just get it to increase its y value every frame beacause I don't know how to do loops.
0
votes
1 answer

How can I call a concrete Coffeecript function from html

I have an app that uses HTML, and Coffeescript in the frontend. I recently made it possible to change the language thanks to i18next. Now I have some buttons that change my window.userLang to the different languages, but the user has to refresh some…
Sascuash
  • 3,661
  • 10
  • 46
  • 65
0
votes
1 answer

Translating app with i18next

I'm translating my app using i18next, but it only translated part of the app. In my app, I use coffeescript with extension Craftyjs, and while some things as the buttons and some text have translated, other haven't. One example of what didn't…
Sascuash
  • 3,661
  • 10
  • 46
  • 65
0
votes
1 answer

craftyjs redraw on window resize

I am really new to craftyjs and I wrote a new game that created a full screen canvas. The game creates instance of board that draw a board with size of boardSize X boardSize: var Game = { start: function() { Crafty.init(); …
Naor
  • 23,465
  • 48
  • 152
  • 268
0
votes
1 answer

Binding events to entities in crafty.js

I am currently trying to learn how to use crafty.js to create games. Right now the square sprite is drawn, but I am unable to get it to do anything. Here is the code for my game: Game = { // Initialize our game start: function() { // Start…
user1539179
  • 1,835
  • 2
  • 16
  • 28
0
votes
2 answers

Creating text dialogues for Javascript game

I have a game where you interact with NPCs, and they give multiple answers. I've searched for tutorials and demos, but they are all mostly Unity related. I'm fairly new to Javascript, so I'm not sure where to begin with a text dialogue system that…
Naoto Ida
  • 157
  • 3
  • 13
0
votes
0 answers

Image not loading through node.js

I'm using the craftyjs library to load an image. Pretty basic. Crafty.load(['TestGame/assets/16x16_forest.gif'], function () { // do stuff after image loaded... This works fine when I run it from my file system, but as soon as I try running it…
Cavyn VonDeylen
  • 4,189
  • 9
  • 37
  • 52
0
votes
1 answer

How to use Javascript game engine with NAPA O365

I am looking to add a Javascript game to my Office 365 SharePoint site, and I can't seem to figure out how to add an engine such as Crafty https://github.com/craftyjs/Crafty? Is it even possible?
0
votes
0 answers

Getting data from a text area using Crafty.js with CoffeeScript

I've got some code working in CoffeeScript with Crafty.js. I've created a pop-up and want the users to write down register data, but, somehow, it's not working. Can you point me out where's the error? Here's the code: class registerDlg extends Dlg …
Sascuash
  • 3,661
  • 10
  • 46
  • 65
0
votes
1 answer

Crafty.js not showing correct response using CoffeeScript

I'm using Crafty.js, I recently added a button that is meant to show help info, the button works fine, and I get the return from the server correctly, but I keep getting errors. It'll be long to explain, so be patient. This is my code: where =…
Sascuash
  • 3,661
  • 10
  • 46
  • 65
0
votes
1 answer

How animate character size?

I'm trying to make simple js game using crafty.js. I have character that need to be more wide when it hit something, samurai with a sword. What can i do to make right animation. I have it for example 20x20 in default and walking state, but it need…
Rantiev
  • 2,121
  • 2
  • 32
  • 56
0
votes
1 answer

Calling a function or focusing a programmatically generated Iframe from an HTML5 canvas

I have an HTML5 canvas controlled and generated by a library of JavaScript files (Craftyjs library mostly). The canvas generates 2 regular html iframes (same domain) which are stacked on top of each other. The canvas switches between the two iframes…
0
votes
1 answer

Responding to Touch using Crafty

I'm trying to create a game using Crafty JS, that I eventually want to deploy via PhoneGap. Out of the box, the .fourway() method doesn't respond to touch on my Android device. Is there in-built support for touch? Is there a component I can use…
Brian Mains
  • 50,520
  • 35
  • 148
  • 257
-2
votes
1 answer

Game engine for Html5

I am trying to develop a game using Html5 for mobile App(iphone/ Android). Plz suggest which html5 game engine wil use. I found Crafty and Impact game engine enter link description here enter link description here Whether its will support all…
JohnRaja
  • 2,377
  • 6
  • 26
  • 47
1 2 3 4 5 6
7