Jump to content
Tuts 4 You
ritalin_

JS example

Recommended Posts

ritalin_

Hi, noob here ^^

With JS being used as a junk-tool half the time on the net, and with all the bugs in JS, is it possible to have JS -> Render code in sandbox -> Generates visual output without any code running on the computer side (Sort of like how video games are rendered).

xxx

Share this post


Link to post
evlncrn8

dont think thats quite how games are rendered somehow.. sure some is offloaded to the hardware for accelleration

the software still has to pass the stuff over though...

and if it was js, i really cant see you hitting a high frame rate unless the graphics were incredibly simple

 

Share this post


Link to post
evlncrn8

i dont think much of java script at all.. if you want performance compile native.. its that simple

Share this post


Link to post
Progman

I am assuming you are talking about a server-client model.  HTML5 now gives canvas objects and SVG rendering support.

Sure it is possible.  You could use tons of XmlHttpRequests to get JSON which yields values of pixels, or perhaps yields objects for an SVG style image.

But it would be really slow as was mentioned.  Pixels/images is probably way too much data through the network.

For practical purposes, if trying to protect the code, this would need to be a domain specific division of work between server and client.  Perhaps complicated and intricate initial or periodic renderings are done server-side, while most of the updates occur in the client.

I don't think JavaScript is that much junk, most of the engines are pretty stable and fast nowadays.  If you can avoid browser compatibility by setting a baseline HTML and JavaScript version, it makes things that much easier.  But the data processing required for images and videos and stuff is generally intensive enough to require GPU hardware or at least the CPU.

Share this post


Link to post
atom0s

Web sockets and HTML5 are already heavily used for all kinds of things online. WebGL and WebAssembly are becoming more and more stable and fine tuned as well which is potentially the future of in-browser rendering. There are several examples making use of it already showing off its power and ability to modernize browser tech etc.

I see nothing wrong with JavaScript though personally. Most of the hate it gets is pretty meh in my opinion, no matter what you are going to land up having some type of code running on your browser to accomplish what the web is doing these days, regardless if it's done in JavaScript or another language. 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...