Sokol Wonkey tests

Started by iWasAdam, October 25, 2021, 08:20:38

Previous topic - Next topic

3DzForMe

@iWasAdam, ahh, Phoenix, happy times in a Rotherham leisure centre popping in 20pence pieces after a swim!  Great looking example  :o 8) ;D
BLitz3D, IDEal, AGK Studio, BMax, Java Code, Cerberus
Recent Hardware: Dell Laptop
Oldest Hardware: Commodore Amiga 1200 with 1084S Monitor & Blitz Basic 2.1

iWasAdam

it's coming along... 568k so would fit nicely on a floppy!

I'm still learning (sokol) all the way as I go (yep I know I rant at times, but I wont do it without good cause and then follow my own advice - hehehe)

ok. another (not at first that interesting) pic.
But this is actually 2 separate offscreen buffers. The first is the green and red background, the second our rotating sprites on a grey rect.
The red/green is then rendered as a fullscreen quad, with the second being overlayed on top at a different position

Here's the code - has to rewrite a lot of the inside stuff to do the resized quad and the separate layers, but it works and still 512k...

method OnRender() Override
alpha.BeginOffScreen( 256, 192 )
alpha.Draw( 0,  0,100, 256,48,  Color.Red * 0.4 )
alpha.FlushOffScreen()



sprites.BeginOffScreen( 256, 192 )

'bg fire line
sprites.Draw( 0,  0,100, 256,48,  Color.PicoBlue * 0.4 )

If _gameFrame Mod 60 < 30 Then
sprites.Quad( 65,  50,50,  angle,60 )
Else
sprites.Quad( 65,  50,50,  angle,70, Color.Blue )
End If
sprites.Quad( 91,  150,100-Abs(Sin(angle)*50),  angle+1,30 )
sprites.Quad( 94,  50,150,  -angle,40+Sin(angle)*30 )
sprites.Quad( 68,  150,150,  angle*2,50 )
angle += 0.02

sprites.FlushOffScreen()



BeginOnScreen()

alpha.OnScreenQuad()
sprites.OnScreenQuad( 10,70, 400,370 )

EndOnScreen()
End method

Steve Elliott

#17
Demon Attack and Pitfall, very nice looking conversions.   8)

You should have written it using the Unreal Engine or Unity though for this 2d game, how will you ever fill your hard drive if you don't?   ;)
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb