Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user maak ! (Registered 2024-04-18) You are not logged in - nap
CSDb User Forums


Forums > CSDb Entries > Release id #116340 : Time Machine
2022-01-22 01:04
Shadow
Account closed

Registered: Apr 2002
Posts: 355
Release id #116340 : Time Machine

Multiplexers are cool, and multiplexed DYSPs are of course even cooler!
I started thinking about the record here (32 sprites, 100 pixels y-movement) and when I calculate it, it seems mathematically impossible.
Taking 32 evenly distributed points along a 50-radius sine wave, I end up with at least 9 coordinates that are within 21 y pixels of each other, which would mean lines with 9 sprites on them.
Now, this demo uses added sines, and maybe it's here I'm messing up, because when experimenting with this, no matter what I try with two added sines, I always end up with worst-cases that are even worse than the original single sine.
Am I missing some simple math, or is this just a case of good old demo magic cheating somehow? :)
 
... 2 posts hidden. Click here to view all posts....
 
2022-01-22 02:31
chatGPZ

Registered: Dec 2001
Posts: 11100
What i have done here and there... if there is some "impossible" combination of coordinates/sprite sprite positions - just skip it, move some sprite a line up or down. noone will notice it =)
2022-01-22 05:06
Raistlin

Registered: Mar 2007
Posts: 549
Quote: What i have done here and there... if there is some "impossible" combination of coordinates/sprite sprite positions - just skip it, move some sprite a line up or down. noone will notice it =)

I think that’s the point here though… “no-one will notice it” is fine for regular demos… ones that are going for world records, though, can’t really do that.. it would be “cheating” ;-)
2022-01-22 11:40
chatGPZ

Registered: Dec 2001
Posts: 11100
Wow cheating in demos? WTF
2022-01-22 12:40
JackAsser

Registered: Jun 2002
Posts: 1987
Quote: Wow cheating in demos? WTF

Hahaha indeed WTF. :)
2022-01-23 01:33
Raistlin

Registered: Mar 2007
Posts: 549
Quote: Hahaha indeed WTF. :)

You know what I mean though… I’m sure in HCL’s scrolltext somewhere he mentioned that the records were achieved without cheating on the sinuses. Like, it would be something like:-

Y = A * Sin(B) + C * Sin(D)

Without any further modification.

While (!bSpriteFits) Y++

would be “cheating”. I know most people wouldn’t see it - but if that was happening, it would be hard to say “I beat you, Crossbow!” (Or whoever).
2022-01-23 02:05
chatGPZ

Registered: Dec 2001
Posts: 11100
Reminds me of the scrolltext where crossbow explained the vertical rasters =)
2022-01-23 08:07
ChristopherJam

Registered: Aug 2004
Posts: 1370
The first couple of harmonics of a triangle wave will get you there.

cos(th)*45+cos(th*3)*5 ranges from -100 to 100, and the closest gap in a sorted sprite list of 32 evenly distributed phases never drops below 21.5

You get a slightly more comfortable function from cos(th)*44.13+cos(th)*5.87. Minimum gap for that is around 22.9. Bump the overall range to 100.9 and you'd increase the gap to a touch over 23.
2022-01-23 11:40
Shadow
Account closed

Registered: Apr 2002
Posts: 355
Thanks CristopherJam, cool to see that there was a mathematical solution to this!
In my very non-mathematical try-different-values-and-see-what-happens I never stumbled upon this since I never tested with two waves with so large difference in amplitude.
The resulting wave btw. is very triangular-looking, but it still is the result of two correct waves added, so not at all cheating.
A satisfying end to this little mystery!
2022-01-24 09:20
HCL

Registered: Feb 2003
Posts: 716
Oh yeah.. i'm the subject of another deep discussion *again* ;)..

Haha, i actually found the bunch of c-programs that i used for generating those sinuses, ending up with almost one program specialized for the properties of each part in the demo.. I will save you from that mess, but yes they loop through some million sinuses, first finding the best angular offsets for the purpose, and then trying a bunch of fraction offsets to the results to see if the quantization (float -> integer) accidentally generates a better result..

Simply rocket science at its best :D.
2022-01-24 14:49
chatGPZ

Registered: Dec 2001
Posts: 11100
As always, if you can't make it work using brute force, use a bigger hammer :=)
Previous - 1 | 2 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Avalanche/Atlantis
chiefy/padua
Krill/Plush
Matt
Grue/Extend
Mason/Unicess
Guests online: 83
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 The Ghost  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.9)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 Wafer Demo  (9.5)
7 TRSAC, Gabber & Pebe..  (9.5)
8 Onscreen 5k  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Original Suppliers
1 Derbyshire Ram  (9.5)
2 Black Beard  (9.4)
3 hedning  (9.2)
4 Baracuda  (9.1)
5 Irata  (8.5)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.057 sec.