Daily Archives

Articles indexed Friday April 6 2012

Page 17/18 | < Previous Page | 13 14 15 16 17 18  | Next Page >

  • Creating new games on Android and/or iPhone

    - by James Clifton
    I have a succesfull facebook poker game that is running very nicely, now some people have asked if I can port this to other platforms - mainly mobile devices (and I have been asked to make a tablet version, do I really need a seperate version?) I am currently a PHP programmer (and game designer) and I simply dont' have the time to learn Android and other languages - so I have decided to pay third parties to program them (if viable). The information I need to know is what programming language is needed for the following four devices - Android mobile phone, iPhone, iPad and tablets? Can they all run off a central sql database? If they can't then i'm not interested :( Do any of these run FLASH? Have I covered all my main bases here? For example if a person programs for a ANDROID mobile phone is that to much differant to an ANDROID tablet? They will have slightly differant graphics (because the tablet has a greater screen area might as well use it) but do they need to be started from scratch? Same goes for iPhone/iPad, do they really need to be programmed differantly if the only differance is the graphics?

    Read the article

  • JBox2D applyLinearImpulse doesn't work

    - by Romeo
    So i have this line of code: if(input.isKeyDown(Input.KEY_W)&&canJump()) { body.applyLinearImpulse(new Vec2(0, 30), cam.screenToWorld(body.getPosition())); System.out.println("I can jump!"); } My problem is that the console display I can jump! but the body doesn't do that. Can you explain to me if i do something wrong? Some more code. This function creates my 'hero' the one supposed to jump. private Body setDynamic(float width, float height, float x, float y) { PolygonShape shape = new PolygonShape(); shape.setAsBox(width/2, height/2); BodyDef bd = new BodyDef(); bd.allowSleep = true; bd.position = new Vec2(cam.screenToWorld(new Vec2(x + width / 2, y + height / 2))); bd.type = BodyType.DYNAMIC; bd.userData = new BodyInfo(width, height); Body body = world.createBody(bd); body.createFixture(shape, 10); return body; } And this is the main update loop: if(input.isKeyDown(Input.KEY_A)) { body.setLinearVelocity(new Vec2(-10*delta, body.getLinearVelocity().y)); } else if (input.isKeyDown(Input.KEY_D)) { body.setLinearVelocity(new Vec2(10*delta, body.getLinearVelocity().y)); } else { body.setLinearVelocity(new Vec2(0, body.getLinearVelocity().y)); } if(input.isKeyDown(Input.KEY_W)&&canJump()) { body.applyLinearImpulse(new Vec2(0, 30), body.getPosition()); System.out.println("I can jump!"); } world.step(delta * 0.001f, 10, 5); }

    Read the article

  • What is better for the overall performance and feel of the game: one setInterval performing all the work, or many of them doing individual tasks?

    - by Bane
    This question is, I suppose, not limited to Javascript, but it is the language I use to create my game, so I'll use it as an example. For now, I have structured my HTML5 game like this: var fps = 60; var game = new Game(); setInterval(game.update, 1000/fps); And game.update looks like this: this.update = function() { this.parseInput(); this.logic(); this.physics(); this.draw(); } This seems a bit inefficient, maybe I don't need to do all of those things at once. An obvious alternative would be to have more intervals performing individual tasks, but is it worth it? var fps = 60; var game = new Game(); setInterval(game.draw, 1000/fps); setInterval(game.physics, 1000/a); //where "a" is some constant, performing the same function as "fps" ... With which approach should I go and why? Is there a better alternative? Also, in case the second approach is the best, how frequently should I perform the tasks?

    Read the article

< Previous Page | 13 14 15 16 17 18  | Next Page >