-2
\$\begingroup\$

at the moment i'm developing a 3D-Vector-Coordinates-to-2D-Canvas-Calculation.
the code is ready, the canvas too, but something doesn't work right...
You can find my code at www.philip-maerz.de/game/enginetest/engine.js

I've posted my question already on computerbase.de, but there nobody could help me...

Already now, thanks for your answers ;)

Greetings P.M.

\$\endgroup\$
3
  • 4
    \$\begingroup\$ Hey PM, welcome to the site. Unfortunately these types of questions are not a good fit for the site. Essentially this is "Here's my code, where's my problem?". You'll need to narrow down the problem to a small section of code, try to solve it and it you can't tell us what the problem is, how you tried to solve it, and why it didn't work. See the FAQ about what types of questions to ask here. \$\endgroup\$ – MichaelHouse Oct 13 '12 at 15:44
  • \$\begingroup\$ Well, that IS my problem. I tried to figure out where the problem is, but no one saw anything and the browser keeps saying: "script isn't answering"... I debugged it with firebug, until there was no more fault, but this failure continues... \$\endgroup\$ – Philip März Oct 13 '12 at 20:32
  • \$\begingroup\$ Please read this and update your question: mattgemmell.com/2008/12/08/what-have-you-tried \$\endgroup\$ – Maximus Minimus Oct 13 '12 at 21:15
1
\$\begingroup\$

This line is the problem:

 for(var i=0;i<numberpoints;i+2) {

Change the i+2 to i += 2 because it is currently running as an endless loop.

\$\endgroup\$
0
\$\begingroup\$

If I may recommend, PlayN is a very interesting game engine, in that it has direct support for both desktop and HTML. It is started by some Google people, and was actually used for porting Angry Birds to HTML. Check it out at https://code.google.com/p/playn/. They already have rendering to both Canvas and WebGL, all automatically done for you.

\$\endgroup\$
2
  • \$\begingroup\$ Ok, good point for future projects, but for this one, i need a specific one... For this reason i wrote it, otherwise i would have used this one ;) \$\endgroup\$ – Philip März Oct 13 '12 at 20:46
  • \$\begingroup\$ You can try asking your question on their mailing list... They should have a high concentration of web/HTML graphics people there. \$\endgroup\$ – mikijov Oct 13 '12 at 20:53

Not the answer you're looking for? Browse other questions tagged or ask your own question.