BBC BASIC for Windows
« Competition. Animation challenge »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 10:19pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Competition. Animation challenge  (Read 415 times)
michael
Senior Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 335
laugh Competition. Animation challenge
« Thread started on: May 3rd, 2016, 12:07pm »

There is this post that helps you locate the circles.. SO GET YOUR PEN READY
Use your mouse to plot the locations you want around the circle I placed..
Try to make it look cool..

The program I use to play the data is on my next post here.. Just replace the DATA numbers EXCEPT the 3000,3000 (because they make the animation loop work)
So you have my locator tool and play tool..
Code:

      REM       width;height;charwidth,charheight,number of colors,character set
      VDU 23,22,900;900;8,15,16,1 :REM max width is 1920 and 1440 height
      status$=""
      REM Turn off the text cursor _
      OFF
      VDU 5 : REM Treat text as graphics (transparent background)
      REM Here is where you would make your center image or image that you will make animation around
      PROCcolor("f",200,200,200)
      MOVE 1,900:PRINT" Use your mouse and left button to plot locations. (write them down for DATA)"
      CIRCLE FILL 500,500,50
      REM Here is where the locator is
      REPEAT
        PROCmoubox
      UNTIL status$="QUIT"
      WAIT 0
      END
      REM ***************End of INPUT routine ************
      DEF PROCmoubox
      REM MOUSE b-- 1-rightbttn  2-mid bttn  4-left bttn
      MOUSE x,y,b
      * REFRESH OFF
      IF b=4 OR b=1 THEN PROCpr(10,605,15,"X : "+STR$(x)+" Y :"+STR$(y)+" ",100,100,200):PROCcolor("f",100,100,100):CIRCLE FILL x,y,20

      * REFRESH
      ENDPROC
      REM ***********************this is my super custom text box tool ***********************
      REM X,Y,text color,boarder color,message,r,g,b
      REM ************************************************************************
      DEF PROCpr(X,Y,C,msg$,r,g,b)
      initialx%=LEN(msg$)
      COLOUR 0,r,g,b
      GCOL 0
      LET tx= X+initialx%+25
      LET ty= Y:reduction%=0
      reduction%=initialx%/2
      reduction%=reduction%*6
      IF initialx%<20 THEN reduction%=reduction%/2
      initialx%=initialx%*22-reduction%
      FOR fill=12 TO 48
        LINE X-3,Y+20-fill,X+initialx%+8,Y+20-fill
      NEXT fill
      COLOUR 0,0,0,0
      GCOL 0
      MOVE tx,ty
      PRINT msg$
      MOVE 0,0 REM hide that thing
      ENDPROC
      REM ******************this is a custom Foreground and Background control tool (too much?) *****************
      REM color "F"or"B", r,g,b
      DEF PROCcolor(fb$,r%,g%,b%)
      IF fb$="f" OR fb$="F" THEN COLOUR 0,r%,g%,b% : GCOL 0
      IF fb$="b" OR fb$="B" THEN COLOUR 1,r%,g%,b% : GCOL 128+1
      ENDPROC
 

« Last Edit: May 3rd, 2016, 1:33pm by michael » User IP Logged

I like making program generators and like reinventing the wheel
michael
Senior Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 335
laugh Re: Competition...You have 2 hours from this post
« Reply #1 on: May 3rd, 2016, 12:19pm »

Ok I got one done.. TRY THIS:
To use your coordinate list, Replace the data statements with your locations (EXCEPT the 3000,3000 because it is necessary for the loop)
Code:
      REM SET MODE TO 8 USING VDU
      VDU 22,8
      REM SET LINE THICKNESS TO 3
      VDU 23,23,3|
      xx%=0:yy%=0:h%=100:v%=100:sw%=0:s%=0
      continue$="":pass%=0
      f$=""
      REM OFF
      GCOL 1

      REPEAT
        DATA 600,460,590,566,560,650,520,712,466,658,422,584,402,514,396,422,406,362
        DATA 426,314,466,270,522,302,560,354,578,402
        DATA 3000,3000
        READ h%,v%
        IF h%=3000 THEN RESTORE:READ h%,v%:f$="NO"
        REPEAT
          IF xx%<h% THEN xx%=xx%+1
          IF yy%<v% THEN yy%=yy%+1
          IF xx%>h% THEN xx%=xx%-1
          IF yy%>v% THEN yy%=yy%-1
          CLG
          * REFRESH OFF
          CIRCLE FILL xx%,yy%,30
          MOVE 100,100:PRINT xx%
          MOVE 100,70:PRINT yy%
          CIRCLE FILL 500,500,50
          * REFRESH
          IF xx%=h% THEN s%=1
          IF yy%=v% THEN sw%=1
          IF sw%=1 AND s%=1 THEN pass%=1
        UNTIL pass%=1
        pass%=0:s%=0:sw%=0
      UNTIL continue$="done"
      END
 
« Last Edit: May 3rd, 2016, 1:43pm by michael » User IP Logged

I like making program generators and like reinventing the wheel
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls