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 > CSDb Entries > Release id #112378 : Coma Light 13
2012-11-06 21:59
Nightlord

Registered: Jan 2003
Posts: 131
Release id #112378 : Coma Light 13

now that we all had watched this many times, I wanted to ask if the authors can give a bit more info on the technical side of things. The demo has a really entertaining notefile but coders want more detail, so that we know what exactly we need to beat :)

For instance is the shadow casting vector realtime, or the dualpyramid with the 4 circles attached to its vertices. is that realtime?

Thanks again for a great demo.
2012-11-07 06:52
Peiselulli

Registered: Oct 2006
Posts: 81
Axis has programmed this two parts, but as far as I can see, it is all realtime.
2012-11-07 11:27
Mace

Registered: May 2002
Posts: 1799
Yes, please put well commented source codes on Codebase64, please ;-)
2012-11-07 13:02
Oswald

Registered: Apr 2002
Posts: 5017
I suspect Axis is using the sprite priority trick for the shadow vector but am too lazy to check. :)

- one layer of dithered sprites for the new color to show up
- one layer of simple shadow, which trough the priority trick shows the dither layer sprites (only where the shadow is visible)
- use X expanded sprites for bigger layer, each is one color only anyway
- move layers as needed horizontally so shadow fits into them (24 chars)
- change colors by raster interrupts
- 2 color chessboard in charset

very clever :)

same is done in the next part, the twister.


no idea how is the wavy chessboard stuff done, looks like something imported from amiga
2012-11-07 13:23
chatGPZ

Registered: Dec 2001
Posts: 11108
"no idea how is the wavy chessboard stuff done"
FPP+rastercolors. seems one of the easier effects in that demo to me :)
2012-11-07 14:49
Oswald

Registered: Apr 2002
Posts: 5017
yeah, but how do you calculate the shape of it fast enough?
2012-11-07 14:52
chatGPZ

Registered: Dec 2001
Posts: 11108
hu? what shape? you mean the sinus? i'd say thats a table =P
2012-11-07 17:33
Oswald

Registered: Apr 2002
Posts: 5017
sure, 3d rotation calcs are a table aswell. a sinus. thats all.
2012-11-07 22:47
Skate

Registered: Jul 2003
Posts: 490
@Oswald: No, 3d rotation is table lookups+multiplies+additions. This effect is direct table lookups (maybe multiple table lookups). That's why it's possible to do in less cycles than a 3d rotation routine.

Think about a kefrerns bars (or alcatraz or whatever you call it) effect. This effect is as 3d as that one. Better picture now?
2012-11-08 07:04
Oswald

Registered: Apr 2002
Posts: 5017
thanks, I have some vague ideas like that, but no idea exactly how it is done :) probably its like a voxel landscape, here it's only one "ray" sent out.
2012-11-08 07:50
HCL

Registered: Feb 2003
Posts: 716
Exactly, the carpet looks very amigaish, but is probably quite simple. Genius in other words :).

Shadow-vector must have been a pain to code. Even though Axis has done quite a few projecting vectors like mirroring and stuff, this shadow here is also dithered and very big at certain angles. But like Oswald says, perhaps it's possible to draw the shadow as a plain layer with no dithering. By placing a constant dithered layer with highest priority sprites behind the floor, it will become visible when the filled shadow layer (of low-prio sprites) is placed in front of the floor. Still you have to split d025-26 correctly with a f**king cube flying randomly, and we all know Axis hates that ;).

Vector with balls is technically not that hard, but very well executed. We have all seen Reflex do 5 balls, 4 with sprites + one with chars. Here the 5:th ball is replaced with a vector octahedron. I am a bit amazed about the speed of the vector though, as i can imaging putting out those 4 sprite-balls may need quite some timing and stuff.
2012-11-08 07:59
Bitbreaker

Registered: Oct 2002
Posts: 500
It is an FLI done each second line to force a new charset and screen to be loaded and not to stretch the dithering what would happen on a per line update like with FPP. Also the stuff is interlaced by using two banks. During FLI the z-tab is cleared to have a bit more time for generating a new one and be able to load the next part (Mostly this part was thought for bootstrapping the second side)
The z-effect is done by creating a z-tab, by starting with the deepest z-value and just writing the y-positions from a sine-table (higher z-values by that overwrite lower ones and thus lower parts get automatically hidden). Z thereby determines x-size of the chessboard that is represented via the FLI, as well as what colors that are set for the multicolorcharset (be aware of gray dots, YUCK). So for the white parts of the chessboard colors are changed interleaved, while the blue parts just fade from blue to black (multicol 3 -> colram), as else one would run out of colors.
Basically one can put any bitmap-texture on all that, but there are some caveats with the color-interleaves and horizontal lines that appear very stretched.

That is how the texture looks like before it is split up into 2 line high blocks and converted to the respective charsets + screens:

2012-11-08 09:41
Oswald

Registered: Apr 2002
Posts: 5017
checked again the cube shadow, maybe I was thinking too much into it, as the cube and the shadow can intersect heavily, that would cause big headaches with sprite layer tricks.

it's not a huge problem to draw it entirelly either tho. probably axis is being clever the other way round, and only updates what needed & to have the shadow intersected by the chessboard its not much extra stuff having to plot into the eor buffer, you can speedcodize the chessboard lines plotting lda sta sta sta sta style. even pick only the lines that have to be redrawn.


edit: or, setup the eorbuffer with the chessboard lines, then draw/erase the shadow lines with eor, only fill out what needed and done.
2012-11-08 10:01
Oswald

Registered: Apr 2002
Posts: 5017
thanks, I get the chessboard stuff now, it helps a lot also that there are only 100 lines to calculate :) thats a cool cheat as its not visible at all. I guess it wouldnt look 5% nicer if all 200 lines were done.
2012-11-08 10:04
Bitbreaker

Registered: Oct 2002
Posts: 500
It would look uglier with 200 lines, as you'd then stretch the pixels in y-direction what would spoil all the (interlaced) dithering put into that effect, something i really dislike with the FPP effects. Win-win i'd say :-)
2012-11-08 10:38
Oswald

Registered: Apr 2002
Posts: 5017
it is possible to dither correctly 200 lines aswell. just split the Z gfx mapping tables into dither style A (*x*x*) and B (x*x*) and read from A on odd lines from B on even lines. split up GFX similarly, gfx type A is all *x*x and vica versa.
2012-11-08 11:52
Bitbreaker

Registered: Oct 2002
Posts: 500
Well, should work, but a quite some obstacles connected to that, compared to:

lda $dd00
eor #$02
sta $dd00

per frame :-)

That way you might need to update per line: $d018, $d011, $dd00, $d021, $d022, maybe a bit tight with having badlines only :-)
I'd be very happy to see lots of effects in a better quality, either in hires/ecm or at least properly dithered and maybe even interlaced. So don't hesitate to come up with a hires 200 line version :-)
2012-11-08 12:02
Oswald

Registered: Apr 2002
Posts: 5017
in soiled legacy I've managed to update all those ;), tho cheating like hell, d021/22 is updated on odd/even lines, and there's an lda dd00 in the raster speedcode for each line which is modded to sta dd00 when the checkers needs to be inverted (hint: lowest bit in d018 is unused, the value for d018 can be reused :) needed special drive code so it will not try to interpret all the crazy dd00 writes as input.
2012-11-08 12:05
Peiselulli

Registered: Oct 2006
Posts: 81
use krill loader and let the upper 6 bits of $dd00 to zero, that works perfect. "SAX" instead of "STA" with X register set to $03 helps a lot here ...

2012-11-08 12:10
Bitbreaker

Registered: Oct 2002
Posts: 500
Yeah, a nice feature is that unsued bit, used that trick it in my hires twister in Ächzzeit as well :-) If you want to avoid loader trouble, SAX is your friend, if you can afford wasting one register for that purpose only, that is.
Edit: Urks, Peiselulli was faster :-P
2012-11-08 12:19
Oswald

Registered: Apr 2002
Posts: 5017
that SAX trick could have been used nice one. btw looked at that code, its even more crazy than I remembered. the raster speedcode has to be all selfmodded, no time to load from tables each lda is lda #$00, also there's only time on each 2nd line to write to dd00 :)
2012-11-08 21:32
Skate

Registered: Jul 2003
Posts: 490
well, it would be much nicer to have an official tech notes instead of guessing how those effects are done, right? :)
2013-01-14 14:39
Bitbreaker

Registered: Oct 2002
Posts: 500
Skate: No tech note so far, but this might give some more hints regarding the chessboard. It also explains other effects that base on the same principle.

http://www.codebase64.org/doku.php?id=base:twisters_x-rotators_..

@all: Now don't say it is cheap, now as it is clear how things are done :-)
Also the monitors built into our carts are a very legitimate mean to understand what's happening on the screen :-) Don't be a pussy, that is all that we had back these days when we wanted to understand what others did, isn't it? :-)
2013-01-14 18:55
PopMilo

Registered: Mar 2004
Posts: 145
Quote: Skate: No tech note so far, but this might give some more hints regarding the chessboard. It also explains other effects that base on the same principle.

http://www.codebase64.org/doku.php?id=base:twisters_x-rotators_..

@all: Now don't say it is cheap, now as it is clear how things are done :-)
Also the monitors built into our carts are a very legitimate mean to understand what's happening on the screen :-) Don't be a pussy, that is all that we had back these days when we wanted to understand what others did, isn't it? :-)


Wow! That is one nice piece of code!
Thanks !!!
2022-02-25 23:46
Krill

Registered: Apr 2002
Posts: 2839
Just needed to do some forensics, and found that the loader version/configuration string was nulled.

Really, if you need to go into these depths of "optimisation", you're doing it wrong and your cruncher sucks. =)
2022-02-25 23:50
chatGPZ

Registered: Dec 2001
Posts: 11108
How though? Whatever isnt needed, gets deleted. And "loader identification string" qualifies for this for sure :)
2022-02-25 23:53
Krill

Registered: Apr 2002
Posts: 2839
Oh well, i did hide some version numbers in the code at some point, precisely because of this lame thinking. =)

(And yes, it is needed once in a while (re: forensics), just not for the demo to run.)
2022-02-26 00:01
chatGPZ

Registered: Dec 2001
Posts: 11108
> Oh well, i did hide some version numbers in the code at some point, precisely because of this lame thinking. =)

So basically disassembling the binary blob and then kill what shouldnt be there is still needed - thanks for the hint :)
2022-02-26 00:22
Krill

Registered: Apr 2002
Posts: 2839
You're obviously trolling, and the source is still open, but setting a few single bytes here and there to... something else will most likely not provide any crunching gain to speak of. =) (If that's what you're after.)
2022-02-26 00:31
chatGPZ

Registered: Dec 2001
Posts: 11108
Not trolling at all - disassembling the binary blob and then optimizing it for my needs is what i do, i am faster at that than what it would take to understand the macromessoverkill to do the same with the original source (and AFAIK its also what bitbreaker did before he made his own thing). Its also easier to integrate that way (because i am not using ca65 for anything demoish)
2022-02-26 00:41
Krill

Registered: Apr 2002
Posts: 2839
You failed so far to show me a better way of achieving the multi-platform/multi-drive support without macros, and they're generally not used just for the sake of using them.

Also you don't assemble SID tunes for your demos yourself, do you?
The loader is just another library, like SID tunes are, and is supposed to be linked as binaries anyways when you're not using ca65.
2022-02-26 00:57
chatGPZ

Registered: Dec 2001
Posts: 11108
Quote:
You failed so far to show me a better way of achieving the multi-platform/multi-drive support without macros

why would i? demo is runnung on c64, with 1541.
2022-02-26 01:24
Krill

Registered: Apr 2002
Posts: 2839
I was referring to the loader code with its "macromessoverkill". C-64 and 1541 are not its only targets.
2022-02-26 15:45
Bitbreaker

Registered: Oct 2002
Posts: 500
Back then even more memory got wasted, like with a script that was resident and loading the respective parts. $200 bytes are enough for everyone and i still stick to it. As for assembling SID tunes, there's SDI with TASS-source if you need to relocate /o\ I don't see any problem in nulling out the version number, nor would i waste any byte for it, nor did i wipe it out :-D Afaik it was a ported version that was working with acme back then, and i guess anything that was not needed was simply thrown out. Because one could as the main reason :-D
2022-02-27 12:45
Krill

Registered: Apr 2002
Posts: 2839
Quoting Bitbreaker
$200 bytes are enough for everyone and i still stick to it.
Sure, $0200 bytes for the resident loader portion is just perfect to stick it at $0200-$0400 in memory. :)

Quoting Bitbreaker
Afaik it was a ported version that was working with acme back then, and i guess anything that was not needed was simply thrown out. Because one could as the main reason :-D
I have seen "Krill's loader, version acme" elsewhere, and this explains. :D

I can see why you'd reverse-assemble the resident loader binary and port it to the assembler of your choice for some dabbling, but i don't quite see the point for the install code. (Except forking, ofc. =D)

In this case, that somebody wasn't quite thorough, though. Pointer to version string is still set up and returned by the install routine, just that it points to zeroes. :)
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
Twilight/Excess/Arcade
Nordischsound/Hokuto..
zscs
Lavazza/Censor Design
algorithm
Guests online: 154
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 The Ghost  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.8)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Onscreen 5k  (9.5)
8 Wafer Demo  (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 NTSC-Fixers
1 Pudwerx  (10)
2 Booze  (9.7)
3 Stormbringer  (9.7)
4 Fungus  (9.6)
5 Grim Reaper  (9.3)

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