> > Hello I just gonna ask for pure optimization questions.Is it possible to render not in 640x360 resolution but something smaller like 1/4 of that because I need really long rays for some places due the fact its kinda open world kind project. I saw in your teasers that you have textures on floor and ceiling so if its plugin or something else? Will this engine transparency? Because if will then I could use just walls for roads in my project.
> > Thanks.
> You can basically lower the project resolution and tell via global variables to use fewer rays, e.g. 320 px. Therefore you could utilize longer ray distances. The key performance boost is to test against fewer instances. The C2 version uses sprites as walls, and you have to test against each instance.
> The C3 version uses a single tilemap object (as showcased in the Youtube videos), which is a single instance. With some clever math figuring out the texture and wall angles, this means a massive performance boost.
> The floor and ceiling textures are not raycasted. In fact, they are rendered through sprites with the mode7 effect applied, then more or less correctly altered through player position and angle.
So using Mode 7 I could create floors. OK I have plugin and effect but in video is this repeated texture or one large? because for creating road like effect I'll need use large texture or chunks of said texture? And how proper use that effect because I kinda tried but if I set it as one its just white floor or just flys in very quick speed, anyway mode 7 for floor.
The best bet is to use a single big texture. You have to flip the image / rotate it though, as the sprite gets transformed by the mode 7 effect.
You have to factor in the players viewport angle.
mode7 x: Player.X / scrollingfactor + cos(Player.Angle)
mode7 y: Player.Y / scrollingfactor + sin(Player.Angle)
scrollingfactor is related to player viewport height and screen resolution / mode7 object height and has to be tweaked.
Also keep in mind for FPS purposes, the horizon line has to be at Y viewportheight /2.