Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hey man no worries.

Well I don’t particularly see a problem with the way you’re texture mapping, however to overcome that fish-bowl distortion I think you should try casting a ray for each pixel column of the screen and work out the angle of the ray that way, rather than shooting a ray at each angular increment of the fov.

I would be interested in checking out your engine btw, if you ever released it somewhere.

I only released the source, this was written in Blitzbasic. I was playing with the idea to port it to JS as a test for my BB2JS project. Then I'd had used the imageData object to render the frame and "put" it onto the canvas, seems pretty straight forward. But then I get stuck in WebGL ^^

Really not much to see in that sourcecode. But what I would suggest to you is to implement mipmapping. Just auto-downscale the textures to a set of 256, 128, 64, 32, 16, 8, 4, 2 and 1 pixel size, and read from the one defined by the distance to the camera - it's cheap in terms of cpu load. And it prevents blinking details at a distance. The additional UV calculation can be achieved quickly by shifting the bits to the right.

I thought you may find this funny too:

https://jfkeo1010etc.itch.io/ascii-maze

Hey man, sorry for the late reply. I was pretty occupied with my actual dayjob. XD Anyways, thanks for sharing this with me.