pouët.net

Go to bottom

Effects in demos that you don't know how they work

category: code [glöplog]
also, I forgot to mention, goon royale fakes this pretty well too.
added on the 2024-01-19 14:26:22 by ferris ferris
...and it looks to be more or less what gnilk is doing, and robotnik is probably similar :)

(the live evil and other voxels are quite different ofc)
added on the 2024-01-19 14:31:26 by ferris ferris
ferris: the only thing that gives me a headache at the moment is "The .exe file is crunched by Titanic's cruncher." according to .nfo file. What does this mean? Maybe one must decrunch it to the original exe before attempting to reverse engineer it, i might be wrong, but still something i havent had the time too look at because of lack of time.

if one could not of course do debugging while the demo is running(in realtime), but not sure if it is more hazzle than productive. but yeah, it should not be a problem to figure out stuff if one focuses ones attention on solving it.
added on the 2024-01-19 14:41:17 by rudi rudi
if it is decrunching into memory, thats a different story of course. then just put it into an disassembler or whatever...
added on the 2024-01-19 14:42:39 by rudi rudi
You could try contacting the original coder, perhaps?
added on the 2024-01-19 15:48:12 by sagacity sagacity
sagacity: that could be one possibility if needed. i think i have to atleast make an attempt at coding something first. unfortunately a bit busy atm. but maybe later.
added on the 2024-01-19 23:47:10 by rudi rudi
I don’t understand how rotating cubes were created in text mode in the start menu of the demo "The good, the bad & the ugly" by Surprise!Productions

look:
https://i.imgur.com/hmPQ4k4.mp4

I understand how to make just a cube (changing the system font in real time)... But text is displayed on top of the cube! I don't understand anything! And yes, if you believe the info file, this is a text mode.

PS: This does not work in standard DosBox. But in Dosbox-X everything is ok (keep in mind).
added on the 2024-01-20 11:30:39 by bitl bitl
Quote:
I don’t understand how rotating cubes were created in text mode in the start menu of the demo "The good, the bad & the ugly" by Surprise!Productions

My guess is that they switch to graphics mode at the flash. The text has to be rendered to one of the bitplanes, the cube goes into the rest.
added on the 2024-01-20 11:36:28 by neon neon
Quote:

My guess is that they switch to graphics mode at the flash. The text has to be rendered to one of the bitplanes, the cube goes into the rest.


This is the simplest explanation that comes to mind... But what kind of graphic mode is this, in which the font is 100% identical to the font in text mode? Compare, they are identical.

We also see a blinking cursor (in graphic modes it does not blink).
added on the 2024-01-20 12:12:37 by bitl bitl
Would it have to be a specific mode? It's just pixels...
added on the 2024-01-20 12:55:22 by absence absence
Quote:
Quote:

My guess is that they switch to graphics mode at the flash. The text has to be rendered to one of the bitplanes, the cube goes into the rest.


This is the simplest explanation that comes to mind... But what kind of graphic mode is this, in which the font is 100% identical to the font in text mode? Compare, they are identical.

We also see a blinking cursor (in graphic modes it does not blink).


I you look closely the characters gets a tiny bit wider after the blink. This is probably because the standard 80x25 text mode on VGA is 720x400 (9x16 pixel characters) and the graphics mode is 640x400 with only 8x16 pixel characters.
added on the 2024-01-20 13:03:22 by neon neon
Quote:
My guess is that they switch to graphics mode at the flash. The text has to be rendered to one of the bitplanes, the cube goes into the rest.

this seems to be a reasonable guess, as confirmed by both DOSBox-X and PCem - the screen width changes from 720 to 640 lines, as VGA text mode is internally outputs characters as 9 pixels wide, even though the font width is 8 pixels. Also, 640x400 16-color graphics and 80x25 text mode share the same horisontal CRTC parametes, only the pixel clock frequency (25 vs 28 MHz) and number of clocks per character (8 vs 9) are different, so this switch can be done almost seamlessly.
I also recall this part to be particularly buggy on NVidia cards, as the demo seems to grab the wrong font and draw the next with 8x8 chars, spoiling the effect completely :)

by the way, this prod had a similar effect after ending the demo (drawing the "pi" symbol over text mode screen) - afaik it did work only if demo was launched from the Volkov Commander, otherwise it crashes the PC.
added on the 2024-01-20 13:48:31 by wbcbz7 wbcbz7
Quote:
VGA text mode is internally outputs characters as 9 pixels wide

It can also output 8 pixels per character in a text mode with 640 horizontal pixels, and there's probably a way to have 720 horizontal pixels in graphics mode (at least you can get 360 in low resolution), so the transition could have been made more seamless if they really wanted.
added on the 2024-01-20 14:12:02 by absence absence
it can, of course, but the default BIOS text mode uses 9 pixels wide font and if we want seamless transition, this kind of breaks the effect flow (alright, it is already broken in GBU example if you watch closely :D)
As for 720-wide graphics mode, it could be done this way, but then you have to simulate 9-pixel textmode pixel layout by shifting the font (remember that 16-color VGA mode are planar), and this comes with a performance penalty.
added on the 2024-01-20 14:30:24 by wbcbz7 wbcbz7
Quote:
this comes with a performance penalty

Maybe I'm missing something, but wouldn't it only be done once? It could even be done before the fade starts, if took noticably long time.
added on the 2024-01-20 16:01:16 by absence absence
Tip: use a debugger and read AX before it calls INT 10h? Use Dosbox's Debugger or something better.
added on the 2024-01-20 18:32:34 by rudi rudi

login

Go to top