File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Use of WebWorkers for gaming - HTML5 Game Programming question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Use of WebWorkers for gaming - HTML5 Game Programming question" Watch "Use of WebWorkers for gaming - HTML5 Game Programming question" New topic
Author

Use of WebWorkers for gaming - HTML5 Game Programming question

andrew ennamorato
Ranch Hand

Joined: Oct 03, 2007
Posts: 100
Web workers seem like an important addition to Javascript, especially in terms of gaming. Being able to run a 'thread' to calculate say, collision detection, seems valuable. Wondering if you cover web workers in the book at all, or if they are too much a pain to use due to their limitations (no access to DOM, for ex).

James Williams
author
Ranch Hand

Joined: Apr 18, 2009
Posts: 35
Andrew,

Web Workers are covered. Web Workers communicate with the host page via message passing. If you can modularize your code in such a way to separate the computation needed on a worker thread from say the UI drawing, you won't have a problem with not accessing the DOM from the worker.
andrew ennamorato
Ranch Hand

Joined: Oct 03, 2007
Posts: 100
Cool, good to hear. I haven't seen a lot on web workers re: the whole 'HTML5' thing (seems like web sockets, local storage and geolocation get most of the pub) so something to look forward to in the book.

Thanks!

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Use of WebWorkers for gaming - HTML5 Game Programming question
 
Similar Threads
hard workers vs smart workers
Are Europeans too lazy
Essential Java FX and game programming
Career in gaming industry
Money-making apps