English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General > Coders. Releases

 
 
Thread Tools
Old 06 April 2023, 18:37   #1881
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,444
Quote:
Originally Posted by grond View Post
Where do those zones come from? Are they defined as part of the level data?
Yes. Zones are convex polygons, roughly equivalent to the leaf of a BSP tree in other engine designs. In AB3D and TKG, zones are manually defined with a bunch of rules.

I've changed the code to be based on the player position, which works, but it does mean that the zone ordering is being recalculated all the time its not standing still (looking around is ok). This is still better than every frame. Just.
Karlos is offline  
Old 06 April 2023, 19:04   #1882
abu_the_monkey
Registered User
 
Join Date: Oct 2020
Location: Bicester
Posts: 2,020
Quote:
For fun, try playing with F4 (disable dynamic lighting), F8 (use simple walls), F9 (double height) in 2/3 screen size (If you have an 040 or better, press F10 to go 2/3 from fullscreen)...

It's almost AB3D1...
yes it is, almost.

build from the current main.

edit: I have included a 'readme' for the new key definitions

can someone do a quick comparison with an older build on real hardware please

Last edited by abu_the_monkey; 05 May 2023 at 00:24.
abu_the_monkey is offline  
Old 06 April 2023, 19:14   #1883
grond
Registered User
 
Join Date: Jun 2015
Location: Germany
Posts: 1,924
Quote:
Originally Posted by Karlos View Post
Yes. Zones are convex polygons, roughly equivalent to the leaf of a BSP tree in other engine designs. In AB3D and TKG, zones are manually defined with a bunch of rules.
And you can always only be in one zone at a time?
grond is offline  
Old 06 April 2023, 19:16   #1884
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,444
Quote:
Originally Posted by grond View Post
And you can always only be in one zone at a time?
There's only one pointer, so yes, although you can basically be stood on the boundary of adjoining zones (how complex rooms work is by adjacent convex zones sharing an edge). Unless it's maintained somewhere else that I haven't found.

I don't know that it's saving a ton of time by trying to skip it, but it may help on real hardware.
Karlos is offline  
Old 06 April 2023, 19:21   #1885
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,444
I might be thinking about this the wrong way. Instead of earlying out the ordering of zones every frame because I appear to have not changed zone pointer, what if instead, I ran the zone order code when I detect the zone pointer has changed?

This is trivial for a C code refactor but in assembler I can't make too many assumptions on how decoupled the code is from where it is currently called.
Karlos is offline  
Old 06 April 2023, 20:10   #1886
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,444
Quote:
Originally Posted by abu_the_monkey View Post
yes it is, almost.

build from the current main.

edit: I have included a 'readme' for the new key definitions

can someone do a quick comparison with an older build on real hardware please
Top banana.

edit: We should start stripping the release binary, it'll be half the size.




Mmmmm banana. Almost time.
Karlos is offline  
Old 06 April 2023, 20:18   #1887
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,444
Experimental changes pushed to the performance/renderer branch for this idea of lazy zone order evaluation. It works (updates when player location moves) but I don't think it will make much difference. It may help on real silicon by saving some code and cache trashing due to list manipulation.
Karlos is offline  
Old 06 April 2023, 20:40   #1888
abu_the_monkey
Registered User
 
Join Date: Oct 2020
Location: Bicester
Posts: 2,020
@Karlos

are Plr1_RoomPtr_l and Plr1_ZonePtr_l the same thing? I get an undefined reference error with your push to the performance/renderer branch

I may have done something wrong
abu_the_monkey is offline  
Old 06 April 2023, 20:42   #1889
abu_the_monkey
Registered User
 
Join Date: Oct 2020
Location: Bicester
Posts: 2,020
ignore me, my bad
abu_the_monkey is offline  
Old 06 April 2023, 20:58   #1890
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,444
Quote:
Originally Posted by abu_the_monkey View Post
@Karlos

are Plr1_RoomPtr_l and Plr1_ZonePtr_l the same thing? I get an undefined reference error with your push to the performance/renderer branch

I may have done something wrong
It got renamed because the thing it points to is really a zone. A "room" can be made of multiple connected zones but doesn't appear to be a distinct thing in its own right. That is to say, there doesn't appear to be anything akin to a Sector in Doom.

Last edited by Karlos; 06 April 2023 at 21:06.
Karlos is offline  
Old 06 April 2023, 21:20   #1891
pipper
Registered User
 
Join Date: Jul 2017
Location: San Jose
Posts: 676
I’m surprised it’s not using some form of portal rendering, starting from the player zone branching out into all connected zones all the while shrinking the “clip rectangle” for drawing.

The symbols were included into the executable so that I could use the WinUAE debugger with a little bit of source level debugging. WinUAE will load the symbols and allows you to refer to them when setting breakpoints or inspecting memory.
Removing the debugging symbols is definitely something that should be done for a release version.
pipper is online now  
Old 06 April 2023, 21:38   #1892
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,444
Quote:
Originally Posted by pipper View Post
I’m surprised it’s not using some form of portal rendering, starting from the player zone branching out into all connected zones all the while shrinking the “clip rectangle” for drawing.
The man is back!

The whole PVS has some issues, as the Dev build can show. Bits of the map being drawn behind solid walls and so on. I just picked this part up to ease myself into the murky world of it. I am pretty sure it is a portal style renderer. When wall drawing is turned off, usually the stuff that would be partially obstructed by them is clipped against where the walls would be.

Quote:
The symbols were included into the executable so that I could use the WinUAE debugger with a little bit of source level debugging. WinUAE will load the symbols and allows you to refer to them when setting breakpoints or inspecting memory.
Removing the debugging symbols is definitely something that should be done for a release version.
Definitely. We have two separate builds now. The release one and the developer one. The latter has conditionally complied stuff in it that's excluded from the release.
Karlos is offline  
Old 06 April 2023, 22:20   #1893
pipper
Registered User
 
Join Date: Jul 2017
Location: San Jose
Posts: 676
Oh, also, wrt to the “doublewidth” test branch: what I tried there was to ignore the dedicated double width rendering routines and then modify the regular rendering routines to achieve doublewidth rendering. The idea being: what are the relevant parts? Can the necessary changes maybe rolled into the outer math and make it “just work”?
I think I made all the necessary changes, but didn’t pursue a “productization” enough. I wanted to make the regular rendering routines switchable, but that’s not as easy to do as I wished for and then I lost a bit of interest.

What could be done with the current code, though, is to modify the doublewidth rendering paths in the master branch to use the code used in the doublewidth test branch.
pipper is online now  
Old 06 April 2023, 22:31   #1894
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,444
I'm taking a bit of a break from the lower level optimisations after eliminating a further 1500-3000 long divisions per frame (up to 8000 in one scene in my mod) arising from the polygon rendering. That's why I decided to take a quick look at the higher up stuff.
Karlos is offline  
Old 06 April 2023, 23:10   #1895
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,444
@pipper

I think the double height mode offers better bang for buck because you can transfer half as much data over the slow chip ram bus as well as saving on calculation time. With the double width mode, you only get calculation time saving, right?
Karlos is offline  
Old 06 April 2023, 23:49   #1896
abu_the_monkey
Registered User
 
Join Date: Oct 2020
Location: Bicester
Posts: 2,020
@Karlos

for the fps counter in the release version you mentioned using the border text/char, I think the border, weapon indicator, ammo and health are on a planar screen which the chunky buffer draws over but I could be wrong. would you just be looking to reuse the 'font' and redirect it to the top left corner of the chunky buffer?
abu_the_monkey is offline  
Old 07 April 2023, 00:07   #1897
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,444
Quote:
Originally Posted by abu_the_monkey View Post
@Karlos

for the fps counter in the release version you mentioned using the border text/char, I think the border, weapon indicator, ammo and health are on a planar screen which the chunky buffer draws over but I could be wrong. would you just be looking to reuse the 'font' and redirect it to the top left corner of the chunky buffer?
Yes, just the font data. Plotting into the chunky buffer, we only need 3 digits and a dot. I could even just embed my own glyphs easily enough.

I am probably going to factor out some of the timing code from the dev_inst.s into a common timer file so that there's a single point of definition. I'll also use the same last 8 frames average as it seems to give a pretty reliable measure. But not tonight. I'm beat, lol.
Karlos is offline  
Old 07 April 2023, 00:14   #1898
abu_the_monkey
Registered User
 
Join Date: Oct 2020
Location: Bicester
Posts: 2,020
that's cool

I am not surprised, only 4 hours sleep a night catches up with you at the best of times. how was the banana by the way
abu_the_monkey is offline  
Old 07 April 2023, 00:26   #1899
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,444
Quote:
Originally Posted by abu_the_monkey View Post
that's cool

I am not surprised, only 4 hours sleep a night catches up with you at the best of times. how was the banana by the way
Yellow and potassiummy
Karlos is offline  
Old 07 April 2023, 00:30   #1900
abu_the_monkey
Registered User
 
Join Date: Oct 2020
Location: Bicester
Posts: 2,020
sorry, had to comment at this

Quote:
Mmmmm banana. Almost time.
made me chuckle, had an image of Homer Simpson in my head.
abu_the_monkey is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Alien Breed 3D II The Killing Grounds RTG patch Angus Retrogaming General Discussion 63 14 December 2022 15:20
Alien Breed & Alien Breed '92: SE - delay when picking up items / opening doors Ian support.WinUAE 16 23 December 2016 15:50
Alien Breed 3D II : The Killing Grounds code booklet alexh support.Games 19 10 October 2012 22:17
Alien Breed 3D 2 - The Killing Grounds Ironclaw support.Games 12 13 September 2005 13:07
HD Version of Alien Breed I ? Kintaro request.Old Rare Games 20 31 July 2003 10:48

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:41.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.16445 seconds with 14 queries