Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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.

share|improve this question

closed as too localized by Byte56, Darth Satan, Jonathan Hobbs, Ricket Oct 15 '12 at 14:26

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

4  
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. –  Byte56 Oct 13 '12 at 15:44
    
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... –  Philip März Oct 13 '12 at 20:32
    
Please read this and update your question: mattgemmell.com/2008/12/08/what-have-you-tried –  Darth Satan Oct 13 '12 at 21:15

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer

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.

share|improve this answer
    
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 ;) –  Philip März Oct 13 '12 at 20:46
    
You can try asking your question on their mailing list... They should have a high concentration of web/HTML graphics people there. –  MikiJ Oct 13 '12 at 20:53

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