Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
C64 Loading?
#1
Question 
I have try to get close to C64 Loading but it doesn't look quite right

Code:
set window "C64 LOADING SCREEN", 1024, 768
set redraw off

t = clock()

do 
    for a=1 to 1024
        set color rnd(256), rnd(256), rnd(256), rnd(256)
        draw rect 0, a, 768, 1024
    next

    redraw
    fwait 60
until clock() - t > 15000
Reply
#2
Looks good to me Smile

I don't quite remember what it used to look like, never did have a C64 myself.

I've changed the resolution to that of a C64 and tried with a bit random bar-heights, but I don't know if it's any better:

Code:
' C64 screen resolution.
set window "C64 LOADING SCREEN", 320, 200, false, 3
set redraw off

t = clock()

do
    y = 0
    while y < height(primary)
        h = 1 + rnd(8)
        set color rnd(256), rnd(256), rnd(256), rnd(256)
        draw rect 0, y, width(primary), h, true
        y = y + h
    wend

    redraw
    fwait 60
until clock() - t > 15000
Reply
#3
Thanks Marcus and that more like it Smile
Reply
#4
Just messing it up, sorry.

Code:
' C64 screen resolution.
set window "C64 LOADING SCREEN", 320, 200, false, 3
set redraw off

' Draw the C4 loading bars to this image instead of the window's backbuffer (primary).
effectImage = createimage(1, height(primary))

t = clock()

baseA = 0
do
    ' Draw bars to effectImage.
    set image effectImage
    y = 0
    'randomize 0
    while y < height(primary)
        h = 1 + rnd(8)
        set color rnd(256), rnd(256), rnd(256)
        draw rect 0, y, 1, h, true
        y = y + h
    wend
    set image primary
  
    ' No, I didn't even think.
    baseA = baseA + 1
    a = 0
    da = 360/width(primary)
    wp2 = width(primary)/2
    mul = 255/wp2
    for x = 0 to width(primary) - 1
        set color 0, 16, 64, |x - wp2|*mul
        voffs = sin(rad(baseA + a + cos(rad(baseA*4))*90))*0.1
        draw vraster effectImage, x, 0, height(primary) - 1, 0, 0.1 - voffs, 0, 0.9 + voffs
        a = a + da
    next

    if rnd(60) = 0
        set caret rnd(width(primary) - fwidth("SPOOPY!")), rnd(height(primary) - fheight())
        set color 255, 255, 255
        wln "SPOOPY!"
    endif

    redraw
    fwait 60
until clock() - t > 15000
Reply
#5
Well... It is 5:40am and thankfully I already have my coffee... otherwise the trippy effect of that loader screen would be a bit much to handle... Very cool... but different... lol

Note: If memory serves correctly, the C64 loader screen is very similar to the Amstrad CPC464 loader screen. The colours are not as random as one would have them. The CPC, as it loads from cassette, samples the frequency of the tape signal and assigns colour based on the range of signals.

Herein ends today's trivia lesson...
May your journey be free of incident.
Live long and prosper.
Reply
#6
Very good Marcus there as somethings different. May I ask...why is there 2 Windows when you run the program?
Reply
#7
(05-17-2022, 10:06 PM)Psygnosis Wrote: Very good Marcus there as somethings different.  May I ask...why is there 2 Windows when you run the program?

You can remove the console window by adding:

Code:
#win32

somewhere in your code (it doesn't matter where, but I usually put it in the very beginning).
Reply
#8
#win32 ? No change for me... *sigh* Must be a "windows thing"... lol
May your journey be free of incident.
Live long and prosper.
Reply
#9
(05-18-2022, 08:31 AM)johnno1956 Wrote: #win32 ? No change for me... *sigh*  Must be a "windows thing"... lol

(Lunch break ...)

Really? So when you run NED, for example, there's a visible console window?

I DO create a console window in the win32 runtime, but it's set to be invisible. Anyone on Windows seeing this?
Reply
#10
(05-18-2022, 10:27 AM)Marcus Wrote:
(05-18-2022, 08:31 AM)johnno1956 Wrote: #win32 ? No change for me... *sigh*  Must be a "windows thing"... lol

(Lunch break ...)

Really? So when you run NED, for example, there's a visible console window?

I DO create a console window in the win32 runtime, but it's set to be invisible. Anyone on Windows seeing this?

If you put #win32 in the first line the console goes away, but remember that johnno is working under wine on a Linux Mint machine. :-)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)