ThinkC Movie Crawl

Relating to ThinkC Development

Mu0n

Active Tinkerer
Oct 29, 2021
609
560
93
Quebec
www.youtube.com

I just started a small project for fun, it imitates a movie crawl.

Here's the state of it after 2 hours:

-Will set up a compact mac sized centered area of 512x342 where the action happens, on a black background (works regardless of the real screen size even if bigger)
-Currently loads 3 lines of hard coded text (this will change)
-Draws the text and scrolls it up, centered
-The text size changes slightly to create this faux 3d-effect of distance. The text is not slanted (that would be much, much harder and involve 3d)
-Interrupts are used to control the delay between redraws; this should be changed to the vertical blanking to eliminate flickering

 
  • Like
Reactions: wottle and eric

retr01

Senior Tinkerer
Jun 6, 2022
2,473
1
796
113
Utah, USA
retr01.com
Nice. :) Now, suppose redraw so that the characters will slant backward as it slides from front to back and get smaller and smaller in distance?
 

Mu0n

Active Tinkerer
Oct 29, 2021
609
560
93
Quebec
www.youtube.com
Nice. :) Now, suppose redraw so that the characters will slant backward as it slides from front to back and get smaller and smaller in distance?

This implies 3d objects, either one for each letter or manipulating a flat texture on a slanted 3d slate. This is an order of magnitude above my skills ATM. Someone can feel free to be motivated and go all the way with quickdraw 3d or whatever that's used on macs.
 

retr01

Senior Tinkerer
Jun 6, 2022
2,473
1
796
113
Utah, USA
retr01.com
QuickDraw has been built in Macs since 1984. There are four main versions. Quartz replaced it in Mac OS X.
  • Basic QuickDraw: The original QuickDraw (now called Basic QuickDraw) supports a fixed palette of eight colors: black, white, red, green, blue, cyan, yellow, and magenta. For most purposes, this was sufficient for the original Macintosh models, which were all black and white. Macintosh computers equipped with the 68000 processor are limited to Basic QuickDraw, but with Mac OS 7.0 and higher installed, they may take advantage of certain features of Color QuickDraw.
  • Color QuickDraw: As color displays became more common, Apple released Color QuickDraw. It was built into the Macintosh II series and has been with Mac OS ever since. The first version of Color QuickDraw could display only 256 colors at a time, but with the development of 32-bit Color QuickDraw, it became possible to display millions of colors. Color QuickDraw will attempt to draw only as many colors as a given device can support.
  • QuickDraw GX: Rather than a replacement for earlier versions of QuickDraw, QuickDraw GX introduced new features such as advanced typography and printing and an object-based graphics model. Unfortunately, applications had to be rewritten in order to take advantage of the new features. Because GX was always an optional install, few developers felt it was worth the effort to incorporate it into their programs. Consequently, QuickDraw GX was never broadly adopted and its development has ceased.
  • QuickDraw 3D: Performing a distinctly different function than other members of the QuickDraw family, QuickDraw 3D provides a three-dimensional development environment. As with QuickDraw GX, developers must specifically write QuickDraw 3D support into their programs, but QuickDraw 3D has enjoyed much more success than GX. Now a component of QuickTime, QuickDraw 3D support has been incorporated into many games, and with hardware acceleration, it can substantially improve the quality of 3D rendered objects.

Another approach is to build a C module that will translate any fonts to the Star Wars creeping opening lines style merely by creating mathematical algorithms to translate characters from one form to another on the XY plane. There is no Z axis, so some creativity is needed.

Apple has explained many things in the Inside Macintosh: Imaging with QuickDraw documentation. Below is an example. There are coding summaries for Pascal, C, and Assembly at the end of Chapter 3 on QuickDraw.

1660254972451.png
1660255008748.png
 
Last edited:
  • Like
Reactions: Mu0n

Crutch

Tinkerer
Jul 10, 2022
293
228
43
Chicago
That’s a cool project. Challenge accepted!

This is just using direct pixel manipulation, not QuickDraw 3D or any of that — so in theory would run on a real Mac Plus, but is only running fast enough here because it’s on an emulator.

Lots of work to make it much smoother and faster, remove the jaggies, precalculate things and convert the inner loop to assembly.

 

Mu0n

Active Tinkerer
Oct 29, 2021
609
560
93
Quebec
www.youtube.com
it looks SO GOOD @Crutch

Meanwhile, I completely firebombed my v2 by trying to use an offscreen GrafPort. I had old code from 2005 on it with some personal library files with routines to set them up. I can't explain why not only do they not work, but I can't even do a simple DrawString in a minimalistic program that uses them. It freezes on the first TextSize call. I'm missing something obvious and I'm having tunnel vision atm.

Right before pushing to offscreen and switching from TMTasks to VBL, I had a full TextEdit file loaded up just fine and scrolling on screen, but I wasn't happy at 1x Mac Plus speed at all, hence my push to VBL interrupts and making the scroll jump more than 1 pixel per iteration.

Somehow, the pointer gods are frowning upon me.