Quote: "I hope you did get some idea for drawing that floor "
It whas when i played dark forces after i bought it i got the idea to do the textures on the walls
Iam happy for all the input i can get
So keep on posting your ideas
Quote: "Hmmm. How's it possible you could draw walls but not floor"
The walls do you draw with screen columns that cover the screen.
The floor will you have to draw pixel by pixel and it neads to aligne to the walls and rotate centered to the player.
I cant use the standard way to only draw from the closest wall as iam going to have a bunch of see trhu stuff later on.
Quote: "Can't you do it the same way, but decrease the height of that 'wall-floor' to 0/1 so it's a simple line? But wait... it's not going to be filled then"
As you wrote your self will the floor textures then look weird when turning or i can only have single colour floor or ceiling.
Its a bit tricky as i want it to also work with future updates with multiple floor levels.
But thanks for the input!
Ps...
i made an floor renderer that actually sucked!
The fps dropped to 23 and it couldt be used at all!
Edited..............
Made some updates to my timed movement function if anyone wants it?
I wanted an small single function to do it!
And it seams smooth and fast so far?
before loop write this!!
type Timed_t a as integer ,b as integer ,c as integer ,d as integer ,e as integer ,init as integer ,spd as float endtype
global Timed as Timed_t
Then put this at the top of your loop!!
do
Timed(timer())
code bla bla bla
code bla bla bla
loop
here is the function!
function Timed(a#)
` Timed.e is how often to change speed (in milliseconds)/only used when the loop starts
if Timed.init=0 then Timed.a = a# : Timed.e = 1000:Timed.init=1
` don't change any of this!
Timed.b = a#
inc Timed.c
temp = Timed.b - Timed.a
if temp >= Timed.e then Timed.spd = ((temp)/1000.0)/Timed.c : Timed.a=Timed.b : Timed.c=0 : Timed.d=1 : exit
if Timed.d = 0 then Timed.spd = ((temp)/1000.0)/Timed.c : exit
endfunction
then to move something simply use!
move sprite 1,60.0*Timed.spd
And remember that the value before *Timed.spd must be an float!
Its an modification of
spookys timed movement
Edited....
replaced the dummy textures with new ones today and fixed the wall object counter.
A clear boost to the fps