2D anim : simple walking man

Share your advanced PureBasic knowledge/code with the community.
Olli
Addict
Addict
Posts: 1258
Joined: Wed May 27, 2020 12:26 pm

2D anim : simple walking man

Post by Olli »

left and right arrow keys to walk
escape key to quit

Code: Select all

Procedure aGray(x)
    ProcedureReturn RGBA(x, x, x, x)
EndProcedure

Procedure transform(sp, z.d, x0, y0, x1, y1, x2, y2, x3, y3)
    TransformSprite(sp, x0 * z, y0 * z, x1 * z, y1 * z, x2 * z, y2 * z, x3 * z, y3 * z)
EndProcedure

InitSprite()
InitKeyboard()
InitMouse()
ExamineDesktops()
scW = DesktopWidth(0)
scH = DesktopHeight(0)
OpenScreen(scW, scH, 32, "", #PB_Screen_SmartSynchronization)
scBackC = RGB(32, 64, 128)
msCursZoom.d = 3.2
msCurs = CreateSprite(#PB_Any, 64, 64)
StartDrawing(SpriteOutput(msCurs) )
Box(0, 0, 64, 64, RGB(0, 0, 0) )
Box(10, 5, 50, 50, RGB(255, 255, 255) )
StopDrawing()
transform(msCurs, msCursZoom, 8, 8, 3, 8, 0, 12, 0, 0)

pen = CreateSprite(#PB_Any, 3, 3, #PB_Sprite_AlphaBlending)
StartDrawing(SpriteOutput(pen) )
DrawingMode(#PB_2DDrawing_AllChannels)
Box(0, 0, 3, 3, RGBA(0, 0, 0, 0) )
Box(0, 1, 3, 1, RGBA(255, 255, 255, 255) )
StopDrawing()

head = CreateSprite(#PB_Any, 32, 32, #PB_Sprite_AlphaBlending)
StartDrawing(SpriteOutput(head) )
DrawingMode(#PB_2DDrawing_AllChannels)
Box(0, 0, 32, 32, RGBA(0, 0, 0, 0) )
For i = 16 To 1 Step -1
    Circle(16, 16, i, aGray(256 - Pow(i, 3/5) * 16) )
Next
StopDrawing()



Structure xy
    x.d
    y.d
EndStructure



Procedure pointCreate(x.d, y.d)
    Protected *r.xy = AllocateMemory(SizeOf(xy) )
    With *r
        \x = x
        \y = y
    EndWith
    ProcedureReturn *r
EndProcedure



Structure transform
    
    A.xy
    B.xy
    
    ang.d
    rad.d
    
    an0.d
    an1.d
    an2.d
    an3.d
    
    rd0.d
    
    pen.i
    
    C.xy
    D.xy
    E.xy
    F.xy
    
EndStructure



Procedure traceCreate()
    Protected *r.transform = AllocateMemory(SizeOf(transform) )
    ProcedureReturn *r
EndProcedure




Procedure trans(pen, *a.xy, *r.xy, ang.d, rad.d, thickness.d = 1.0)
    
    
    Define.d ax, ay, bx, by, cx, cy, dx, dy, ex, ey, fx, fy
    Define.d an0, an1, an2, an3
    Define.d rd
    
    ax = *a\x
    ay = *a\y
    ;rd = Sqr(2) * 1.5 * thickness ; 1.5 = spriteHeight (3) / 2
    rd = Sqr(1) * 1.5 * thickness ; 1.5 = spriteHeight (3) / 2
    
    bx = ax + Cos(ang) * rad
    by = ay - Sin(ang) * rad
    
    ;an0 = ang + (3 * #PI / 4)
    ;an1 = ang + (1 * #PI / 4)
    ;an2 = ang - (1 * #PI / 4)
    ;an3 = ang - (3 * #PI / 4)
    
    an0 = ang + (#PI / 2)
    an1 = ang + (#PI / 2)
    an2 = ang - (#PI / 2)
    an3 = ang - (#PI / 2)
    
    cx = ax + Cos(an0) * rd
    cy = ay - Sin(an0) * rd
    dx = bx + Cos(an1) * rd
    dy = by - Sin(an1) * rd
    ex = bx + Cos(an2) * rd
    ey = by - Sin(an2) * rd
    fx = ax + Cos(an3) * rd
    fy = ay - Sin(an3) * rd
    
    TransformSprite(pen, cx, cy, dx, dy, ex, ey, fx, fy)
    DisplayTransparentSprite(pen, 0, 0, RGB(255, 0, 0) )
    *r\x = bx
    *r\y = by
    ProcedureReturn *r
EndProcedure

Procedure.d max(a.d, b.d)
    If a > b
        ProcedureReturn a
    Else
        ProcedureReturn b
    EndIf
EndProcedure

#pMax = 31
Global Dim *p.xy(#pMax)
Global Dim *gp.xy(63, #pMax)

Procedure guy(man, pen, head, j.d, timeScale.d, scW.d, scH.d)
    For i = 0 To #pMax
        If i <> pen
            ;*p(i) = *gp(man, i)
        EndIf
    Next
    trans(pen, *p(0), *p(1), 3*#PI/2 + Cos(j) / 4 * timeScale, scW/32, 20)
    trans(pen, *p(1), *p(2), 3*#PI/2 + (Cos(j) / 4 - ((1 - Cos(j) ) / 8) ) * timeScale, scW/32, 20)
    trans(pen, *p(0), *p(4), 3*#PI/2 + Cos(j+#PI) / 4 * timeScale, scW/32, 20)
    trans(pen, *p(4), *p(5), 3*#PI/2 + (Cos(j+#PI) / 4 - ((1 - Cos(j+#PI) ) / 8) ) * timeScale, scW/32, 20)
    *p(8)\x = *p(0)\x
    *p(8)\y = *p(0)\y - scW/32
    trans(pen, *p(8), *p(12), 3*#PI/2 + Cos(j+#PI) / 4 * timeScale, scW/40, 16)
    trans(pen, *p(12), *p(13), 3*#PI/2 + ((Cos(j+#PI) / 4) + ((1 + Cos(j+#PI) ) / 8 * (1 * timeScale) ) ) * timeScale, scW/40, 16)
    trans(pen, *p(8), *p(9), 3*#PI/2 + Cos(j) / 4 * timeScale, scW/40, 16)
    trans(pen, *p(9), *p(10), 3*#PI/2 + ((Cos(j) / 4) + ((1 + Cos(j) ) / 8 * (1 * timeScale) ) ) * timeScale, scW/40, 16)
    *p(16)\x = *p(8)\x + (scW / 640) * Pow(timeScale, 2)
    *p(16)\y = *p(8)\y
    trans(head, *p(16), *p(17), #PI/2, scW/40, scW/160)
    *p(0)\x + 3*Sqr(max((Cos(j) + 1), Cos(j + #PI) + 1) )*Pow(timeScale, 2)
    For i = 0 To #pMax
        ;*gp(man, i) = *p(i)
    Next
EndProcedure

Procedure released(x)
    Static Dim stat(255)
    k = KeyboardPushed(x)
    If k And stat(x) = 0
        stat(x) = k
        ProcedureReturn 1
    EndIf
    stat(x) = k
EndProcedure

For i = 0 To #pMax
    *p(i) = AllocateMemory(SizeOf(xy) )
Next
SpriteQuality(#PB_Sprite_BilinearFiltering)
*p(0)\x = scW / 2
*p(0)\y = scH / 2
timeScale.d = 0
Repeat
    *p(0)\x - MouseDeltaX()
    *p(0)\y - MouseDeltaY()
    Delay(1)
    ExamineKeyboard()
    ExamineMouse()
    ClearScreen(scBackC)
    j.d = ElapsedMilliseconds() / 100 * timeScale
    For i = 0 To 0
        guy(0, pen, head, j, timeScale, scW, scH)
        
        *p(20)\x = 0
        *p(20)\y = scH / 2
        trans(pen, *p(20), *p(21), 0, scW, 1)
        *p(22)\x = scW / 2
        *p(22)\y = 0
        trans(pen, *p(22), *p(23), 3*#PI/2, scH, 1)
    Next
    
    If *p(0)\x > scW
        *p(0)\x - scW
    EndIf
    If Released(#PB_Key_Right)
        timeScale + 0.5
    EndIf
    If Released(#PB_Key_Left)
        If timeScale >= 0.5
            timeScale - 0.5
        EndIf
    EndIf
    ;DisplaySprite(msCurs, MouseX(),  MouseY() )
    FlipBuffers()   
Until KeyboardPushed(#PB_Key_Escape) Or MouseButton(#PB_MouseButton_Middle)
2010\08\26 : version 1, shorter version:

Code: Select all

Global Dim T.F(6)
Procedure.F Sum(n.I)
  For I = 1 To n
    Result.F + T(I)
  Next I
  ProcedureReturn Result
EndProcedure  
      InitSprite()
      InitKeyboard()
      InitMouse()
      OpenScreen(800, 600, 32, "")
      BackFrame.I = CreateSprite(#PB_Any, 800, 600)
      StartDrawing(SpriteOutput(BackFrame) )
         Box(0, 0, 800, 600, RGB(1, 1, 1) )
      StopDrawing()
      T0V.F = 0.1
      Dim X.F(6)
      Dim Y.F(6)
      Dim W.F(6)
      Dim H.F(6)
      Dim L.F(6)
      L(1) = 100.0
      L(2) = 100.0
      L(3) = 10.0
      L(4) = 5.0
      L(5) = 25.0
      L(6) = 10.0
         Repeat
            Delay(1)
            DisplaySprite(BackFrame, 0, 0)
            StartDrawing(ScreenOutput() )
            TB0.F + T0V
            For I = 0 To 1
              T(0) = TB0 + #PI * I
              T(1) = Sin(T(0) ) * 0.4 + #PI / 2.0
              T(2) = Sin(T(0) - #PI / 2.0) * 1.0 + 1.0
              T(3) = Sin(T(0) ) * 0.5 + 0.5
              T(4) = #PI / 2.0
              T(5) = #PI
              T(6) = Sin(T(0) - #PI / 2.0) * 1.0
              W(0) = Cos(T(0) + #PI / 4.0) * 10
              H(0) = Sin(T(0) + #PI / 4.0) * 10
              For J = 1 To 6
                X(J) = X(J - 1) + W(J - 1)
                Y(J) = Y(J - 1) + H(J - 1)
                S.F = Sum(J) - (J > 4) * T(4)
                W(J) = Cos(Sum(J) ) * L(J)
                H(J) = Sin(Sum(J) ) * L(J)
                Line(X(J), Y(J), W(J), H(J), #White)
              Next J
            Next
            StopDrawing()
            FlipBuffers()
            ExamineKeyboard()   
            ExamineMouse()
            X(0) = MouseX()
            Y(0) = MouseY()
            T0V + MouseWheel() / 100.0
         Until KeyboardPushed(#PB_Key_Escape)
      CloseScreen()
2009\07\09 Version 1, initial version

Code: Select all

   DisableDebugger

Structure GraphInfo
   ThreadNo.I
   ScreenOpened.I
   ScreenClosed.I
   ScreenActive.I
   Quit.I
   BackFrame.I
   TestFrame.I
EndStructure

Procedure GraphProcess(*Graph.GraphInfo)
   With *Graph
      InitSprite()
      InitKeyboard()
      InitMouse()
      OpenScreen(800, 600, 32, "")
      \BackFrame = CreateSprite(#PB_Any, 800, 600)
      StartDrawing(SpriteOutput(\BackFrame) )
         Box(0, 0, 800, 600, RGB(1, 1, 1) )
      StopDrawing()
      \TestFrame = CreateSprite(#PB_Any, 80, 60)
      StartDrawing(SpriteOutput(\TestFrame) )
         Box(0, 0, 80, 60, #Red)
      StopDrawing()
      \ScreenOpened = 1
      TG0.F = #PI
      T0V.F = 0.1
         Repeat
            Delay(1)
            T0.F + T0V.F
            T1.F = #PI / 2.0 + Sin(T0) * 0.4
            T2.F = 1.0 + Sin(T0 - #PI / 2.0) * 1.0
            T3.F = 0.5 + Sin(T0) * 0.5
            T4.F = #PI / 2.0
            T5.F = 0.0 - #PI / 2.0
            T6.F = Sin(T0 - #PI / 2.0) * 1.0

            TG0.F + T0V.F
            TG1.F = #PI / 2.0 + Sin(TG0) * 0.4
            TG2.F = 1.0 + Sin(TG0 - #PI / 2.0) * 1.0
            TG3.F = 0.5 + Sin(TG0) * 0.5
            TG4.F = #PI / 2.0
            TG5.F = 0.0 - #PI / 2.0
            TG6.F = Sin(TG0 - #PI / 2.0) * 1.0

            DColX.F = 400.0
            DColY.F = 300.0
            DColWidth.F = Cos(T0 + #PI / 4.0) * 10
            DColHeight.F = Sin(T0 + #PI / 4.0) * 10
            DCuisseX.F = DColX + DColWidth
            DCuisseY.F = DColY + DColHeight
            DCuisseWidth.F  = Cos(T1) * 100
            DCuisseHeight.F = Sin(T1) * 100 
            DJambeX.F = DCuisseX + DCuisseWidth
            DJambeY.F = DCuisseY + DCuisseHeight
            DJambeWidth.F = Cos(T1 + T2) * 100  
            DJambeHeight.F = Sin(T1 + T2) * 100  
            DChevilleX.F = DJambeX + DJambeWidth
            DChevilleY.F = DJambeY + DJambeHeight
            DChevilleWidth.F = Cos(T1 + T2 + T3) * 10
            DChevilleHeight.F = Sin(T1 + T2 + T3) * 10
            DTalonX.F = DChevilleX + DChevilleWidth
            DTalonY.F = DChevilleY + DChevilleHeight
            DTalonWidth.F = Cos(T1 + T2 + T3 + T4) * 5
            DTalonHeight.F = Sin(T1 + T2 + T3 + T4) * 5
            DPiedX.F = DChevilleX + DChevilleWidth
            DPiedY.F = DChevilleY + DChevilleHeight
            DPiedWidth.F = Cos(T1 + T2 + T3 + T5) * 20
            DPiedHeight.F = Sin(T1 + T2 + T3 + T5) * 20
            DOrteilX.F = DPiedX + DPiedWidth
            DOrteilY.F = DPiedY + DPiedHeight
            DOrteilWidth.F = Cos(T1 + T2 + T3 + T5 + T6) * 10
            DOrteilHeight.F = Sin(T1 + T2 + T3 + T5 + T6) * 10

            GColX.F = 400.0
            GColY.F = 300.0
            GColWidth.F = Cos(TG0 + #PI / 4.0) * 10
            GColHeight.F = Sin(TG0 + #PI / 4.0) * 10
            GCuisseX.F = GColX + GColWidth
            GCuisseY.F = GColY + GColHeight
            GCuisseWidth.F  = Cos(TG1) * 100
            GCuisseHeight.F = Sin(TG1) * 100 
            GJambeX.F = GCuisseX + GCuisseWidth
            GJambeY.F = GCuisseY + GCuisseHeight
            GJambeWidth.F = Cos(TG1 + TG2) * 100  
            GJambeHeight.F = Sin(TG1 + TG2) * 100  
            GChevilleX.F = GJambeX + GJambeWidth
            GChevilleY.F = GJambeY + GJambeHeight
            GChevilleWidth.F = Cos(TG1 + TG2 + TG3) * 10
            GChevilleHeight.F = Sin(TG1 + TG2 + TG3) * 10
            GTalonX.F = GChevilleX + GChevilleWidth
            GTalonY.F = GChevilleY + GChevilleHeight
            GTalonWidth.F = Cos(TG1 + TG2 + TG3 + TG4) * 5
            GTalonHeight.F = Sin(TG1 + TG2 + TG3 + TG4) * 5
            GPiedX.F = GChevilleX + GChevilleWidth
            GPiedY.F = GChevilleY + GChevilleHeight
            GPiedWidth.F = Cos(TG1 + TG2 + TG3 + TG5) * 20
            GPiedHeight.F = Sin(TG1 + TG2 + TG3 + TG5) * 20
            GOrteilX.F = GPiedX + GPiedWidth
            GOrteilY.F = GPiedY + GPiedHeight
            GOrteilWidth.F = Cos(TG1 + TG2 + TG3 + TG5 + TG6) * 10
            GOrteilHeight.F = Sin(TG1 + TG2 + TG3 + TG5 + TG6) * 10

            DisplaySprite(\BackFrame, 0, 0)
            StartDrawing(ScreenOutput() )
               Line(DCuisseX, DCuisseY, DCuisseWidth, DCuisseHeight, #White)
               Line(DJambeX, DJambeY, DJambeWidth, DJambeHeight, #White)
               Line(DChevilleX, DChevilleY, DChevilleWidth, DChevilleHeight, #White)
               Line(DTalonX, DTalonY, DTalonWidth, DTalonHeight, #White)
               Line(DPiedX, DPiedY, DPiedWidth, DPiedHeight, #White)
               Line(DOrteilX, DOrteilY, DOrteilWidth, DOrteilHeight, #White)

               Line(GCuisseX, GCuisseY, GCuisseWidth, GCuisseHeight, #White)
               Line(GJambeX, GJambeY, GJambeWidth, GJambeHeight, #White)
               Line(GChevilleX, GChevilleY, GChevilleWidth, GChevilleHeight, #White)
               Line(GTalonX, GTalonY, GTalonWidth, GTalonHeight, #White)
               Line(GPiedX, GPiedY, GPiedWidth, GPiedHeight, #White)
               Line(GOrteilX, GOrteilY, GOrteilWidth, GOrteilHeight, #White)
            StopDrawing()
            FlipBuffers()
            If IsScreenActive()
               ExamineKeyboard()   
               If KeyboardPushed(#PB_Key_Escape)
                  \Quit = 1
               EndIf
               ExamineMouse()
               T0V + MouseWheel() / 100.0
            EndIf
         Until \Quit
      CloseScreen()
      \ScreenOpened = 0
      \ScreenClosed = 1
   EndWith
EndProcedure 

Procedure Graph(*Graph.GraphInfo)
   *Graph\ThreadNo = CreateThread(@GraphProcess(), *Graph)
EndProcedure

   Define Graph.GraphInfo

   Graph(Graph)

   Repeat 
      Delay(1)
      If IsThread(Graph\ThreadNo) = 0
         Break
      EndIf
   ForEver

   End
Last edited by Olli on Tue Aug 01, 2023 11:50 pm, edited 2 times in total.
User avatar
Mindphazer
Enthusiast
Enthusiast
Posts: 487
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: 2D anim : simple walking man

Post by Mindphazer »

You should make a precision :
Right key : the man walks faster and faster as you press the right key
Left key : the man slows down and stops. But he never walks to the left direction
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 15.4.1 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
AZJIO
Addict
Addict
Posts: 2223
Joined: Sun May 14, 2017 1:48 am

Re: 2D anim : simple walking man

Post by AZJIO »

Code: Select all

Procedure released(x)
    Static Dim stat(255)
    If x > 255
    	x = 255
    EndIf
2

Code: Select all

Static Dim stat(285)
Olli
Addict
Addict
Posts: 1258
Joined: Wed May 27, 2020 12:26 pm

Re: 2D anim : simple walking man

Post by Olli »

@AZJIO

Bureaucrats decided to separate us a thousand years ago. Yet we have the same definition of words beginning with the letter "A" in a dictionary. But some have found it brilliant to interchange letters in the alphabet, and especially to subject certain letters of the alphabet to a rotation on the y axis, like a kebap among the Turks. Result: after a thousand years, we are forced to find keyboard keys whose value is greater than 255 (>%11111111, which requires more than 8 bits).

@MindPhazer

Your user manual suggest seems like a feature request. On this first version, you can take your mouse and you can rub it on its mat, from left to the right, very quickly. Then you jump your mouse from right to the left, and repeat this manual process very quickly : the man will go back as a moonwalk.
ZX80
Enthusiast
Enthusiast
Posts: 375
Joined: Mon Dec 12, 2016 1:37 pm

Re: 2D anim : simple walking man

Post by ZX80 »

Olli,

as I understand it, a person tilts his head forward more, the greater his acceleration (to improve aerodynamic properties). :mrgreen:
The problem is that with too much acceleration, the human head breaks away from the body. :shock:

It was a joke, but only partly. :D
Thanks for your example.
Olli
Addict
Addict
Posts: 1258
Joined: Wed May 27, 2020 12:26 pm

Re: 2D anim : simple walking man

Post by Olli »

:lol:

Yes, everything is a joke in this subject !
When you speed the man up too much, the running man becomes a corean symbol. :mrgreen:
benubi
Enthusiast
Enthusiast
Posts: 227
Joined: Tue Mar 29, 2005 4:01 pm

Re: 2D anim : simple walking man

Post by benubi »

I'd like to see that in slow motion. Any chances of adapting the code for it?

I couldn't clearly see the difference between speed and time or how 'TimeScale' works.
Olli
Addict
Addict
Posts: 1258
Joined: Wed May 27, 2020 12:26 pm

Re: 2D anim : simple walking man

Post by Olli »

@benubi

:lol:
a serious question whom the following answer will give you laugh. Apparently, you don't trust in zx80 !!

So... here you have this code line :

Code: Select all

j.d = ElapsedMilliseconds() / 100 * timeScale
Add a zero-digit ('0') to transform 100 to 1000. The change resulting code would seem like this :

Code: Select all

j.d = ElapsedMilliseconds() / 1000 * timeScale
Normally, you should have a speed 10 times slower.

There, you will see better how does TimeScale.d work, and... Look my "head bug" !

Please note that all your answers push me to make a third version (First version, July, the nineth 2009)
(Older versions inserted on head subject)


And please give me a back info if you do not understand the algo. This will help me to code a more decryptable program on version 3.

@zx80

That's not young...
Image
ZX80
Enthusiast
Enthusiast
Posts: 375
Joined: Mon Dec 12, 2016 1:37 pm

Re: 2D anim : simple walking man

Post by ZX80 »

Olli,

it's beautiful ! :D

Yes, you are absolutely right. When I registered on this forum, I chose the name, guided by this particular processor (clock frequency = 3.5 MHz). My first computer had 48 KBytes of RAM. Reading and writing a program using a household tape recorder. A distinctive feature was that by pressing one button, one entire command was entered. This is a legacy of the calculators that Sinclair also designed. I don't know if the following string tells you something:

"(C) 1982 Sinclair Research Ltd."

We must pay tribute to this wonderful engineer Clive Sinclair (rest in peace). His computer is a legend.


A little more history.
Thanks to Sir Clive Sinclair (indirectly) now we have operating systems such as Linux and Android (Android is a logical extension of Linux). Why is this so ? Everything is very simple. Once upon a time, Linus Torvalds chose Sinclair's computer, as others cost fabulous money.

"In 1987, Linus took all his savings and bought his first Sinclair QL computer. It was one of the first 32-bit computers in the world designed for home use".

From that moment began the study, further search for bugs and development (own software). Has anyone thought about this?

P.S. Also... later... On the basis of this processor, numerous versions of city phones with caller ID were created.
Olli
Addict
Addict
Posts: 1258
Joined: Wed May 27, 2020 12:26 pm

Re: 2D anim : simple walking man

Post by Olli »

Thank you very much for these details ! Thank you. And personnally, I absolutely did not the link between Mr Torwald and Mr Sinclair (RIP).

My first computer ---> EXL100 (CPU = Texas Instrument TMS 7020)

RAM = 34KB BUT sure I have no merit, none ! Because I did not code on Assembly.

The small merit I had (seven years I was) is I had not mass memory. All coded was cleared after a push on power off button, or when a temperature security shut down the CPU.

The first Assembly program I coded (eight years I was) was on a 8088 CPU (8086 perfectly based CPU). But it was just a copy typed from a book of a small 8086 based hexa code to store very quickly on text memory video (memory segment indexed on 0xB800h I suppose you remember). It was a function without argument. So terminated by the 0xCBh op code meaning the RET 8086 assembly instruction. Without notion of stack, without knowing it existed the 0xCAh + 0xMMh + 0xNNh op code meaning RET 0xNNMMh assembly instruction which frees the function arguments datas in the stack, at the end of a function execution, it was unabled for me to communicate between the high level Microsoft GW-Basic and this incredible fast assembly routine. I tried to modify the hexa values, but without notion of instruction size, and without knowledge of the step by step process, I failed to learn without an Assembly book I will have discovered two years after.

This routine used the fastest data transferring 8086 asm code op : REP STOSW ; REPeat STOre String Word per word. Compared to GW-Basic interpreter, assembly hexa code seemed like a bomb ! But all was to learn : endianness, dedicated registers, etc...





An other tribute to Sinclair ?

Note that, in going back again on my first computer, the EXL100, observing the dates, Mr Sinclair maybe inspired the EXL100 manufacturers :
ImageAs you can see, you have a yellow key on the top-right keyboard named "F" (= Function), and you have yellow keywords present on top of each letter ! The EXL100 computer has started to be sold in 1984, later than the ZX8n.



(C) 1982 Sinclair Research Ltd.

I will decept you. I do not know the beautiful remembers to this text string. But there is an old pureBasic coder (djes) who published a symbol of the power of the ZX.
on the old off topic in the french forum (stored in webArchive.org)I suppose it was the same as this :1000 bytes ZX chess game
:o
Very powerful.

djes told the algo uses the Manhattan distance. I am unabled to decrypt this asm code easily, but a chess game program in less than 1024 bytes of assembly code, it is very very very clever !! (on software as on hardware)
Post Reply