Jump to content
IGNORED

Any 3D game with flatshading on A800 ?


VladR

Recommended Posts

re: pipeline

 

my experience was that using 8bit through complete pipe reduces accuracy more and more at each stage (8bit coords - 8bit muls rotation - 8bit persp trans - rasteriser... well i see jitter poly faces ;)

 

re: subpix

 

tradeoff speed vs visual appealing. In a demo environment I only used it on Atari VBXE and Atari Lynx (Elements demo) in the gouraud parts (obviously as it gets buggy in the end of the day or more to say floating colors).

 

Subpix "overhead" is not as much as you would think as you need to calc it once per face? (and you need to traverse in 16bit).

 

so... I went first 16bit coords, 16bit muls... (was using 8.8 fixed point) 16bit persp. so it was only a logical step to use the results for the rasteriser (not expert here but it worked).

 

but I am using EOR filler (or blitter) to fill the scanline from edge to edge. brese/woo doesnt like subpix. as I am using DDA so you can use 1 additional mul for the subpix prestep. and I have posted the DDA innerloop where you can take advantage of using register to hold the fraction or the other part of the pixel easily.

 

esp. on "low res" it helps to keep a "fluid" impression. but if your framerate is "low" then it doesnt matter as you can not see the "beauty".

 

https://www.youtube.com/watch?v=1ms15UqUi8M&t=3s

 

look how RoF is "loosy" in therms of accuracy.

  • Like 1
Link to comment
Share on other sites

Kinda late for the thread. I can't much help with filling. Never done that. But I have game oriented wire-frame engine.

 

 

(related thread here: http://atariage.com/forums/topic/237244-rescue-3d-engine-demo)

 

By game oriented I mean it has relatively few limitations. The matrices are 8 bit, positions 16 bit, this is transformed into 16bit, where clipping and persp is done.

 

Lines are Bressenham with unrolled 16 cases (all combinations of up-left / left for 4 bits) (http://atariage.com/forums/topic/231690-known-fast-line-algorithms).

I plan to replace with something simpler, the line makes under 15%, so it does not justify the complexity of the routine.

 

There is still lot of time for improvement, it's one of the first 6502 codes I've done.

 

For my purposes (space game, one day, maybe ?) filling doesn't seem important. I will take framerate over it every time. Also the engine also supports red-cyan 3D mode, with like 15% price. All math is the same, simple Z-based table is used for paralax, just the lines have to be done twice. It actually looks quite good, and it works better with transparent objects.

  • Like 4
Link to comment
Share on other sites

nice aaah Roger... totally forgot your stuff...

 

how do you deal with 3d clipping?

 

and i am really courious in your persp trans... as your objects can be scaled to "infinity"... I never managed that :D

 

Yeah, sry, I don't go here very often .. PG notified me about this thread though ..

 

I do clipping in 3D, before persp .. basically clip the edges with view frustum. I use 90 degrees horizontal view angle .. so it's just comparing X to Z .. and for vertical I use half of that .. so I double each coordinate after rotation, and then half it back before drawing, and again, just compare Y to Z.

Each edge is then clipped against 4 planes (I plan to add fifth 'near plane' because of some glitches) .. new vertex is computed, the formula something like (a-b)/(c-d) .. so there is division. But you don't need full 3D coordinates, as one coordinate of the final 2D projected point is derived from the plane, you are clipping with. Like if you are clipping with right border (X=Z plane), it's clear that the X coordinate on the screen will be .. right border ! So you only have to get Y and Z of the clipped point, then do persp, to get projected Y.

 

My objects can't rly be in infinity .. there is limit to 16 bits of camera space. But I have some tricks .. I can subscale or superscale object by power of two. The matrix itself is still 8 bit, and contains just the rotation .. but then I scale the relative position of the object by the power of two .. using scroll tables .. which makes the object appear bigger or smaller, with no precision lost, and with no precision cost. I plan to cram whole star systems into 16 bit camera space, you simply use different coordinate systems for planets, and different for ships, and so on ..

 

As for stars in the demo, they are what I call 'no position' object .. it's placed right on the camera, without translation, so no mater how camera moves, they still stay on the same spot in camera space, so they look like they are in infinity.

 

The screenplay system for the demo can add objects, set their speed and rotation, camera can move too, and it can 'watch' specific object. There are some tricks for the sake of the demo, like manual object culling, and the scale tricks, but generally it relies on the engine itself .. if you would want to look at the scene from different point, you would just change camera coordinates.

  • Like 4
Link to comment
Share on other sites

esp. on "low res" it helps to keep a "fluid" impression. but if your framerate is "low" then it doesnt matter as you can not see the "beauty".

 

https://www.youtube.com/watch?v=1ms15UqUi8M&t=3s

 

look how RoF is "loosy" in therms of accuracy.

The point here is that they tried to get a "de-jitter" in movement on the Atari and the low resolution. On the C64 they dropped it, which reduced the needed calculations...

Link to comment
Share on other sites

How do they get de jitter? Nope. It's simply loosing precision. Lucas film simply accepted that as tradeoff and with fractal mountains which are jitter anyway plus low frame rate plus distraction with sound and action plus 1983/84 nobody said it's loosy.

 

In the low frame rate ppl don't see if your vertice hits 1-2 pixel off where it should be... but on the accelerated version it gets obvious.

  • Like 2
Link to comment
Share on other sites

Ok master... where do you see "corrections" in the imho inaccurate atari version? I don't see them... I see floating vertices and shortcuts in clipping (not perfectly done), no rotation in z as it's tilting and not rotation and up/down is simulated with scrolling.

 

Even Carpenter wrote that persptrans is done in x and linear scaling in y.

Link to comment
Share on other sites

Ok master... where do you see "corrections" in the imho inaccurate atari version? I don't see them... I see floating vertices and shortcuts in clipping (not perfectly done), no rotation in z as it's tilting and not rotation and up/down is simulated with scrolling.

 

Even Carpenter wrote that persptrans is done in x and linear scaling in y.

The guy who told that the C64 had 256 colors?

Link to comment
Share on other sites

Ok master... where do you see "corrections" in the imho inaccurate atari version? I don't see them... I see floating vertices and shortcuts in clipping (not perfectly done), no rotation in z as it's tilting and not rotation and up/down is simulated with scrolling.

 

Even Carpenter wrote that persptrans is done in x and linear scaling in y.

I wouldn't waste time arguing with him. He doesn't produce code, you do. After seeing your latest 3 demos, it's obvious you know exactly how the routines work.

  • Like 2
Link to comment
Share on other sites

 

Btw: What ist it that makes you think you're always judging like God himself? I'm just curious ....

Me always judging? Surely you are joking. I have never shit on anybody's code for having bad music, bad graphics, not being good enough, telling them what they should have done better while never submitting anything myself.

 

You come off very badly by always putting other people's work down. Then you start arguing about how code works with someone who spent years studying, disassembling, and re-writing his own code. You are not qualified to argue with him about how it works. Have you coded your own fractal rendering engine? No.

 

You are the one who comes across as an always judging person.

  • Like 2
Link to comment
Share on other sites

Me always judging? Surely you are joking. I have never shit on anybody's code for having bad music, bad graphics, not being good enough, telling them what they should have done better while never submitting anything myself.

 

 

 

Very nice. Doing likes where people shit on each other ... how would anyone name that? And, please don't like any of my posts anymore, it has this bizarre taste, I don't need.

 

And, now back to "3D" .

  • Like 1
Link to comment
Share on other sites

 

As I wrote in other Threads : The Atari was used as some "downscaled supercomputer" . The Optimizations have been done later on other machines , to get more speed. Without the huge amount of Money Atari spent for the development, non of that Lucasfilm Games had become true. See it from the real point! They didn't care of the Atari customers neither vintage fans...

Link to comment
Share on other sites

In case for not caring they did quite nice job with Ballblazer, RoF, Eidolon, koronis rift, maniac mansion, Tie Fighter, etc

 

If someone comes around the corner offering a million Dollars for doing a downconversion of a 3D simulation that is already available, who wouldn't agree to do that peace of cake? And, where's Maniac Mansion for the Atari?

Link to comment
Share on other sites

Just back from c64 coding session....

 

So back to the initial question of Vladr... just to summarize...

 

Subpixel experience...

 

As I said low frame rate... forget it imho as ppl will not see it.... and slows down more - other opinions?

 

16bit pipeline... yes... as using 8bit I tend to say too less accuracy which leads to floating edges, vectors etc...

 

See that awesome 3d world demo... but as good it looks in wireframe you see the jumping lines...

 

Esp in low res subpix is a must.

Link to comment
Share on other sites

I wouldn't waste time arguing with him. He doesn't produce code, you do. After seeing your latest 3 demos, it's obvious you know exactly how the routines work.

Me not good enough in maths... I wrote in few days a 3d engine capable texture mapping on Pico-8 while on a 6502 machine it's a nightmare with its number range -128 to 127 integer.... no muls, divs etc... that's why 3d maths is one of the master class on 8bit machines.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...