Devana how a browser game is made

15Mar/1114

webGL experiment

I had a school assignment for today. Some algorithm optimization using Newton's discrete method.
The fun thing is that I got to display f(x, y) type functions in 3D space. I chose to do so using the new webGL draft from the html5 suite.
It was a whole lot of fun making it. A colleague created Newton's method code while I just wrote the 3D rendering stuff.

Here's the link: http://devana.eu/misc/newton/newton.html
Keep in mind that since this is a very new draft (v1.0 released on March 3, 2011), not all browsers currently support it.
At the time this post was written, the script was tested and worked on Chrome and Firefox 4 Beta. It might also work in Safari, but It needs testing.

This will surely be a thing of the future as I'm sure lots of great games/applications will be made using it. Even more once the support across browsers will be wide spread.

hints:

Make sure to first press "compute" and then "draw" for the script to work properly.
Also, here is a set of functions I used to test this script:

Math.pow(1-x, 2)+100*Math.pow(y-Math.pow(x,2),2)
x*y
Math.sin(x)*Math.cos(y)
Math.pow(x, 2)-Math.pow(y, 2)
Math.pow(1-x, 2)+100*Math.pow(y-Math.pow(x, 2),2)

For the last one to display properly, use a "z scale" value of 0.0007 as that function conjures high Z values and they won't show up nicely with the default 1 "Z scale".

Enjoy. :)

Filed under: misc Leave a comment
Comments (14) Trackbacks (1997)
  1. very good, but when you will write for devana 2.0 ? We all wait. When you will finish wth your courses and will make it? :D

  2. Believe it or not but I’ve learned quite a lot during this time.
    I will post a final core tweak in about 1 or 2 weeks. The plan is to do it by the end of next week.
    These things really cannot be rushed, else you get a big mess of code that might be functional but will not be efficient.

  3. and what we will see in this final core? I think it won’t be the finish core.

  4. great dude, but it didn’t work on firefox 3, will try it on my google chrome :D

  5. dear devland, if you are hosting your website from your home, tell me how you have did it & thanks

  6. Thanks alot for this great information, highly apreciated. Perhaps you can mail me i have some questions?

  7. well, i didn’t see any devana 2.0 progress. hm.., i think devana was a dead project, oh well :(

  8. Hi, I noticed You uploaded files directly to devana.eu site, are the files on the sourceforge also refreshed?

    By the way, checkout the github, it’s a very nice solution for the source control?

    Thanks, Alex

  9. devland im sure you are very busy in real life, but it has been 1 year and several months since last production devana release. Could you at least give us a less approximate dateline for the “final” core you said you would release more then a month ago in the other blog post?
    I want to assure you im not being unnapreciative or trying to rush you, its just that im so excited for the new release, and the wait is starting to be very painful :)

  10. you idiot … DONATE TO HIM !

    why would he release this? for you? you will leech it and star making money on it.. gtfo

    • Fuck off, i donated a long time ago, and i have no interest opening a commercial project with devana, im just interested in the new programming solutions hes going to adopt (im an everlearning php learner); also i wouldnt want the project to die out and given the time its taking, it scares more always more.

  11. Well it is a good project.
    i look forward to see dev 2.0.

    i know programming takes some time.
    its not something you can do right away.
    In these post i see only very much numbers haha i am not good in numbers,
    bud good job with this project!


Leave a comment

(required)

*
= 3 + 8

review software