Quote: "Cliff, man, I don't know how you got it to raycast on my laptop at a pretty even 70-90 FPS. Your engine is smooth!"
Thanks!
Always nice to read
Quote: "Hmmm. Any progress so far ?"
Iam currently rewriting larger parts of the raycast engine to make it faster!
And are working on the z depth buffer.
And i am going to try to write the renderer to draw everything in one phaze as fast as possible and in multiple layers.
Iam going to check all ray collisions once and store them to draw them all in one phaze.
Its hard to explain as its mostly stuff that no one will first notice ?
But will improve overall performance when i throw in doors,enemys and lights etc.
Hopefully will i then also be able to draw the floor easier and faster?
Will probably take a short while until the next beta demo.
Iam also going thru the code to make it simplier to understand if some one else maybe gets the code later on
edited...........
Last night so did i rewrite the screen columns to only use one sprite that i paste on screen.
The old one used the same amount of sprites as the raycastings amount of rays.
But then did i get an speed drop by 10 fps! But will make the engine alot easier to understand ,and to work with for someone that havent written it from start.
Iam also experimenting alot with constants and types.
Like the rays starting angle is always the same and can be an constant.
You only nead to update the players angle in the raycasting when you have turned.
So i turned it in to an Player.Direction type that only updates when you turn.
Only these two changes made the fps bump up to 98-100 from 94-96 that i got from removing all the sprite columns.
Going to experiment some more now
Constants and global types are very usefull and fast when used right
Maybe iam starting to become an wannabe coder level 2 now
You can only love dbp for its easy and simple language