Topic: Raycasting engine (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=31313" title="Pages that link to Topic: Raycasting engine (Page 1 of 1)" rel="nofollow" >Topic: Raycasting engine <span class="small">(Page 1 of 1)</span>\

 
der redsplat
Nervous Wreck (II) Inmate

From:
Insane since: Jun 2009

posted posted 09-16-2009 19:46

Hey guys!

I'm working on a raycasting engine in JavaScript and I was wondering about this. What is the best way to render a raycasting engine? In DHTML or canvas? I've been looking around on the internet for different engine and it seemed to me that those made in canvas had higher quality.

But what do you think?

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

posted posted 09-17-2009 12:00

If you do basic raycasting ( Wolfenstein 3D style ), DHTML is totally fine and using the z-index of the slice elements makes the addition of sprites ( enemies, items, ... ) a walk in the park.
Using Canvas, is easier than the DHTML approach ( no need for clever texture management in the slices and such ) but adding sprites requires a bit of discipline to draw things in the correct order although that's nothing really difficult.

Bare in mind that there are significant differences across browser when zooming images in HTML and with Canvas. You should really try your code in various rendering engines, and maybe with different texture/sprites resolutions.

der redsplat
Nervous Wreck (II) Inmate

From:
Insane since: Jun 2009

posted posted 09-17-2009 17:29

Thank you! Do you know if there is any difference in the perfomance between DHTML and canvas rendering?

thenewobjective
Obsessive-Compulsive (I) Inmate

From: Earth
Insane since: Feb 2008

posted posted 09-29-2009 02:25

Canvas rendering can be significantly faster, but the downside is that you will lose support for Trident based browsers unless you use a fallback.

coach
Nervous Wreck (II) Inmate

From:
Insane since: May 2011

posted posted 05-31-2011 11:04
Edit TP: spam removed


Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu