Statistics: Posted by heaven6502 — Sun Oct 26, 2014 6:39 am

]]>

goblinish wrote:

And one quwstion: how to remove hidden faces:

if (x1,y1)..(x4,y4) clockwise then formula is:

If (x2-x1)*(y1-y3)-(x1-x3)*(y2-y1)>0

if (x1,y1)..(x4,y4) clockwise then formula is:

If (x2-x1)*(y1-y3)-(x1-x3)*(y2-y1)>0

Think you can get away without multiplication...

Sort points based on Y coord and then check if line going from top point to the next point in polygon goes right or left.

If original polygon was sorted clockwise, projected one should also be that way if visible, so line should go right. (x2>x1).

I'm not 100% sure, just seems to me it could work

needs more calcs than the other method since you need to find out the slopes to know wich line is more to the right.

Statistics: Posted by Oswald — Sat Oct 25, 2014 11:09 am

]]>

Statistics: Posted by goblinish — Fri Oct 24, 2014 10:03 am

]]>

And one quwstion: how to remove hidden faces:

if (x1,y1)..(x4,y4) clockwise then formula is:

If (x2-x1)*(y1-y3)-(x1-x3)*(y2-y1)>0

Think you can get away without multiplication...

Sort points based on Y coord and then check if line going from top point to the next point in polygon goes right or left.

If original polygon was sorted clockwise, projected one should also be that way if visible, so line should go right. (x2>x1).

I'm not 100% sure, just seems to me it could work

Statistics: Posted by popmilo — Fri Oct 24, 2014 9:42 am

]]>

if (x1,y1)..(x4,y4) clockwise then formula is:

If (x2-x1)*(y1-y3)-(x1-x3)*(y2-y1)>0

Statistics: Posted by goblinish — Thu Oct 23, 2014 4:09 pm

]]>

]]>

Interesting what algo used some code selfmodification for fast.

We discovered it b4

Statistics: Posted by goblinish — Thu Oct 23, 2014 2:18 pm

]]>

Statistics: Posted by heaven6502 — Thu Oct 23, 2014 1:56 pm

]]>

well...my demo starts from $2000, some luts placed at $1000.

here is routine(PureBasic):

...

If e2 > -dy

e = e - dy

x0 = x0 + sx

EndIf

If e2 < dx

e = e + dx

y0 = y0 + sy

...

If e2 > -dy

e = e - dy

x0 = x0 + sx

EndIf

If e2 < dx

e = e + dx

y0 = y0 + sy

...

Lot's of ways you can optimize that type of routine.

- sx,sy are -1 or +1 so those additions and subtractions can be replaced by inc, dec (or inx,iny maybe).

- If you limit X coords to 0-255 they fit in one byte.

- If you want to plot pixel with 'OR' (turn pixels on) you can have current screen address memorized and pixel value like '00010000'. Instead of x0=x0+1 you do "LSR pixel_value" and "ORA".

Moving left (x=x-1) is same just with "ASL". If after ASL or LSR carry flag is set -> dec or inc screen address by 1.

- "y=y +/- 1" is: "SCR_address = SCR_address +/- screen_width"

Statistics: Posted by popmilo — Thu Oct 23, 2014 12:55 pm

]]>

https://www.youtube.com/watch?v=r6sOllDeGWA

This one is best 3d-doom-wolf type game for Amiga imho:

https://www.youtube.com/watch?v=AJjQopEx2D0

Works even on unexpanded A1200... Ridiculously small screen size, but awesome gameplay....

Statistics: Posted by popmilo — Thu Oct 23, 2014 12:38 pm

]]>