10 February 2023, 12:44 | #61 |
Thalion Webshrine
Join Date: Jan 2004
Location: Oxford
Posts: 14,354
|
|
10 February 2023, 13:20 | #62 | |
Registered User
Join Date: Jan 2022
Location: Kharkiv
Posts: 48
|
Quote:
|
|
18 February 2023, 23:06 | #63 |
Registered User
Join Date: Jan 2022
Location: Kharkiv
Posts: 48
|
Another gfx mode now possible - 32 colors with palette. Still reasonable performance, but for fastram configuration it can be optimized more.
|
19 February 2023, 00:08 | #64 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,165
|
That's awesome. You know, 32 colours is fine. Consider an art direction, e.g. greyscale or sepia, something that naturally lends itself to a basic gradient that is representable that way.
|
26 February 2023, 21:15 | #65 |
Camilla, AmigaOS Dev.
Join Date: Mar 2020
Location: Frederiksberg
Posts: 328
|
Huge respect, and very interested in the coding side of things as well.
|
26 February 2023, 21:19 | #66 |
Registered User
Join Date: Jan 2022
Location: Kharkiv
Posts: 48
|
|
26 February 2023, 21:30 | #67 |
Camilla, AmigaOS Dev.
Join Date: Mar 2020
Location: Frederiksberg
Posts: 328
|
|
26 February 2023, 21:40 | #68 |
Registered User
Join Date: Jan 2022
Location: Kharkiv
Posts: 48
|
|
26 February 2023, 21:48 | #69 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,165
|
I know it's absolutely not the intent here but have you considered how this might work on an accelerated machine with RTG? All the 3D transformation, affine texturing and tesselation, on a faster CPU with no actual C2P to care about. You could have the beginnings of a killer FPS engine.
|
26 February 2023, 21:51 | #70 |
Camilla, AmigaOS Dev.
Join Date: Mar 2020
Location: Frederiksberg
Posts: 328
|
So how do you handle the rendering - I imagine you don't do z buffer, but is it a (reverse) painters algorithm with sorted polygons. basically tell me a bit about these things. Thanks in advance.
|
26 February 2023, 22:05 | #71 | |
Registered User
Join Date: Jan 2022
Location: Kharkiv
Posts: 48
|
Quote:
|
|
26 February 2023, 22:08 | #72 |
Camilla, AmigaOS Dev.
Join Date: Mar 2020
Location: Frederiksberg
Posts: 328
|
I have looked at the code but find it hard to orient myself in the code.
The reason I ask is that I would like to make a flight simulator with a curvy landscape |
26 February 2023, 22:30 | #73 | |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,165
|
Quote:
|
|
26 February 2023, 22:33 | #74 | |
Registered User
Join Date: Jan 2022
Location: Kharkiv
Posts: 48
|
Quote:
All mesh splitted by kd-tree by boxes with faces. All boxes contains list of their faces. For all boxes there is potentially visible set of other boxes. PVS packed as compressed bitmap (something like a Quake's PVS). At first engine find kd-tree node (box) with camera and take packed PVS for this box. While PVS is depacking, engine test all potentially visible boxes by viewing frustum. This is done by tricky way with only 9 addition + 3 compare. This test is not ideal, but very fast. (You can check algorithms in functions DecrunchPVS and DecrunchPVSleaf in Map/render.cpp (PC-prototype, but written closelly with target code or vise versa)). Face's lists of all visible boxes merging in one work list for 3D rotation. After that all vertexes of all faces in work list rotated and projected (if applicable) in view space. All invisible faces (backface or out from view space) droping as early as possible (function RotateAllFaces in Map/render.cpp) Next stage is radix sort by distance for face (function SortFacesAndDraw in Map/render.cpp) After sort we can render all far faces as filled rectange (function RenderF in Map/render.cpp). This is simple (if you don't want have a fast render ) All mid-distance faces are rendered with simple affine texture mapping. All near-distance faces split by horisontal lines with 20px step (in reality this is 4 divide planes) for tesselation. There is no face splits by vertical lines coz simple adding vertexes in split place to existing face is enough. After this splits all faces are rendered with simple texture mapping again. And the last stage is C2P. |
|
26 February 2023, 22:40 | #75 |
Camilla, AmigaOS Dev.
Join Date: Mar 2020
Location: Frederiksberg
Posts: 328
|
Thanks a lot for that description that was really useful !
Now another question about the c2p: Why a HAM screen. Does it make the c2p more efficient somehow |
26 February 2023, 22:51 | #76 | |
Registered User
Join Date: Jan 2022
Location: Kharkiv
Posts: 48
|
Quote:
More problems may be with math precision. I made a lot of simplifications due to resolution only 160*100. I'm not sure that this will be good in 320*240. |
|
26 February 2023, 22:55 | #77 |
Registered User
Join Date: Jan 2022
Location: Kharkiv
Posts: 48
|
|
27 February 2023, 00:51 | #78 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,165
|
You have 4x the area to draw too.
|
27 February 2023, 01:07 | #79 |
Registered User
Join Date: Jan 2022
Location: Kharkiv
Posts: 48
|
Yes, this is a problem too. For example, test start scene now take 574 scanlines for texture mapping (all innerloops time). But it is rendered from chip ram (texture) to chip ram (chunky screen), if engine can use fast ram, speedup will be about 1.3 times. So with fast ram 020 14MHz engine will render scene about 441 scanline (again only tmap innerloops time). With 030 50MHz this will be about 4x speedup, but if we want 4x draw area, all CPU frequency grow will be spent on 4x draw. So start scene will be rendered in 320*240 with fast CPU not too fast as we want
For my opinion, better have 25FPS (or more!) on fast CPU with current resolution. |
27 February 2023, 02:16 | #80 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,165
|
Don you make use of any mip mapping with the textures? I recall that, at least when textures are in cacheable memory (which only matters if you have a CPU with datacache) that smaller versions of textures result in better cache access. Certainly this is noticeable in games like quake, where disabling the mip mapping really cripples the performance of the software renderer (as well as looking worse due to aliasing).
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Tech demo of my game | remz | Coders. Asm / Hardware | 199 | 18 February 2024 03:16 |
Menace - HD Tech Demo - Vampire Remake | invent | Amiga scene | 45 | 01 August 2022 18:22 |
Writing a simple physics engine | Ernst Blofeld | Coders. General | 1 | 02 February 2021 18:44 |
Simple AGA first person engine [Prototype only] | earok | project.Amiga Game Factory | 8 | 01 May 2017 22:38 |
LN2 tech demo | gimbal | project.Amiga Game Factory | 63 | 02 October 2008 20:22 |
|
|