02 December 2021, 09:44 | #1 |
Registered User
Join Date: Nov 2021
Location: Mauritius
Posts: 5
|
How is 3D 3.456 dots possible on Amiga 500?
I used to program a few demo on A500 in the 90s and there are several tricks I'd like to understand. For example 3.456 dots 50FPS on A500 with shape that change made by Hannibal on Anarchy's 3D Demo 2. Do you have some pointers on how this is possible? at 2:52
[ Show youtube player ]
I asked this question here as well with interesting answers but no concrete code ,trick or algorithm. https://www.reddit.com/r/amiga/comme..._on_amiga_500/ |
02 December 2021, 10:14 | #2 |
Registered User
Join Date: Jun 2015
Location: Germany
Posts: 1,918
|
They probably use cylindrical coordinates for the landscape dots and tables for projection on the screen. That's why the landscape can rotate easily, that's just one addition for the angle-offset. I assume there is no perspective in the z-direction, then the height info of the dot directly translates to the screen. Similarly the sphere and cube are probably done using spherical coordinates. Again only some adds needed for the two angles of rotation, tables for projection.
|
02 December 2021, 10:36 | #3 |
Registered User
Join Date: Jun 2016
Location: europe
Posts: 1,039
|
- no depth/perspective (parallel perspective, meaning z is ignored for speed but it will look 2D/flat-ish)
- 4x mirroring/symmetry, and thanks to no perspective maybe the entire thing is just only x and y, and lots of tables (entirely fake 3D) - morph is very limited: only dots that are part of a group of e.g. 64 dots can morph between eachother, and every group morphs in the same way (probably precalc and then use a set of tables to scale to appropriate size in real-time) - don't know whether it's a 3-axis rotation or maybe simplified as 2-axis, or entirely faked in some other way (because of the above) The point being, it's not entirely what it appears to be . |
03 December 2021, 11:36 | #4 |
Registered User
Join Date: Nov 2021
Location: Mauritius
Posts: 5
|
The thing is that I remember having done a 2048 dots sphere with all coordinate precomputed and only 5 simple instructions (no mul/div) to get each dot coordinate and print it on bitmap, this is why I am wondering how this is possible? One day I will take the time to decompile it 100%
|
03 December 2021, 12:01 | #5 |
Registered User
Join Date: Jun 2015
Location: Germany
Posts: 1,918
|
You don't happen to have that code anymore?
|
03 December 2021, 12:34 | #6 | |
Registered User
Join Date: Dec 2014
Location: germany
Posts: 439
|
Rock Lobster by Oxyron has a pretty impressive dot routine and the source is on github. From the doc:
Quote:
|
|
14 December 2021, 17:24 | #7 |
Registered User
Join Date: Jun 2016
Location: UK
Posts: 428
|
The blitter is a very powerful tool for accelerating these kinds of bit handling functions that the 68k is bad at. It's also pretty complex to get it to do what you want, really need to wrap your brain around how it works.
|
17 January 2022, 03:08 | #8 |
Registered User
Join Date: Feb 2009
Location: london/england
Posts: 1,347
|
Starfield at 3.55 is nice. Problem was demo coders never made kick-ass game engines in my time with Amiga so I was always suspicious by default otherwise it would be more than just a demo segment
|
23 January 2022, 04:47 | #9 |
Registered User
Join Date: May 2015
Location: Kirkland, Washington, USA
Posts: 56
|
So i don’t remember all the details, but I remember that it did 4 dots at a time, in 14 instructions. It was based on symmetric dots within a slice, and on the slices being symmetric too. - so when it drew a dot in a slice, it also drew the opposite dot in the same slice, and those two dots in the opposite slice. I believe it was loop unrolled for a full slice, and used self modifying code to store a rotated x/y values for each dot in the slice (and all slices look the same. So I think the only math that happened per 4 dots was to scale the x/y for that slice (a lookup table), add and subtract the x/y for the center of the slice - the rest was bit manipulation and bsets
Also, all credit where due, I saw a very similar technique in another demo before, it just didn’t have anywhere near as many dots. And complex did a version with 4096 dots with a super clever trick - they just calculated the X/Y coordinates and stored them in a list, and had the blitter build a list of bset commands, which the cpu then executed. Since the bit manipulation was the most expensive part of dot routines, this was worth the complexity of having multiple steps |
23 January 2022, 13:02 | #10 | |
Registered User
Join Date: Dec 2014
Location: germany
Posts: 439
|
Quote:
https://www.pouet.net/prod.php?which=9268 There's some amazing code in that one indeed... (and great music and a nice design). |
|
18 June 2022, 16:01 | #11 |
Registered User
Join Date: Dec 2019
Location: North Dakota
Posts: 741
|
Yes, it is
But, even if it seems like this is one section that perhaps, could, be used in a game (say, as an hyperspace effect), we already have a precedent from 1979 that this kind of effect is actually interactive - Star Raiders I (on 1.79 Mhz 6502) made it an actual gameplay element where you are in control of the direction where you fly through hyperspace. Meaning, all those dots are rotated each frame based on your input - hence no symmetry and no Copper mirroring tricks are possible anymore. And, even if you designed the game so that hyperspace wouldn't be interactive (in which case you could use this FX), the transition from 3,000 (FX) dots to just 32 (in-game) would be quite jarring and WTF-esque Of course, most of them didn't. It wouldn't make them look good if the 3D scene complexity suddenly dropped by about 2 orders of magnitude to account for random player input, clipping, AI and other boring pesky details that one doesn't have to take into account when coding a 20-second FX using ~95% of available RAM for tables (that took about a minute to compute) |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Amiga 500 Rev.6A VS Amiga 500 Plus with 2MB chip and ACA 500 | turrican9 | support.Hardware | 0 | 24 December 2016 02:16 |
Little dots over WB 4.1 screen | Leandro Jardim | support.WinUAE | 2 | 18 July 2016 22:46 |
Icons showing up as dots - anyway to fix? | mfletcher | support.Apps | 17 | 08 July 2012 02:39 |
Hot Dots! | h0ffman | Amiga scene | 1 | 01 May 2012 14:46 |
Missing dots in HGFX | Ratte | support.WinUAE | 6 | 19 January 2009 11:09 |
|
|