Raycasting Wall Texturing
I have the engine working, and right now, the walls are solid colors. How would I go about slicing 64x64 textures to render onto the walls?
This is the code for rendering walls, it should be all you need to get the gist of drawing one kind of texture on all walls:
g.fillRect(sliceColumn, wallTop, 5(SliceWidth), wallHeight);
You only have to give me a basic outline of how to render one type of texture on ALL walls, if you can help me do the slicing, I can do the individual wall texturing. Unless you want to help me with that part too, haha.
Re: Raycasting Wall Texturing
Is there any java programming you need help with?
Re: Raycasting Wall Texturing
I posted this in theory and questions. This is leaning more on theory.
I need help on splitting 64x64 images into strips that fit onto the strips of wall I render in raycasting. I just can't do this, because I don't know how to efficiently go about splitting the images. I need a command that can use doubles, but most of buffered image commands use ints. Rendering them virtually useless to my cause.
Re: Raycasting Wall Texturing
I have never understood how you can extract 11.23 pixels from an image. Or change the pixel at x=23.5, y=33.4
have you looked in the Java tutorial to see if there are any topics there of interest.
Perhaps Java2D. Go to this site and have a look:
The Really Big Index
Re: Raycasting Wall Texturing
Quote:
Originally Posted by
Norm
I have never understood how you can extract 11.23 pixels from an image. Or change the pixel at x=23.5, y=33.4
have you looked in the Java tutorial to see if there are any topics there of interest.
Perhaps Java2D. Go to this site and have a look:
The Really Big Index
Thanks, but I may just try another website. I've never really like the way java tutorials explains things. Don't get me wrong though, I am thankful for the assistance you have given me!
Re: Raycasting Wall Texturing
Round your doubles to the nearest integer and then use the BufferedImage API.
Re: Raycasting Wall Texturing
I guess some students need their hand held a bit more. One of the things you need to learn is how to use the existing documentation.