Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

RayCast.js Engine

An advanced ray-caster engine written in JavaScript from scratch, with zero dependencies · By undefbehav

Looks great

A topic by jfkEO1010etc created Apr 03, 2021 Views: 155 Replies: 4
Viewing posts 1 to 2
(+1)

I like the skybox. Mouselook still not working while pressing "w" tho. Still, great progress, looks really cool.

Developer(+1)

Hey thanks! I never really realized until now that tiling up a few textures properly could make things a lot more look appealing to the eye. Other than that, some quality of life improvements were made in this version to the perspective-projection code along the y-axis of the screen.

I‘m currently in the process of migrating the project to a more “organized” and decoupled codebase. I will be dissecting it into 3 major modules–engine, game, and data. It should be complete soon, in the next version.

(+1)

Looking good, but I'd really love to see mouselook working during holding down WASD, so one can curve around corners. Maybe it's just on my browser. (brave). Keep up the great work. 

Developer (1 edit)

Hey man, thanks for checking out! The thing with the mouselook is that the mouse-move + pointer-lock API is acting weird depending on the mouse/browser used. I am getting more accurate movement when testing on the Brave Browser and using my laptop’s trackpad. Bluetooth mice also do not work that great. Also, I would suggest disabling any browser extensions that might collide with mouse tracking. Those aside, you can always use the arrow keys for freelook and curving around corners.

Ok, thanks. I had a similar problem, but in my case the reading of mousespeed was just much lower when a key was pressed. It must have something to do with incorrect event handling across all browsers, albeit to a slightly different degree. So I just took that mousespeed and in case of keypress I would multiply it by four or so. It's still noticeable, but much less. In your case, where there comes zero response, I would guess you are using integers that got rounded to zero. In any case have a look at my third person camera script in the mini3Dsoundengine.js project. It replaces the built in camera script of the coppercube engine, but should work with anything js in essence. I think I specifically remarked that part, where I multiply the mouse speed depending on keypresses. Well, it's a hack ^^