| |
Raistlin
Registered: Mar 2007 Posts: 680 |
Blog: All Border Double DYPP
So.. a few people had asked me about how I created certain effects.. I love blogging about code (I do this for my game-dev work, for example, and have done on-and-off for 10 years)... so...
https://c64demo.com/?p=19
The website needs a LOT of work, I know .. but for now it gives me a sandbed to upload these texts to.
Please let me know if you spot any mistakes, if you think I've overlooked explaining anything important, if you think I'm stupid and missed some obvious optimisation, etc...
Cheers! |
|
... 51 posts hidden. Click here to view all posts.... |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
Quote:the blit code is variant.
sure. it's almost never so bad that a codegen cant be knocked up relatively easy though :) Reminds me i have to try sweet16 for this. |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Quoting Groepazit's almost never so bad that a codegen cant be knocked up relatively easy though :) Back when coding +H2K i had codegens for all effects.
One effect (the fish-eye lens going across a bitmap) ended up with precompiled unrolled code on the disk, though, and that was because generating the highly-optimised code during run-time took a lot (like 2-3 times) longer than simply loaddecrunching it from disk. :) |
| |
Raistlin
Registered: Mar 2007 Posts: 680 |
Quote: Quote:the blit code is variant.
sure. it's almost never so bad that a codegen cant be knocked up relatively easy though :) Reminds me i have to try sweet16 for this.
I can PM you some of the generated ASMs if you want to give it a go… more than happy to do that.
I wrote codegens back in the 80s - Delirious 10 would’ve used them for example.. but I was told early on when I returned to the scene that that’s not how most trackmos are done nowadays… and, strange as it felt, I like it this way. Sparkle loads the data so fast, why stress? Having the demo be slick and fluid is more important. Even with codegen, you’re nothing like guaranteed to reduce the #disks needed anyway.. |
| |
Burglar
Registered: Dec 2004 Posts: 1101 |
Quoting RaistlinWe do that throughout our demos and that’s part of the art nowadays. That's very interesting to hear, must feel liberating :)
Quoting RaistlinHaving the demo be slick and fluid is more important. I'd say that's most important :) |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Quoting RaistlinHaving the demo be slick and fluid is more important. Quoting BurglarI'd say that's most important :) Of course it is, but this isn't mutually exclusive with having run-time code generators. :)
(What does turning the disk a second time do to the flow?) |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
idk, to me it looks pretty lame that most 'mega'demos today need to turn disk after the intro and 1-2 part. |
| |
Bitbreaker
Registered: Oct 2002 Posts: 508 |
Quote: Yep, it generates full unrolled code. With modern IRQ loaders, like Sparkle and Spindle, it doesn’t noticeably slow things - just load the code in the background of a simpler part if that’s necessary. We do that throughout our demos and that’s part of the art nowadays.
I'm not sure if this is really part of the art, at least it can't be common sense, as i have a different view on this :-D What happens is, that disks then get extended to more disksides or even 40 tracks. Making parts small gives also more freedom in preloading. Also i am no fan of those short offset packers that waste a lot of ratio. In fact loading less and depacking slower does just take the same amount of time, but less diskspace. Not always, but often i do codegenerators when it is about huge structures or unrolled code. But i start with macros and loops first to make the code more readable. Then when you notice that you run out of diskspace and can avoid another diskside, it sure is the first thing i am going to do. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
Quote:I can PM you some of the generated ASMs if you want to give it a go
doing this for someone elses code is certainly not on my todo list :=) |
| |
Raistlin
Registered: Mar 2007 Posts: 680 |
The fact is, and I can tell you this with some certainty, C64 code generators won’t work on 90% of my parts because there are several layers of optimisations that simply couldn’t be done in 6510 in a decent timeframe.
It might sound like an excuse - I guarantee that it’s not. The best that I can imagine could be done is to tokenise some sections - but that’s certainly not going to reduce things enough to save a disk side. And without that, what’s the point? Who cares if a trackmo is 2.5 disk sides instead of 3? |
| |
Raistlin
Registered: Mar 2007 Posts: 680 |
Quote: Quote:I can PM you some of the generated ASMs if you want to give it a go
doing this for someone elses code is certainly not on my todo list :=)
I simply offered to send you the AsM .. figured that it’s a good way to show you why a 6510 codegen wouldn’t make a huge difference… you wouldn’t be saving much on the disksize of the part. |
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 - Next |