Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Demo effect sequencing
2013-11-06 08:21
ChristopherJam

Registered: Aug 2004
Posts: 1409
Demo effect sequencing

How does everyone script their effects these days? (e.g., if you're calling effect1 for 100 frames, then the init for effect2, then effect2 for the next 240 frames etc)

Ad hoc timers and flags, or some kind of scripting language compiled to an include, or?
2013-11-06 08:28
Bitbreaker

Registered: Oct 2002
Posts: 508
You could use a global counter and refer to that by a table that holds the value to reach for each part. Then again when you do all alone, you can just forgo on that and let each part run as long as you need. Not the elegent version but keeps you away from wasting bytes for frameworkshits and something that is close to mental masturbation :-)
2013-11-06 08:34
doynax
Account closed

Registered: Oct 2004
Posts: 212
I'll be the first to admit that I don't know the first thing about demo coding, but I always assumed this type of synchronization was handled through meta-data in the music tracks.
2013-11-06 09:18
Dane

Registered: May 2002
Posts: 423
For our demos with music sync we've used the global counter method. HCL and I also agree quite early on the tempo, so he can work with that when designing sinuses, fade-outs and similar.

Depending on what you want of course it could be useful to read data from the music as well.

For the spinning picture in Andropolis we even write data into the music - the sinus for the spinning picture is shifted and written into the filter register, to create that helicopter rotor-sound. :)
2013-11-06 10:23
Oswald

Registered: Apr 2002
Posts: 5095
global frame counter here (16bit). each time the music is called the counter is incremented, no desynch is possible.

when I need to flash the screen fex. to drums, then I load up "it's rythm" c64 native tool, which helps to hunt down memory locations and values to look for.

I've no knowledge of play routine that helps with metadata, maybe some do tho.
2013-11-06 13:39
Stone

Registered: Oct 2006
Posts: 172
In Offence, we usually agree beforehand to use a specific memory location, say $dc01, to signal the transition to another effect. Other times, we use Pantaloon. I highly recommend Pantaloon.

To be serious though: I generally use a global frame counter and state tables (a list of subroutines).
2013-11-06 15:40
algorithm

Registered: May 2002
Posts: 705
I use the quick and dirty method via vice snapshots to time each routine and adjust counter when required, then to use the required value, assemble, crunch, link and on and on...
2013-11-06 17:10
Fuzz

Registered: Nov 2004
Posts: 19
Some music editors have an "event" flag.. basically the composer can set that flag whenever they want and the coder can monitor it. As soon as the flag changes the next event can happen.

Cosine's EMS 7 music editor has this function.
2013-11-06 17:26
chatGPZ

Registered: Dec 2001
Posts: 11391
i am another global counter boy. one very handy thing about it (imho) is that you can very easily add the 100ms extra delay so you can edit sync in emu
2013-11-06 19:45
lft

Registered: Jul 2007
Posts: 369
Why, Spindle of course.
2013-11-06 21:46
Hate Bush

Registered: Jul 2002
Posts: 466
"Cosine's EMS 7 music editor has this function."

Goat Tracker has it as well.
2013-11-06 23:09
CreaMD

Registered: Dec 2001
Posts: 3058
In my version of DMC5.0 I butchered AD (there is AD and SR command in dmc.. quess what is it doing) command for that (never used it) the value in AD command (wchi can be used in any track in any channel) can be easily read from the memmory (somewehre in the music routine memory area).. you can have 255 different values for anything.. timing is absolutely exact.. tested on a simple intro, dunno if it was released. Apart from that I never used it anywhere yet.

In We can't code the demo was "recorded" by hand. I was pressing the keys to launch the routines. Every key (from numeric keyboard) had some routine hooked on it. It was recorded and then replayed back.. what a crappy idea.. I don't know how many times I started over...
2013-11-07 17:40
ChristopherJam

Registered: Aug 2004
Posts: 1409
Wow, Spindle looks fantastic. I started trying to write something similar in the leadup to BFP 2006, but left it too late, and by the time I began half my parts were already shitting all over $dd0x and $01, so debugging was a nightmare.

Global counter looks like a pretty popular source of synchronisation. Still doesn't say how people wrangle jump tables etc, but for now I'll keep bashing a BCC into a list of JMPs when each routine detects it's complete. (or, you know, use a jmp indirect if I'm particularly low on space..)

I was considering using my music player to generate an extra stream of bytes for (e.g.) routine ID per frame, or perhaps also a stream of modulation values. Interesting that no-one seems to have gone beyond a 'skip to next' flag.

Very cool about the rotor effect!
2013-11-07 17:43
ChristopherJam

Registered: Aug 2004
Posts: 1409
@CreaMD - that "recording by hand" thing is giving me nightmare flashbacks; a lot of the missions on Driver and Driver 2 were built that way, back when I was a PSX dev. So many restarts, and I wasn't even the one driving. A good portion of the time even just re-exporting the game level would disturb the physics enough that they'd all need recording all over again.
2013-11-07 18:35
chatGPZ

Registered: Dec 2001
Posts: 11391
Quote:
Interesting that no-one seems to have gone beyond a 'skip to next' flag.

coma light 13 syncs directly to the music, for example. also in crowdpleaser a bunch of things are synced to the music.
2013-11-07 19:50
Bitbreaker

Registered: Oct 2002
Posts: 508
groepaz: Nope, it uses a global frame counter + a small script that calls all the parts and waits ofr timing marks. In fact the music was synched to the demo, Fanta loves to have pain in the arse, and also he deserved it :-P Of course we threw over all timing marks just a few days before X :-P The only part synching to the music is the turn disc part and it also manipulates the pattern sequence when done.
2013-11-07 20:07
chatGPZ

Registered: Dec 2001
Posts: 11391
i remember someone telling me otherwise :) (you seriously synced those bending vector dots manually? what a waste of time =D)
2013-11-07 20:13
Bitbreaker

Registered: Oct 2002
Posts: 508
Don't listen to drunk Oxyronmembers! :-) Musicians are lazy bums anyway, it is good to offload the work to them :-)
2013-11-07 20:15
chatGPZ

Registered: Dec 2001
Posts: 11391
true =)
2013-11-08 08:50
CreaMD

Registered: Dec 2001
Posts: 3058
Bitbreaker, Groepaz:

In other words. Yes, it's much better to have musicians synchronise your lamzor effects. coz musicians feel rythm and have sense for drama*, unlike coders!



*some coders are drama queens, but that's not exactly the same.
2013-11-08 17:16
chatGPZ

Registered: Dec 2001
Posts: 11391
that would mean they actually do anything when being told so...... =P
2013-11-08 17:53
Hein

Registered: Apr 2004
Posts: 954
If you suck their dicks and let them cum in your mouth, sure
2013-11-08 17:56
chatGPZ

Registered: Dec 2001
Posts: 11391
wat?
2013-11-08 21:29
ChristopherJam

Registered: Aug 2004
Posts: 1409
Well that escalated quickly O_o
2013-11-08 21:45
Hein

Registered: Apr 2004
Posts: 954
that ejaculated quickly indeed. A bit of synergy does wonders.
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
sln.pixelrat
anonym/padua
Guests online: 92
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Coma Light 13  (9.6)
4 Edge of Disgrace  (9.6)
5 Mojo  (9.6)
6 Uncensored  (9.6)
7 The Demo Coder  (9.6)
8 Comaland 100%  (9.6)
9 What Is The Matrix 2  (9.6)
10 Wonderland XIV  (9.5)
Top onefile Demos
1 Layers  (9.7)
2 Cubic Dream  (9.6)
3 Party Elk 2  (9.6)
4 Copper Booze  (9.6)
5 Dawnfall V1.1  (9.5)
6 Rainbow Connection  (9.5)
7 Morph  (9.5)
8 Libertongo  (9.5)
9 Onscreen 5k  (9.5)
10 It's More Fun to Com..  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Oxyron  (9.3)
3 Performers  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Logo Graphicians
1 t0m3000  (10)
2 Sander  (9.8)
3 Mermaid  (9.5)
4 Shine  (9.4)
5 Pal  (9.4)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.068 sec.