glf1311

Members
  • Content count

    7
  • Joined

  • Last visited

Community Reputation

412 Neutral

About glf1311

  • Rank
    Newbie

Personal Information

  • Interests
    Art
    Audio
    Design
    Production
    Programming
  1. Clashing Enemies

    Any reason why you posted your question twice?
  2. a few questions

    hi, you could try out [url="http://zetcode.com/tutorials/javagamestutorial/"]this[/url] site regards GLF
  3. looking for a certain tutorial

    Well, first thing to say: i do not know the site you mentioned, but you could try [url="http://zetcode.com/tutorials/javagamestutorial/"][u]this[/u][/url] one. Regards GLF
  4. actually u are calling both render and moveCube once, but in your render function u request an AnimationFrame which makes sure that your render function is called 60 times a second.As your moveCube does not request such an AnimationFrame its just called once. You could either fix that by adding an RequestAnimationFrame-call to it or , and this is the way i would do it, by calling moveCube inside your render function. Here is a example how u could do it [url="http://jsfiddle.net/ywarw/2/."]http://jsfiddle.net/ywarw/2/.[/url] regards glf ps: if u found this useful feel free to click the "up"-arrow
  5. Your mistake is that u call requestAnimationFrame AND setInterval. setInterval calls your render function every 5sec and render calls requestAnimationFrame which makes sure ur frame is drawn 60(?) times a second. Now everytime setInterval calls render another AnimationFrame is requested and ur frame is drawn additional 60 times a second. I would try something like this http://jsfiddle.net/ArCW2/1/ Regards glf