English Amiga Board How is 3D 3.456 dots possible on Amiga 500?
 Register Amiga FAQ Rules & Help Members List  /  Moderators List Today's Posts Mark Forums Read

 02 December 2021, 10:44 #1 crf45 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, 11:14 #2 grond Registered User   Join Date: Jun 2015 Location: Germany Posts: 1,152 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, 11:36 #3 a/b Registered User   Join Date: Jun 2016 Location: europe Posts: 573 - 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, 12:36 #4 crf45 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, 13:01 #5 grond Registered User   Join Date: Jun 2015 Location: Germany Posts: 1,152 You don't happen to have that code anymore?
03 December 2021, 13:34   #6
chb
Registered User

Join Date: Dec 2014
Location: germany
Posts: 341
Rock Lobster by Oxyron has a pretty impressive dot routine and the source is on github. From the doc:
Quote:
 Vectorplots: One of the technical hi-lights in the demo. 2816 z-shaded morphing vectorplots. Before adding sprite-overlays and design-stuff I had 3172. A transformation matrix is generated every frame. The morphing is just the result of using lots of prescaled sintables. Half of the pixels are transformed with one add.l for X, Y & Z. Then the blitter extracts the bits and adresses for the plots including z-shading. The blitter also mirrors the bits, adresses and shading for the other half of the symmetric object. The CPU sets the pixels with a bset.b per pixel.
Might be worth a look.

 14 December 2021, 18:24 #7 zero Registered User   Join Date: Jun 2016 Location: UK Posts: 401 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, 04:08 #8 ImmortalA1000 Registered User   Join Date: Feb 2009 Location: london/england Posts: 459 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, 05:47 #9 Hannibal Registered User   Join Date: May 2015 Location: Kirkland, Washington, USA Posts: 33 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, 14:02   #10
chb
Registered User

Join Date: Dec 2014
Location: germany
Posts: 341
Quote:
 Originally Posted by Hannibal 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
Ah, I guess you are referring to the "A500 Homage" 40k?
https://www.pouet.net/prod.php?which=9268

There's some amazing code in that one indeed... (and great music and a nice design).

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

 Similar Threads Thread Thread Starter Forum Replies Last Post turrican9 support.Hardware 0 24 December 2016 03:16 Leandro Jardim support.WinUAE 2 18 July 2016 23:46 mfletcher support.Apps 17 08 July 2012 03:39 h0ffman Amiga scene 1 01 May 2012 15:46 Ratte support.WinUAE 6 19 January 2009 12:09

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home News Main     Amiga scene     Retrogaming General Discussion     Nostalgia & memories Support     New to Emulation or Amiga scene         Member Introductions     support.WinUAE     support.WinFellow     support.OtherUAE     support.FS-UAE         project.AmigaLive     support.Hardware         Hardware mods         Hardware pics     support.Games     support.Demos     support.Apps     support.Amiga Forever     support.Amix     support.AmigaOS     support.Other Requests     request.UAE Wishlist     request.Old Rare Games     request.Demos     request.Apps     request.Modules     request.Music     request.Other     Looking for a game name ?     Games images which need to be WHDified abime.net - Hall Of Light     HOL news     HOL suggestions and feedback     HOL data problems     HOL contributions abime.net - Amiga Magazine Rack     AMR news     AMR suggestions and feedback     AMR data problems     AMR contributions abime.net - Home Projects     project.Amiga Lore     project.EAB     project.IRC     project.Mods Jukebox     project.Wiki abime.net - Hosted Projects     project.aGTW     project.APoV     project.ClassicWB     project.Jambo!     project.Green Amiga Alien GUIDES     project.Maptapper     project.Sprites     project.WinUAE - Kaillera Other Projects     project.Amiga Demo DVD     project.Amiga Game Factory     project.CARE     project.Amiga File Server     project.CD32 Conversion     project.Game Cover Art         GCA.Feedback and Suggestions         GCA.Work in Progress         GCA.Cover Requests         GCA.Usefull Programs         GCA.Helpdesk     project.KGLoad     project.MAGE     project.Missing Full Shareware Games     project.SPS (was CAPS)     project.TOSEC (amiga only)     project.WHDLoad         project.Killergorilla's WHD packs Misc     Amiga websites reviews     MarketPlace         Swapshop     Kinky Amiga Stuff     Collections     EAB's competition Coders     Coders. General         Coders. Releases         Coders. Tutorials     Coders. Asm / Hardware     Coders. System         Coders. Scripting         Coders. Nextgen     Coders. Language         Coders. C/C++         Coders. AMOS         Coders. Blitz Basic     Coders. Contest         Coders. Entries Creation     Graphics         Graphics. Work In Progress         Graphics. Finished Work         Graphics. Tutorials     Music         Music. Work In Progress         Music. Finished Work         Music. Tutorials

All times are GMT +2. The time now is 10:43.

 -- EAB3 skin ---- EAB2 skin ---- Mobile skin Archive - Top