So i've been hard at work on my wolf3d raycasting clone, and have added floors, ceilings and furniture. For more information on what ray casting is, check out my previous video: https://yonnyzohardesignblog.blogspot.com/2020/04/were-still-dealing-with-pseudo-3d-retro.html Anyway, the furniture is drawn after being hit by a ray, except it is not drawn column by column like the walls, but rather as a single blit, and scaled by its distance. This means it looks the same regardless of angle, although you could always prepare in advance different images to be blitted at different angles (36 images to be changed every 10 angles for instance). The Floors however we a completely different story. I ended up using a technique called "mode7" - creating an off screen bitmap, equivalent in size to my map, populated with floor tiles. I then defined a near and far plane that stretched from the left most angle of my line of sight to the right most angle. I then began sampl...
We're still dealing with Pseudo 3D retro games - The creation of 3d worlds without using a 3d engine, models etc - but rather simple pixel manipulation on a 2d canvas.Today I'd like to show an example of the beautiful classic - Wolfenstein 3d - which was a pioneer in the pseudo 3d category.In previous posts we saw how to simulate depth on a static image of a road, by progressing towards an imaginary distance. We did so by drawing the pixels in each row of the road according to a set percentage that got smaller as we progressed towards the distance.In Wolf 3d the creators used a similar approach. They split the screen into columns and filled each column with a "wall segment". The height of each wall (the number of rows the pixels of each segment took up) was determined by the distance of the player to that wall.How do you calculate distance and depth in a 2d canvas? By using a technique called "Ray casting".You start out with a 2d map (can be seen in t...
My name is Yonny Zohar, I'm a game developer with six years experience. I've worked on several commercial titles including " Bingo Island ", and have recently made the move from flash development to html5. Six years ago, while i was learning flash, i worked simultaneously with html, CSS and js. back then my impression was that flash was simply light years ahead in terms of development ease, code maintenance and error handling. Returning now to html5 six years later, I was very weary - had things improved since 2009? I've spent the last several months hearing from everyone around me that the answer is a definite "YES". I'm here to say- the answer is still a definite NO! Lets begin this rant with my number one hatred - CSS: NO DEBUGGING - Debugging css is awful. you spend days trying to figure out why elements don't behave the way they should. Try adding and removing properties to elements hoping it will make them act the way you want or...
תגובות
הוסף רשומת תגובה