English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 22 May 2020, 14:12   #1
d4rk3lf
Registered User
 
d4rk3lf's Avatar
 
Join Date: Jul 2015
Location: Novi Sad, Serbia
Posts: 1,645
3D FPS like this on Amiga

OK, so I finally found almost perfect example of fast paced fps that's been on my mind, for some years, that (maybe) could be done on Amiga;

Watch, exactly from 2 minutes:
[ Show youtube player ]

Ok, so let's say we have 4 to 8 colors in total, and for enemies, I have no idea what is faster. either 4 colors drawn characters, either 1 color vector shapes.
And of course, this is Quake, so much less polygons then this.

Do you think it would be possible on A500 1MB, and having (almost) constant 50 fps?
If yes, what do you think is the polygon maximum count on the screen?

And basically, add whatever thoughts you have.
---------------------

P.S. I know about Behind the Iron Gate, and I really, really like it. But I am thinking on gameplay more closer to doom....
d4rk3lf is offline  
Old 22 May 2020, 15:15   #2
Juz400
Registered User
 
Join Date: Mar 2017
Location: London
Posts: 125
I have been searching in vain for the past hour trying to find a Monochrome FPS I saw on steam that I thought looked real stylish, I could not find it as the search is pretty useless.

This was the closest I could find, obvs no chance on the Amiga BUT shows that you dont need 24bit colour graphics to look good!
[ Show youtube player ]
Juz400 is offline  
Old 22 May 2020, 16:12   #3
lilwshu
Registered User
 
Join Date: Mar 2020
Location: UK
Posts: 243
The fastest polygon engine I can think of on the A500 is No Second Prize, which has very few polygons and doesn't have to deal with 360 degree movement.

More appropriate would be something like Knights of the Sky which runs at about 10fps on an A500 but is sort of playable as a Doom clone. But having seen the videos of Dread, who knows what is actually possible.
lilwshu is offline  
Old 22 May 2020, 16:55   #4
James
Registered User
 
Join Date: Mar 2010
Location: Beckenham/England
Posts: 795
Quote:
Originally Posted by d4rk3lf View Post
OK, so I finally found almost perfect example of fast paced fps that's been on my mind, for some years, that (maybe) could be done on Amiga;
That is Quake and it is already on Amiga.

4DShooter was an effort to simplify the models and maps in Quake so that it can run on slower machines.

http://eab.abime.net/showpost.php?p=1105019&postcount=1


Maps like White Room show how stylised maps can alter the feel of the game.

https://www.quaddicted.com/reviews/whiteroom.html


Virtual World is a Tron style map.

https://www.quaddicted.com/reviews/digs02.html


Noir is a simple pallete change to play Quake in greyscale

http://www.quaketastic.com/files/sin.../mods/noir.zip
James is offline  
Old 23 May 2020, 15:26   #5
d4rk3lf
Registered User
 
d4rk3lf's Avatar
 
Join Date: Jul 2015
Location: Novi Sad, Serbia
Posts: 1,645
Tnx guys.

@lilwshu
Exactly my thoughts.
No Second Prize is amazing piece, and even the enemy bikes are 3D. They should've release source code for it.
Hmm... if source code is not lost, maybe we could bother them to death on email, until they give us.
d4rk3lf is offline  
Old 23 May 2020, 15:32   #6
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
Quote:
Originally Posted by Juz400 View Post
I have been searching in vain for the past hour trying to find a Monochrome FPS I saw on steam that I thought looked real stylish, I could not find it as the search is pretty useless.
[ Show youtube player ]

SuperHot, perhaps? It's an incredible game, had the chance to play it in VR. As a bonus, it includes plenty of Amiga references in the in-between phases
Daedalus is offline  
Old 24 May 2020, 06:02   #7
saimon69
J.M.D - Bedroom Musician
 
Join Date: Apr 2014
Location: los angeles,ca
Posts: 3,519
Hey are you by chance mentioning Unfinished Swan?
[ Show youtube player ]
saimon69 is offline  
Old 24 May 2020, 15:09   #8
Nightshft
Registered User
 
Nightshft's Avatar
 
Join Date: Mar 2018
Location: Austria
Posts: 617
Quote:
Originally Posted by saimon69 View Post
Hey are you by chance mentioning Unfinished Swan?
[ Show youtube player ]
What a cool game - something different! Sadly its available only for PS3 and not for PC.
Nightshft is offline  
Old 24 May 2020, 18:37   #9
saimon69
J.M.D - Bedroom Musician
 
Join Date: Apr 2014
Location: los angeles,ca
Posts: 3,519
Quote:
Originally Posted by Nightshft View Post
What a cool game - something different! Sadly its available only for PS3 and not for PC.
I wonder if with some adjustment a similar dynamic could be used with the 500 doom engine, like make a maze to escape using painting the walls, no ladder or such
saimon69 is offline  
Old 31 May 2020, 04:52   #10
VladR
Registered User
 
Join Date: Dec 2019
Location: North Dakota
Posts: 741
Quote:
Originally Posted by d4rk3lf View Post
OK, so I finally found almost perfect example of fast paced fps that's been on my mind, for some years, that (maybe) could be done on Amiga;

And of course, this is Quake, so much less polygons then this.

Do you think it would be possible on A500 1MB, and having (almost) constant 50 fps?
If yes, what do you think is the polygon maximum count on the screen?
So, I can actually chime in with my experience on Jaguar, as I burnt a lot of time on benchmarking and optimizing my 3D flatshading engine to get to 30/60 fps with a Quake scene.


I recreated the room at the start of Quake, where you choose the difficulty.


I have very quickly observed that the vertical pillars are the killer of FPS, because you have these very thin (4-8 px) pillars that span almost whole screen height, and you have to do scanline traversal and spin up Blitter up to 200x per each triangle, to only fill couple pixels.
Now, even if you only have 6 such pillars in the scene, this is how it breaks down:
- 6 pillars = 6*2 visible rectangles = 6*2*2 = 24 triangles

Up close, those 24 triangles have up to 200px height. That's 200 scanlines. Per Triangle.

That's 200*24 = 4,800 scanlines. In just few thin pillars. Not even 26.6 MHz RISC GPU running out of cache can traverse that many scanlines at 60 fps. And there's 10x more polygons around.


Now, on Jaguar, it was possible to configure the Blitter in a way that does vertical blits. It is much slower (per pixel written) than a classical horizontal blit, but there is a threshold where it's faster to do the slower vertical blit rather than series of faster (but many more) horizontal blits.


Not sure if Amiga's Blitter can be configured the same, to achieve the vertical lines - someone with Amiga experience could perhaps confirm/rule out this ?

Last edited by VladR; 31 May 2020 at 05:22.
VladR is offline  
Old 31 May 2020, 05:14   #11
VladR
Registered User
 
Join Date: Dec 2019
Location: North Dakota
Posts: 741
Quote:
Originally Posted by d4rk3lf View Post
Do you think it would be possible on A500 1MB, and having (almost) constant 50 fps?
If yes, what do you think is the polygon maximum count on the screen?
You are asking way too much of a 7 MHz 68000.


Even on Jaguar, where I had my 3D engine running on 26.6 MHz RISC GPU, (and I was getting around 13-14 MIPS out of it) and Jag had a Blitter sitting on the same 64-bit bus as the GPU, your scanline throughput was very limited.


If I recall correctly, my fastest scanline traversal version (I wrote about 6 of them) could do about 2,200 scanlines at 60 fps (I am in NTSC area), assuming you devoted full 100% of the 26.6 MHz GPU to just that and nothing else. That was RISC assembler code running fully from within the fast 4 KB cache, without any access to slow RAM.




A 7 MHz 68000 is absolutely crippled compared to 26.6 MHz RISC. Probably about 30x-50x slower. On top of that, you need to do 3D transform, clipping and scene management.


And we're going to assume here that since we're talking indoor FPS shooter here, we don't have to do a clear of the framebuffer, as it will be guaranteed that each pixel will be redrawn. Thus, you don't waste any cycles on clearing screen.


Still, a 7 MHz 68000 has only around 116,000 cycles per frame at 60 fps (probably slightly less than that due to system design). Great many instructions take 16-24 cycles. Even if we take just 20 cycles as average, that's only ~5,800 ops.


You can't really do much of a 3D with ~5,000 ops. And that's assuming LookUp tables for 3D transform (forget about doing MUL/DIV on 68000 at 60 fps unless we're talking THREE polygons)




Your best compromise at 60 fps is to reduce the viewport size drastically (halving vertically will halve amount of scanline traversal stage which is the worst offender) and rendering just some distant polygons (never allow object to cover whole viewport vertically).
VladR is offline  
Old 31 May 2020, 05:27   #12
VladR
Registered User
 
Join Date: Dec 2019
Location: North Dakota
Posts: 741
To offer some sort of answer to your question, the fastest 3D scene will have just few scanlines, so your level design must be strictly horizontal - e.g. very wide polygons that are very short vertically.


Kinda like the floor + few short walls in that Quake video you linked (without the tall walls). Something like that, could run at 60 fps. Though, then you have a problem as you aren't clearing framebuffer, and your scene covers just bottom portion of screen, so you must come up with some smart clearing mechanism, that only clears minimum amount of scanlines possible...
VladR is offline  
Old 31 May 2020, 05:43   #13
chb
Registered User
 
Join Date: Dec 2014
Location: germany
Posts: 439
Quote:
Originally Posted by VladR View Post
Not sure if Amiga's Blitter can be configured the same, to achieve the vertical lines
You can do a vertical fill by using 2x the target buffer as source, one line apart, and then use an XOR minterm (but no fill mode). Like D = D ^ (D - 1). It then works like a horizontal blitter fill, with the distinction that source and target have to be the same.

This has, however, also the same problem as a horizontal blitter fill - if you want it to work efficiently, e.g. in one pass for the whole scene, you have to break up overlapping polygons, which is rather non-trivial and time consuming. But to render Doom-like walls without overlap it should work well.

EDIT: Actually D = A ^ (D-1) should also work, with A being the outline buffer - then you only have to clear the outlines, not the whole buffer.

Last edited by chb; 31 May 2020 at 05:56.
chb is offline  
Old 31 May 2020, 06:47   #14
VladR
Registered User
 
Join Date: Dec 2019
Location: North Dakota
Posts: 741
Thanks.

Also, you reminded me of the single pass approach on Amiga.

That's very different from the spinning up the Blitter thousand times per frame.

I don't have experience with this approach so don't know the limits involved.

It's quite possible that very complex scenes could be done by this way...
VladR is offline  
Old 31 May 2020, 09:30   #15
chb
Registered User
 
Join Date: Dec 2014
Location: germany
Posts: 439
If you by "spinning up the Blitter thousand times per frame" mean a blitter-based span filler, I do not think that's a feasible approach on the Amiga. For pure clear the CPU is as fast as the blitter (every 2nd mem cycle), and most probably instruction fetch/register setup time for a movem is less than blitter setup/waiting overhead.
chb is offline  
Old 31 May 2020, 18:49   #16
VladR
Registered User
 
Join Date: Dec 2019
Location: North Dakota
Posts: 741
Quote:
Originally Posted by chb View Post
If you by "spinning up the Blitter thousand times per frame" mean a blitter-based span filler, I do not think that's a feasible approach on the Amiga. For pure clear the CPU is as fast as the blitter (every 2nd mem cycle), and most probably instruction fetch/register setup time for a movem is less than blitter setup/waiting overhead.
Yeah, I meant using blitter for drawing each scanline of a polygon - meaning you traverse the edges, line by line, compute endpoints (xpStart, xpEnd) and set the Blitter registers for the scanline.


Then, in parallel, while Blitter is busy drawing the current scanline, the CPU continues the loop and is computing the endpoints for the next scanline.


Only when it's time to submit new endpoints to the Blitter, you initiate a WaitForBlitter.


On Jaguar, I interleaved the RISC code in a way that the BlitterWaitTime was only around 8% of frame time. So, not too bad. But, if you simply waited right after each scanline, then the waittime jumped to ~25%.


Not sure, how parallel the execution of 68000 vs Blitter on Amiga is like.


What's the CPU priority on the bus when Blitter is accessing RAM? Or does Amiga's Blitter have separate read/write access lines to RAM on Amiga ? Thus, it won't block CPU ?
VladR is offline  
Old 31 May 2020, 19:21   #17
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,410
On the Amiga, the Blitter steals cycles from the CPU. There are two options:
  • The Blitter gets all cycles it needs, the CPU gets zero during Blitter activity on the bus
  • The Blitter gives one cycle to the CPU every time the CPU has been waiting on DMA for at least three cycles in a row.
There are some caveats here because not all Blitter operations can actually use all of the bus (some things, such as clearing, have idle cycles during which the Blitter does not access memory even when running). But in general, the above holds.
roondar is online now  
Old 31 May 2020, 20:05   #18
VladR
Registered User
 
Join Date: Dec 2019
Location: North Dakota
Posts: 741
Quote:
Originally Posted by roondar View Post
On the Amiga, the Blitter steals cycles from the CPU. There are two options:
  • The Blitter gets all cycles it needs, the CPU gets zero during Blitter activity on the bus
  • The Blitter gives one cycle to the CPU every time the CPU has been waiting on DMA for at least three cycles in a row.
There are some caveats here because not all Blitter operations can actually use all of the bus (some things, such as clearing, have idle cycles during which the Blitter does not access memory even when running). But in general, the above holds.
Ouch


Dude, you're making me appreciate Jaguar's sh*tty architecture more and more !
VladR is offline  
Old 31 May 2020, 21:17   #19
robinsonb5
Registered User
 
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,153
Quote:
Originally Posted by VladR View Post
Ouch


Dude, you're making me appreciate Jaguar's sh*tty architecture more and more !

Just in case it wasn't clear, the blitter steals cycles from the CPU when the CPU's running from or accessing Chip RAM. Fast RAM, if present, is on a separate bus which isn't affected by the blitter.
robinsonb5 is offline  
Old 31 May 2020, 21:28   #20
chb
Registered User
 
Join Date: Dec 2014
Location: germany
Posts: 439
Quote:
Originally Posted by roondar View Post
There are some caveats here because not all Blitter operations can actually use all of the bus (some things, such as clearing, have idle cycles during which the Blitter does not access memory even when running). But in general, the above holds.
For a span filler and solid polygons the blitter is in clearing mode (D only)*, so the idle cycles become relevant, meaning the CPU can work at full speed in parallel to the blitter here if no other DMA is active. That might be useful for large spans - but probably the overhead to setup the blitter makes it still slower than a CPU-only routine.

* apart from the first and last word
chb 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
Amiga Games at 50 fps vulture Retrogaming General Discussion 330 29 September 2022 19:12
Chambers of Muon - Multiplayer FPS Amiga Game Xebec Nostalgia & memories 2 08 November 2018 15:30
Shadow Warrior - MS-DOS FPS making its way on to the Amiga Neil79 News 23 17 September 2016 15:00
The Best Amiga 3D FPS Steve Retrogaming General Discussion 112 22 November 2015 16:28
Doomed: The Embers of Amiga FPS turrican3 Nostalgia & memories 3 24 March 2015 15:38

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 16:08.

Top

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