well i don't know if this topic is already here but we should try to deal with optimizations to routines to get a new raycasting environmet, i have created one that i pretty fast but i want it even faster for that we should discuss ways and optimizations for routines... for now i want to know if there are anyone that wants to help me with this project
this is certainly an interesting project. do you want to post your current routine and some screenshots so we can look for optimizations?
for now i'm more concentrated in create optimized routines like

div_by_64:
ADD HL,HL
ADD HL,HL
LD L,H
RET

this routine divides an number in HL by 64 this only work for numbers below 16384, the code will happear when i create great part of this routines....

Mult_HL_by_64:
LD B,H ;// 1024 = 0000 0100 0000 0000
LD H,L ;// by 64 = 1 0000 0000 0000 0000
LD L,0 ;// using my method =
SRL B ;// 0000 0100 0000 0000 0000 0000
RR H ;// 0000 0010 0000 0000 0000 0000 div by2
RR L ;// 0000 0001 0000 0000 0000 0000 div by 4
SRL B ;// As we only considere the H and L registers it ill overflow
RR H ;// this method as the advantage of not overflowing directly the register
RR L ;// because the result returns in BHL
RET

this routine is an faster version of multiplying by 64


for example an optimized version of this peace of code
Round down( PY/64) * 64

is equal to

RoundDown: ;// Round a value present in HL down , this means erasing 6 bits present in A
;// we are only care about the lower part the upper part will be intact
LD A,%11000000 ;// the same of Round down( PY/64) * 64
AND L
LD L,A
RET

as you see they are faster than the version's of what other people do... people can use this routines but give some credit... if you think you can even optimize this well do it... and these two routines are very used on raycasting systems normally the div by 64 one...
today i have breacked with myself and decide to do a litle more programming over the raycaste engine i made it without a single division and it gots an upgrade of 30% in speed, even better i'm creating a new and fast multiplication routine that takes only in the worst case 141cycles
So how many polygons / second will your engine be able to render now, best/ worst/ average case scenarios?
it can raycast a scene with only 2000cycles of clock used including floor and sky... more precisle it only uses 2000 cycles more or less to create the image seen by the user.... counting with the copy to the screen
Huh, that's pretty decent, actually. I wouldn't mind playing around with this when you finish.
Do you have any working code?? I would really really like to see a screenshot if you could. Smile
for now only the library is finished, games that use it have to be created...
well can we see a demo scene get rendered?
Yeah, that is all I was asking for, just throw some code together to show us some of its capabilities. Smile
Do a simple corridor, or even the standard rotating cube.
ok i will try to do it the next weekend, because this weekend i have to study for the matlab exam....
no ive time for it well only somedays till the next exam but i'm envolved in the texturemapper that is using on the worst case 500000cicles for putting an black imag on screen... i've to optimize it...
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement