English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 11 April 2021, 16:25   #1
Jobbo
Registered User

Jobbo's Avatar
 
Join Date: Jun 2020
Location: Lexington, MA
Posts: 189
Fisherhawk Dr. by Melon Dezign - Tech

Revision 2021 had some great entries for A500.


Watching and enjoying the demos is one thing, but what I'm really interested in is how they pull of their magic.


One effect that really stood out was the tumbling cubes in Fisherhawk Dr.


I'm pretty sure it's impossible that those cubes are simulated in real-time. Even replaying a key-framed animation seems beyond the A500 given how many cubes there are and how many matrices you'd have to setup each frame.


My guess is that the demo is playing back a sequence of pre-calculated line draws and area fills, much like EON or State Of The Art.


It seems plausible that the animation is generated during the opening phase of the demo, there's not that much going on other than some occasional changes to the isometric tiles. But still, it doesn't seem like there's enough time to compute all that data?


What do others think? Has anyone gone digging into the code?
Jobbo is offline  
Old 11 April 2021, 16:33   #2
Galahad/FLT
Going nowhere

Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 47
Posts: 8,073
I think the secret is how they are drawn.

Your brain sees them as cubes, but if you notice, you don't get to see the lines making up the edges of the cube that would face forward only the total outline, so it doesnt have to draw those faces you would ordinarily see, must save quite a bit of time.

Last edited by Galahad/FLT; 11 April 2021 at 16:40.
Galahad/FLT is online now  
Old 11 April 2021, 18:11   #3
DanScott
Lemon. / Core Design

DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 999
Seems like pure animation to me. Pretty easy to do too.

The other "real" cubes bouncing off the text? maybe that's animation too, they have an vector animation "replay" system (obviously for the zombies too), so no reason not to use it throughout.

Best effect in the demo is the blitter tornado variation at the end (although I think they could have made more of that one too)
DanScott is offline  
Old 11 April 2021, 18:50   #4
Jobbo
Registered User

Jobbo's Avatar
 
Join Date: Jun 2020
Location: Lexington, MA
Posts: 189
I'd still like to know more about how they pull it off.

Even if it's just a stream of lines to draw it still seems like a lot of lines for the blitter to work through and fill all in one frame.
Jobbo is offline  
Old 11 April 2021, 20:16   #5
DanScott
Lemon. / Core Design

DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 999
They don't need to fill the full screen for a start.. they can store "regions" that get filled / cleared, merging regions that overlap etc..)

The blitter can draw quite a lot of small lines per frame too. The broken mirror cube in De Profundis is just a stream of lines to draw

Last edited by DanScott; 11 April 2021 at 20:23.
DanScott is offline  
Old 11 April 2021, 20:22   #6
Jobbo
Registered User

Jobbo's Avatar
 
Join Date: Jun 2020
Location: Lexington, MA
Posts: 189
What sort of memory footprint does the mirror cube animation have?

Is it delta compressed or something like that?

For Fisherhawk Dr. I guess the "magic" is in the offline tool that generates the lines and fill regions. It seems like they're probably pushing the blitter to the max, so it's clever that they could find and stay below that limit.
Jobbo is offline  
Old 11 April 2021, 22:11   #7
DanScott
Lemon. / Core Design

DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 999
Quote:
Originally Posted by Jobbo View Post
What sort of memory footprint does the mirror cube animation have?

Is it delta compressed or something like that?
No delta compression, other than next vertex position is a delta from the previous (so we could store it as a byte)

We also had our tool (written in Unity btw.. a great environment for doing this kind of thing!) output "code" rather than binary, so that we could easier debug (and adjust things by hand if necessary)

Code:
; Format:
; dc.w frames count
; FOR each frame
; 	dc.w minx, miny for all bitplanes
; 	dc.w maxx, maxy for all bitplanes
; 	dc.b intensity for palette entries 1,2,3 (0..63)
; 	dc.b visible polygons count
; 	FOR each polygon
; 		dc.b bitplane mask (1, 2 or 3)
; 			dc.b vertex count-1
; 			dc.w x,y for first vertex
; 			FOR each other vertex
; 				dc.b delta x, deltay ==> relative to previous vertex
; 	END for each polygon
; END for each frame




and an example "frame":

; frame #958
	dc.w		26,46	; min x, min y for all bitplanes
	dc.w		196,220	; max x, max y for all bitplanes
	dc.b		28,49,28	; intensity for each color
	dc.b		3	; polygons count
	dc.b		1	; bitplane mask
	dc.b		42	; vertex count - 1
	dc.w		143,72	; first vertex
	dc.b		4,22,1,1,8,9,-1,1
	dc.b		-9,-3,0,1,3,11,1,0
	dc.b		6,1,-1,1,-8,4,0,1
	dc.b		8,77,0,-1,5,-20,0,1
	dc.b		2,42,1,-1,13,-33,-1,-1
	dc.b		0,-25,1,-1,10,-23,0,-1
	dc.b		1,-13,1,1,8,2,0,-1
	dc.b		-2,-17,-1,1,-8,-1,0,-1
	dc.b		3,-7,1,-1,7,-6,0,-1
	dc.b		0,-45,-1,1,-11,23,0,-1
	dc.b		-2,-19,-39,22
	dc.b		3	; bitplane mask
	dc.b		14	; vertex count - 1
	dc.w		51,56	; first vertex
	dc.b		18,6,1,-1,34,-2,1,1
	dc.b		20,13,1,0,21,-3,1,-1
	dc.b		33,-20,-1,0,-82,4,-1,-1
	dc.b		-11,-6,-35,10
	dc.b		2	; bitplane mask
	dc.b		42	; vertex count - 1
	dc.w		26,124	; first vertex
	dc.b		11,30,1,-1,13,-3,1,1
	dc.b		9,26,1,0,92,23,0,1
	dc.b		0,17,1,0,7,2,0,-1
	dc.b		-3,-49,0,1,-5,23,-1,-1
	dc.b		-5,-75,1,-1,7,-4,-1,0
	dc.b		-8,-1,0,-1,1,-9,1,1
	dc.b		7,2,0,-1,-8,-10,-1,0
	dc.b		-6,-22,-1,0,-20,-1,-1,-1
	dc.b		-18,-12,-1,0,-34,4,1,1
	dc.b		19,11,-1,0,-55,4,1,1
	dc.b		11,44,-16,1

Last edited by DanScott; 11 April 2021 at 22:27.
DanScott is offline  
Old 11 April 2021, 22:13   #8
DanScott
Lemon. / Core Design

DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 999
Each cube in the Melon demo has 6 vertices, and 6 "edges / lines" for the cube, and another 6 / 6 for the reflection.

There are other "tricks" you can pull too...

Imagine one cube needs drawing to bitplane 1, and another needs drawing to bitplanes 1 AND 2... you make sure that the cube that has the longest total lines (in blitter size) is the one drawn to just bitplane 1
DanScott is offline  
Old 11 April 2021, 23:43   #9
Jobbo
Registered User

Jobbo's Avatar
 
Join Date: Jun 2020
Location: Lexington, MA
Posts: 189
Thanks for sharing those details Dan. It's always great to hear how famous effects were really done.

Where it seems complicated for the Melon demo is that there are so many overlapping cubes.

If you only had 5 cubes you could put each on their own bitplane and set the palette according to which is in front. But they have lots of cubes and also reflections for each.

Looking at the bitplanes in memory they are using 4 and so each is a complicated outline where there are overlaps.

I could see how offline you could figure out the perfect outlines for each. But I just don't know if they've done things that way or not?
Jobbo is offline  
Old 11 April 2021, 23:55   #10
DanScott
Lemon. / Core Design

DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 999
Our outputter handles outlines for complex objects, but it's not 100% accurate, so we get some missing pixels here or there. I am sure there are ways to fix this though. Might get Soundy to take another look at it someday soon
DanScott is offline  
Old 12 April 2021, 12:40   #11
rothers
Registered User

 
Join Date: Apr 2018
Location: UK
Posts: 150
I used to use my action replay to have a look how this stuff was (probably) being done, you can do similar in UAE can't you?
rothers 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
Tetris intro by Melon Dezign - Crystal Vollldo request.Demos 4 23 May 2011 17:46
Melon Dezign or bad spoof? canine Amiga scene 4 09 April 2006 13:44
A game by Melon Dezign samson Amiga scene 17 08 October 2004 13:26
Melon Dezign - How to skin a cat zerohero support.WinUAE 10 03 February 2004 22:56
Melon Dezign thinlega Amiga scene 1 19 January 2002 21:08

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 09:59.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Page generated in 0.09462 seconds with 15 queries