Author Topic: Vectronix GTA cracktro code  (Read 176 times)

0 Members and 1 Guest are viewing this topic.

Offline KrazyK

  • Amiga 1200
  • ****
  • Posts: 397
  • Karma: 136
    • View Profile
    • KrazyK Remakes
Vectronix GTA cracktro code
« on: August 05, 2026 »
Here's the Vectronix cracktro code including userlibraries for PB x86 5.73+
Feel free to use/abuse/improve.
I've also posted the updated vis demo exe in the projects section after getting back from Scotland this week.
https://www.dbfinteractive.com/forum/index.php?topic=7030.0
Challenge Trophies Won:

Offline ttemper

  • Amiga 1200
  • ****
  • Posts: 271
  • Karma: 7
    • View Profile
Re: Vectronix GTA cracktro code
« Reply #1 on: August 07, 2026 »
very nice... will check it out when i get the chance. it's always nice to see how other coders do things.

Offline ttemper

  • Amiga 1200
  • ****
  • Posts: 271
  • Karma: 7
    • View Profile
Re: Vectronix GTA cracktro code
« Reply #2 on: Yesterday at 05:55 AM »
Big thanks KrazyK for the code to check out.

In my poking around, I noticed that you still use an old PB version 5.71 or such IIRC. ouch. and for many days I was pulling my hair as to why PB 6.2.0 wouldnt render things properly, until one day half asleep I peeped the idea that the older versions of PB use DirectX as the renderer, not OpenGL... so i put DirectX9 as the render and bingo, everything renders fine. \o/

On that note... I went down a rabbit hole, and by rabbit hole I mean it was more like an ant-farm.

I coded and recoded your Vectronix cractro using PB 6.2.0... removed a heap of code, added in new code and got it all working again. Your transparent blit proc only works on DX, so i fixed that by using a work-around method using 32bit images with dedicated alpha table (RGBA, not just RGB) and adjusting the draw commands to suit what was needed. Needless to say that the images now blit in reverse (cut out) to reveal the raster underneath keeping the background fully transparent, and with zero performance hit (unlike the previous method i used which was a cpu hammer).

What I changed...

  • updated constants.
    created enumeration.
    created new proc to convert a color to fully transparent and set the alpha channel to this (32bit image).
    removed (commented out) dx drawtransparentimage proc.
    updated the static text page proc(s) to use new drawing routines (works in dx9 and opengl with pb 6.*). display + wipes.
    updated the small scroller code to use any bitmap font chosen. swapped out the small bitmap font for 'chunky monkey' atari-st bitmap font (found it after a bit of a scavenger hunt... now i have about ~300 atari-st bitmap fonts to use).
    updated the big scroller code for the new drawing routines (works in dx9 and opengl with pb 6.*)
    swapped out the main logo/background image for a 'screenshot' from yt on the original capture of the cracktro (32px borders kept in).
    adjusted most of the blits to render to sprites, then draw those to screen... since when adjusting screen resolutions, it keeps the scaling proper (unlike drawing directly to screen).
    adjusted all draw sprites to smaller resolution to fit within the new background to give that 'border' effect like the atari-st has.
    numerous other tweaks and code changes (i have certainly learned more from poking around, updating/changing code... so thx).

Attached is my compiled version (PB 6.2.0) to check out.