Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 566
» Latest member: EmmaJackson2711
» Forum threads: 138
» Forum posts: 962

Full Statistics

Online Users
There are currently 7 online users.
» 0 Member(s) | 7 Guest(s)

Latest Threads
suggestion
Forum: Bugs and suggestions
Last Post: Marcus
03-27-2020, 08:24 PM
» Replies: 2
» Views: 2,006
PacRat ( platformer Beta...
Forum: Showcase
Last Post: kcfb
03-19-2020, 04:51 AM
» Replies: 9
» Views: 306
superTomaaz....
Forum: Local pub
Last Post: Marcus
02-05-2020, 02:26 PM
» Replies: 6
» Views: 1,768
Lemmings in NaaLaa
Forum: Questions and discussions
Last Post: Aurel
01-21-2020, 02:05 PM
» Replies: 3
» Views: 1,401
How to Take a Screen Shot...
Forum: Questions and discussions
Last Post: jasonassistanttru
01-21-2020, 10:10 AM
» Replies: 0
» Views: 1,600
MandalaV1
Forum: Showcase
Last Post: Rick3137
01-06-2020, 02:05 PM
» Replies: 3
» Views: 2,354
Merry Christmas
Forum: Local pub
Last Post: Aurel
12-31-2019, 08:58 AM
» Replies: 3
» Views: 1,860
RetroB forum is in closin...
Forum: Local pub
Last Post: Tomaaz
12-14-2019, 01:07 PM
» Replies: 27
» Views: 7,206
Run external commands
Forum: Questions and discussions
Last Post: Marcus
11-17-2019, 05:20 PM
» Replies: 8
» Views: 4,189
Delete postings
Forum: Questions and discussions
Last Post: oneworldrentaluk
11-15-2019, 11:12 AM
» Replies: 5
» Views: 2,321

 
  PacRat ( platformer Beta )
Posted by: Rick3137 - 03-09-2020, 02:23 PM - Forum: Showcase - Replies (9)

This game is still in the start phase. Large games take me a long time, I tend to forget what I did the day before.
 
  It uses a wide screen format that fits my laptop and a virtual screen of about 3000 pixels wide.

  What takes me so long, is the fact that when I fix a bug, I often create 2 more. It takes a lot of logic to keep an icon from moving into  walls.

Code:
'  By Rick3137    http://rb23.yolasite.com/
'  You have permission to copy, paste, alter or post anywhere as long as you don't copyright my work.
'  If it breaks your computer or does damage to your health or wealth , I didn't do it.
'  If you repost this material to another website like Utube, please make changes to the content and name so no one gets confused.

visible:
 sq1 =0 ;  row = 0 ; column = 0 ;  jump = 0 ; fall = 0 ; dir = 1 ; dbm = 0 ; dbm2 = 0
 move = 0 ; px = 0 ; py = 0 ; columnx = 0 ; cx = 0 ; rowy = 0 ; ry = 0 ; dx = 0 ; dy = 0
 zx;zy; cnt1 = 60 ; xoffset = 0 ; yoffset = 0
 
 clr?[60]
create image 1,4000,4000
create image 2,50,50

 a0[]  = [ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ]  
 a1[]  = [ 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 ]  
 a2[]  = [ 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 ]
 a3[]  = [ 1,1,1,1,1,0,0,0,0,0,0,0,1,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1 ]
 a4[]  = [ 1,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 ]  
 a5[]  = [ 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 ]
a29[]  = [ 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 ]
a30[]  = [ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ]

 aa[31][60]
for a = 0 to 59
  aa[0][a] = a0[a] ;aa[1][a] = a1[a] ;aa[2][a] = a2[a] ;aa[3][a] = a3[a] ;aa[4][a] = a4[a] ;aa[5][a] = a5[a] ;aa[6][a] = a6[a] ;aa[7][a] = a7[a] ;aa[8][a] = a8[a] ;aa[9][a] = a9[a]
  aa[10][a] = a10[a] ;aa[11][a] = a11[a] ;aa[12][a] = a12[a] ;aa[13][a] = a13[a] ;aa[14][a] = a14[a] ;aa[15][a] = a15[a] ;aa[16][a] = a16[a] ;aa[17][a] = a17[a] ;aa[18][a] = a18[a] ;aa[19][a] = a19[a]
  aa[20][a] = a20[a] ;aa[21][a] = a21[a] ;aa[22][a] = a22[a] ;aa[23][a] = a23[a] ;aa[24][a] = a24[a] ;aa[25][a] = a25[a] ;aa[26][a] = a26[a] ;aa[27][a] = a27[a] ;aa[28][a] = a28[a] ;aa[29][a] = a29[a]
  aa[30][a] = a30[a]  
next
set redraw off
hidden:
  proc MakeSquare
  proc DrawMaze
  proc images

set window 0,0, 1366, 768, 1
 
     proc loop1
 
 
end
hidden:

procedure Setup()

endproc

procedure DrawMaze()
  set image 1
       set color 0,0,150
     ' Draw horizontal lines
     for a = 1 to 30
      draw line 1, 50*a, 3000, 50*a
     next
        set color 0,0,150
        ' Draw vertical lines
     for a = 1 to 60
        draw line 50 * a, 1, 50 * a, 3000
     next
    a = 0 ; b = 0
    set color 255,255,255
    for a = 0 to 59
      ' Draw 50x50 blocks
      ' X axis
      for b = 0 to 30
        ' Y axis
        if aa[b][a] = 1 then draw image 2, a * 50,b * 50
      next
     
    next
    set image primary

endproc

procedure MakeSquare()
  set image 2
        set color 0,0,245
        draw rect 1, 1,49,49,1
        set color 255,255,255
        draw rect 1, 1,49,49,0
        set color 255,0,0,600
     for a = 2 to 49
         draw line 2,a,48,a
         draw line a,2,a,48
         a = a + 4
     next

endproc



procedure loop1()
    ch = 0 ; zx = 0 ; zy = 0 ; px = 300 ; py = 150 ; dir = 1 ; cnt = 0 ; move = 0
    set color 255,255,255
    draw image 1,zx,zy
   
  set image colorkey 6,1  
  set image colorkey 4,1
  set image colorkey 5,1
 
  while ch <> 27
    if row = 14 and fall = 1 and dy = 49
         yoffset = 785
    endif
    if row = 14 and jump > 0 and dy = 49
         yoffset = 0
    endif
    if column = 20 and dir = 1 and dx = 49
         xoffset = 950
         move = 0
    endif
    if column = 20 and dir = 2 and dx = 49
        xoffset = 0
        move = 0
    endif


    if column = 40 and dir = 1 and dx = 49
         xoffset = 1640
         move = 0
    endif
    if column = 40 and dir = 2 and dx = 49
          xoffset = 950
          move = 0
    endif    
   

    column = px / 50
    row = py / 50
    columnx = column * 50
    rowy = row * 50
    cx = columnx + 50
    ry = rowy + 50
    dx = px - columnx
    dy = py - rowy
   
    if jump > 0    
        py = py - 1
        jump = jump + 1
              column = px / 50
              row = py / 50

    endif
     ' limit of jump
    if jump > 160
       jump = 0
       fall = 1
     
    endif
    ' stop fall if object hits floor
    if fall = 1 and jump = 0 and aa[row+1 ][column] = 1  and dir = 1 and dx = 0  
       fall = 0
       dbm = 1
    endif
    if fall = 1 and jump = 0 and aa[row+1 ][column+1] = 1  and dir = 1 and dx > 0  
       fall = 0
       dbm = 1
    endif
    if fall = 1 and jump = 0 and aa[row+1 ][column] = 1  and dir = 2
       fall = 0
       dbm = 2
    endif    
    ' fall some more if not at floor
    if  aa[row + 1][column] = 0 and py < 701 and jump = 0 and fall = 0 and py > 60  
            fall = 1
            dbm = 3
    endif
     ' stop if moving right and hitting top of wall

    if aa[row+1 ][column+1] = 1  and aa[row+1 ][column] = 0 and dir = 1 and move = 1  
       move = 0
       fall = 1
       dbm = 4
    endif
    ' stop fall at top of wall while moving right
    if fall = 1  and aa[row+1 ][column+1] = 1  and dir = 1 and move = 1  
       fall = 0
       dbm = 5
    endif
     ' stop fall if hitting floor while moving right
    if fall = 1  and aa[row+1 ][column] = 1  and dir = 1 and move = 1
       fall = 0
       dbm = 6
    endif

      ' stop fall if hitting floor while moving left
    if fall = 1  and aa[row+1 ][column] = 1  and dir = 2 and move = 1
       fall = 0
       move = 0
       dbm = 7
    endif
       ' Should we fall? ( moving right )  
    if move = 1 and dir = 1 and aa[row + 1][ column ] = 0 and aa[row + 1][ column + 1] = 0  and jump = 0
        fall = 1
        dbm = 8
    endif
       ' fall moving left
    if move = 1 and dir = 2 and aa[row + 1][ column ] = 0  and jump = 0 and fall = 0 and dx = 10
       fall = 1
       move = 0
       dbm = 9
     
    endif
       ' moving left and falling, stop moving left at wall

    if move = 1 and dir = 2 and aa[row ][ column-1 ] = 1 and fall = 1 and dx = 1  
        mov = 0
       
        dbm = 10
    endif
       ' adjust fall at wall
    if fall = 1 and dir = 2 and move = 0 and dx = 1
       px = px - 1
    endif
       ' stop at wall while moving left and falling
    if move = 1 and dir = 2 and aa[row + 1][ column ] = 0 and aa[row ][ column - 1] = 1  and fall = 1  and dx = 0
       move = 0
       fall = 0
       dbm = 11
    endif
       ' no falling if wall on right and dir = 1
    if fall = 1 and aa[row + 1][ column + 1 ] = 1 and dx > 0 and dir = 1
        fall = 0
        dbm = 12
    endif

       ' Make fall
    if fall = 1 then py = py + 1

       ' Stop horizontal movement at wall (while walking on floor)
 
       if move = 1 and dir = 1 and aa[row][ column + 1] = 1 and dx = 0 and jump = 0 and fall = 0
           move = 0 ; px = px - 1
           dbm = 13
       endif

       if move = 1 and dir = 2 and aa[row][ column -1 ] = 1 and jump = 0 and fall = 0 and dx = 0
            move = 0
            px = px + 1
            if aa[row +1][ column + 1 ] = 1 then fall = 1

            dbm = 14
       endif
        ' Stop horizontal movement at wall while jumping
       if move = 1 and dir = 1 and aa[row+1][ column + 1] = 1 and aa[row+1][ column] = 0 and jump > 0 and dx = 0
            move = 0
            dbm = 15
       endif
       if move = 1 and dir = 2 and aa[row+1][ column - 1] = 1 and aa[row+1][ column] = 0 and jump > 0 and dx = 1
            move = 0
            dbm = 16
       endif
         ' stop  at wall while moving left
       if move = 1 and dir = 2 and aa[row][ column - 1] = 1  and dx = 1
            px = px + 1
            dbm = 16
       endif              
         ' stop  at wall while moving left and slightly above wall
       if move = 1 and dir = 2 and aa[row + 1][ column - 1] = 1  and dx = 1 and dy > 2
            px = px + 1
            dbm = 16
       endif
        ' Stop  fall at floor
       if move = 1 and dir = 1 and aa[row + 1][ column ] = 1 and fall = 1
            fall = 0
            dbm = 17
       endif
       if move = 1 and dir = 2 and aa[row + 1][ column ] = 1 and fall = 1
            fall = 0
            dbm = 18
       endif
        ' Stop fall at top of wall  

       if move = 1 and dir = 1 and  aa[row + 1 ][ column + 1] = 1 and aa[row ][ column ] = 0 and fall = 1
          fall = 0
          move = 0
          dbm = 19
       endif
       if move = 1 and dir = 1 and  aa[row ][ column + 1] = 1 and aa[row ][ column ] = 0 and fall = 1  
           fall = 0  
           move = 0
           dbm = 20
       endif
       if move = 1 and dir = 1 and  aa[row + 1 ][ column ] = 0 and aa[row + 1 ][ column + 1 ] = 1 and fall = 1  
          fall = 0
          move = 0
          dbm = 21
       endif
       if move = 1 and dir = 1 and aa[row + 1 ][ column + 1 ] = 1 and fall = 1  
          fall = 0
          move = 0
          dbm = 22
       endif
        ' stop fall if hitting left side and top of block
       if move = 1 and dir = 2 and aa[row - 1 ][ column + 1 ] = 1 and fall = 1
          fall = 0
          dbm = 23
       endif
 
       ' stop left movement if hitting wall while moving left  ????????
       if move = 1 and dir = 2 and aa[row ][ column - 1 ] = 1 and fall = 1 and dx = 0
          fall = 0
          move = 0
          dbm = 24
       endif


        ' Stop jump at ceiling

       if  aa[row ][ column ] = 1 and jump > 0  
            jump = 0
            fall = 1
            dbm = 25
       endif
       if   dir = 1 and aa[row ][ column + 1 ] = 1 and jump > 20  
            jump = 0
            fall = 1
            dbm = 26
       endif
           'stop jump if ceiling on right
       if   dir = 2 and aa[row - 1 ][ column + 1 ] = 1 and jump > 0  and dx > 1 and dy = 1  
            jump = 0
            fall = 1

            dbm = 27
       endif
         ' stop fall if floor on right ??????
       if   dir = 2 and aa[row + 1 ][ column + 1 ] = 1 and fall = 1 and dy = 0 and move = 1  
            py = py -1
           
            fall = 0
            dbm = 27
       endif



       if dir = 2 and dy > 0 and aa[row + 1][ column ] = 1
            jump = 1
            move = 0
            dbm = 28
       endif

      if px > 1300
       '  px = 1300   #####################################
         dbm = 29
      endif
      if px < 60
          px = 60
          dbm = 30
      endif
    ' stop jump at top of board
      if py < 51
          fall = 1
          jump = 0
          dbm = 31
      endif
     
    ch = inkey(1)

      ' Go to start
    if ch = 32
        px = 300 ; py = 150 ; move = 0; jump = 0 ; fall = 0 ; xoffset = 0 ; yoffset = 0
    endif

       ' right
    if ch = 39
       
       dir = 1
       move = 1
       
    endif

       ' left
    if ch = 37

         dir = 2
         move = 1
       
    endif
    if move = 1 and dir = 1  then px = px + 1
    if px > 50 and move = 1 and dir = 2 then px = px - 1

    ' stop
    if ch = 40 then
        move = 0
        fall = 0
        jump = 0
    endif

    ' up
    if ch = 38 and jump = 0 and fall = 0  
        jump = 1
        fall = 0
       
    endif

   
     
       if dx < 49 then  draw image 1, zx-xoffset, zy - yoffset ;    ' main screen
      if move = 1 then draw image 6,px+1 - xoffset ,py+1 - yoffset  ; ' image 6 is blank square
      if jump > 0 then draw image 6,px+1 - xoffset ,py+1 - yoffset
      if fall = 1 then draw image 6,px+1 - xoffset ,py+1 - yoffset

      if dir = 1 then draw image 4,px+1 - xoffset ,py - yoffset     ; ' player right
      if dir = 2 then draw image 5,px - xoffset ,py - yoffset       ; ' player left
      if dir = 1 and jump = 1 then draw image 4,px+1 - xoffset ,py - yoffset
      if dir = 2 and jump = 1 then draw image 5,px - xoffset ,py - yoffset
   '   proc print1
   
      redraw
         
    wait 1
   
  wend

endproc


procedure print1()
       ' this procedure used for debugging
       ' sq1 = px/50
        set color 0,0,0
        draw rect 10,520,140,210,1
        set color 255,255,255
        set caret 10,520
        write "px  "; write px ; write " py  " ; wln py
        write "column " ;  write column ; write " row "; wln row
        write "move  " ; wln move
        write "jump  " ; wln jump
        write "fall  " ; wln fall  
        write "dir  " ; wln dir
        write "columnx " ; wln columnx
        write "cx " ; wln cx
        write "rowy ";  wln rowy
        write "ry " ; wln ry
        write "dx " ; wln dx
        write "dy " ; wln dy
        if dbm > 0 then wln dbm
          if dbm2 <> dbm
            set caret cnt1,735
            cnt1 = cnt1 + 60
             write dbm ; write "      " ;
          endif
          if cnt1 > 150
             cnt1 = 60
          endif
          dbm2 = dbm
     ' redraw
     
endproc

procedure images()
     for a = 3 to 10
        create image a, 50, 50
     next
        create image 11, 400,60
     set image 3
     ' square
     set color 0,0,220
     draw rect 0,0,49,49,1
     set color 255,0,0
     draw rect 0,0,49,49
     draw rect 1,1,48,48
        set color 255,255,255
        draw rect 23,23,4,4 ; draw rect 21,21,8,8 ; draw rect 19,19,12,12 ; draw rect 17,17,16,16
        set color 255,255,0
        draw rect 15,15,20,20 ; draw rect 13,13,24,24 ; draw rect 11,11,28,28 ; draw rect 9,9,32,32

     set image 4
     ' pac right
     set color 255,0,255
     draw rect 0,0,50,50,1
     set color 255,255,0
     draw ellipse 25,25,22,22,1
     set color 250,250,255
     draw ellipse 25,25,20,20,0
     draw ellipse 25,25,18,18,0
     draw ellipse 26,16,4,4,0
     set color 255,0,255
     set pixel 25,15 ; set pixel 27,15 ; set pixel 27,17 ; set pixel 25,17 ; set pixel 25,15 ;  
     t1[] = [ 25,25,50,15,50,35 ]
     draw poly t1,1

     set image 5
     ' pac left
     set color 255,0,255
     draw rect 0,0,50,50,1
     set color 255,255,0
     draw ellipse 25,25,22,22,1
     set color 250,250,255
     draw ellipse 25,25,20,20,0
     draw ellipse 25,25,18,18,0
     draw ellipse 26,16,4,4,0
     set color 255,0,255
     set pixel 25,15 ; set pixel 27,15 ; set pixel 27,17 ; set pixel 25,17 ; set pixel 25,15 ;  
     t1[] = [ 25,25,0,15,0,35 ]
     draw poly t1,1

     set image 6
     set color 0,0,0
     draw rect 1,1,49,49,1

        set image 11
        set color 255,255,255
        write "@  " ; write dbm


     set color 255,255,255
     set image primary
     
endproc



end
 The arrow keys move the icon. The up arrow is jump. The down arrow is stop. The space bar starts over and the esc key ends game.

Print this item

  superTomaaz....
Posted by: Aurel - 02-02-2020, 11:39 AM - Forum: Local pub - Replies (6)

says....  Big Grin


Quote:There are only two programs I have always installed on all my computers and Geany is one of them (the other one is Gimp). For me, there is absolutely no replacement for these two.

ha ha ha ah............. Big Grin Big Grin Big Grin
both of them sucks on windoz 
Tongue Tongue Tongue Tongue

look this::
https://aurelsoft.ucoz.com/Valentinke.png

Print this item

  Lemmings in NaaLaa
Posted by: Aurel - 01-21-2020, 10:13 AM - Forum: Questions and discussions - Replies (3)

I am still looking for that on my old hard-disks
Maybe some of members here have that one level Lemmings game demo?

Print this item

  How to Take a Screen Shot on a Laptop having windows 10?
Posted by: jasonassistanttru - 01-21-2020, 10:10 AM - Forum: Questions and discussions - No Replies

If you want to show others what is on your laptop screen, taking a screenshot is the easiest and most convenient way to share the image of your laptop screen. if you want to take a screenshot on Windows laptop and do not know how to take screenshot on HP laptop, then just follow the steps mentioned below:
To Take A Screen Shot And For Save It
If you want to take a shot of everything that is displayed on your laptop screen and you want to save on your laptop to send or upload it later, simply:
1. Press the Windows Key + PrtScn (Print Screen) button.
2. A prompt will pop-up that very moment. Simply type in a file name for the image and the destination folder where you would like to save it. Then click "Save".

To Take a Screen Shot Without Saving It
If you want to just quickly take an image of everything on your laptop screen but you just want to paste it maybe into a Word Doc or any other file, then simply:
1. Press the PrtScn key on your keyboard. It has now been copied and you can use the paste option or "CTRL+V" to put it wherever you want.

If You Want To Take A Screen Shot Of Only One Window Tab
If you don’t want an image of everything on your screen, but just want to target one window Tab, then simply:
1. Click on the window Tab that you want to take a screenshot of.
2. Press Alt along with PrnScn key. An image of only that window is now copied to your clipboard, and you can paste it wherever you like with Ctrl+V.

Print this item

  Merry Christmas
Posted by: Aurel - 12-25-2019, 08:20 AM - Forum: Local pub - Replies (3)

Merry Christmas

Print this item

  MandalaV1
Posted by: Rick3137 - 11-25-2019, 02:42 PM - Forum: Showcase - Replies (3)

I'm back to art programs.

 In this series, I'm doing single Mandalas instead of art programs with lots of buttons.

 I will later attempt to create a graphics file for each Mandala. Several of these should be good material for a video.

Code:
'  By Rick3137    http://rb23.yolasite.com/
'  You have permission to copy, paste, alter or post anywhere as long as you don't copyright my work.
'  If it breaks your computer or does damage to your health or wealth , I didn't do it.
'  If you repost this material to another website like Utube, please make changes to the content and name so no one gets confused.
visible:
'event = 1 ; mx = 0 ; my = 0
hidden:
set redraw off

set window 0, 0, 1200, 700
  set color 0,0,10
  cls
  proc Mandala

 ' proc Mandala1
  redraw
  wait keydown
end

procedure Setup()

endproc

procedure PrintText()
     
     set caret 10,200
     write " MouseX = " ; wln str$(mx)
     write " MouseY = " ; wln str$(my)
     
endproc
        function MoveX#(x#, d#, angle#)
           x2# = 0.0;
           dx# = cos#( angle# )
           x2 = x + (dx * d);
           return x2;
        endfunc

        function MoveY#(y#, d#, angle#)
            y2# = 0.0;
            dy# = sin#( angle# )
            y2 = y - (dy * d);
            return y2;
        endfunc

      procedure DrawStar(x#, y#, size#)
          cnt = 1 ; angle# = 360.0
           x = x - size/2.0 ; y = y - size/6.0  
           x2# = x + size;
           y2# = y;
           
          while cnt < 6
             
               draw line int(x),int(y), int(x2), int(y2)
               angle = angle - 144.0
               x = x2; y = y2;
               x2# = MoveX(x, size, angle) ;  y2# = MoveY(y, size, angle)

               cnt = cnt + 1;
           wend
      endproc

      procedure DrawStar9(x#, y#, size#)
         z = 1
           x = x - size/2.0 ; y = y - size/6.0
        while z < 9
           cnt = 1 ; angle# = 360.0
 
           x2# = x + size;
           y2# = y;
          while cnt < 6
             
               draw line int(x),int(y), int(x2), int(y2)
               angle = angle - 144.0
               x = x2; y = y2;
               x2# = MoveX(x, size, angle) ;  y2# = MoveY(y, size, angle)

               cnt = cnt + 1;
           wend
           z = z + 1
           size = size - 1.0 ; cnt = 1
        '  x = x - size/2.0 ; y = y - size/6.0
          wend
      endproc

procedure DrawPentagon(x#,y#,radius#)
 x1#; y1#; x2#; y2#; angle1# ; dx1# ; dy1# ; angle2# ; dx2# ; dy2#
 angle1 = 54.0
 angle2 = angle1 + 72.0
 
 b=0
 while radius > 0.0
  for a = 1 to 5
    dy1 = sin(angle1) * radius
    dx1 = cos(angle1) * radius
    dy2 = sin(angle2) * radius
    dx2 = cos(angle2) * radius
    x1 = x + dx1 ; x2 = x + dx2
    y1 = y + dy1 ; y2 = y + dy2
    draw line int(x1),int(y1),int(x2),int(y2)
    angle1 = angle1 + 72.0
    angle2 = angle2 + 72.0
  next
  radius = radius - 0.001
  b=b+1
 
 wend
endproc
     
      procedure Circle( x#, y#, size# , type )
           angle# = 0.0; cnt = 1; distance# = size/ 2.0
          x2 = int(x)
          y2 = int(y)
          size2 = int(size) ; size3 = int(size/ 2.0)
          if type = 0 then draw ellipse x2,y2,size2,size2,0
          if type = 1 then draw ellipse x2,y2,size2,size2,1
          if type = 2
           while cnt < 33
               x3# = MoveX(x, distance, angle) ;  y3# = MoveY(y, distance , angle)
               x4 = int(x3) ; y4 = int(y3)
               draw ellipse x4,y4,size3,size3,0
           angle = angle + 11.25;
           cnt = cnt + 1
           wend
          endif
      endproc

      procedure Circle8( x#, y#, size# , distance#, type)
           angle# = 0.0; cnt = 1;  
           while cnt < 33
              x2# = MoveX(x, distance, angle) ;  y2# = MoveY(y, distance , angle)
              proc Circle  x2,  y2, size, type ;
           angle = angle + 11.25;
           cnt = cnt + 1
           wend
      endproc

      procedure Circle8x( x#, y#, size#, distance1#, distance2#, type)
           angle1# = 0.0; cnt1 = 1; angle2# = 0.0; cnt2 = 1;  
           while cnt1 < 9
              x2# = MoveX(x, distance1, angle1) ;  y2# = MoveY(y, distance1 , angle1)
                   cnt2 = 1 ; angle2 = 0.0
                   while cnt2 < 9
                      x3# = MoveX(x2, distance2, angle2) ;  y3# = MoveY(y2, distance2 , angle2)
                      proc Circle  x3,  y3, size, type ;
                      angle2 = angle2 + 45.0;
                      cnt2 = cnt2 + 1

                   wend
           angle1 = angle1 + 45.0;
           cnt1 = cnt1 + 1
           wend

      endproc

      procedure Circle16( x#, y#, size# , distance#, type)
           angle# = 0.0; cnt = 1;  
           while cnt < 17
              x2# = MoveX(x, distance, angle) ;  y2# = MoveY(y, distance , angle)
              proc Circle  x2,  y2, size, type ;
           angle = angle + 22.5;
           cnt = cnt + 1
      wend
      endproc

   
      procedure Circle32( x#, y#, size# , distance#, type)
           angle# = 0.0; cnt = 1;  
           while cnt < 33
              x2# = MoveX(x, distance, angle) ;  y2# = MoveY(y, distance , angle)
              proc Circle  x2,  y2, size, type ;
           angle = angle + 11.25;
           cnt = cnt + 1
      wend
      endproc

      procedure Circle32a( x#, y#, size# , distance#, type)
           angle# = 5.625 ; cnt = 1;
            while cnt < 33 ;
              x2# = MoveX(x, distance, angle) ;  y2# = MoveY(y, distance , angle)
              proc Circle  x2,  y2, size, type ;
           angle = angle + 11.25;
           cnt = cnt + 1
      wend
      endproc

      procedure Circle180( x#, y#, size# , distance#, type)
           angle# = 0.0; cnt = 1;  
           while cnt < 181
              x2# = MoveX(x, distance, angle) ;  y2# = MoveY(y, distance , angle)
              proc Circle  x2,  y2, size, type ;
           angle = angle + 2.0;
           cnt = cnt + 1
      wend
      endproc
procedure Mandala1()
  set color 0,0,0
  cls

    angle# = 0.0; cnt = 1; x# = 600.0 ; y# = 350.0 ; size# = 40.0 ; d# = 100.0 ; angle2# = 22.5
        ' center
    set color 0,30,80 ; proc Circle  x,  y, 350.0, 1 ;
    set color 0,40,60 ; proc Circle180  x,  y, 80.0, 270.0, 0 ;

    set color 0,40,160 ; proc Circle  x,  y, 200.0, 1 ;
    set color 0,170,150 ; proc Circle32  x,  y, 60.0, 140.0, 0 ;
    set color 255,255,255 ; proc Circle32  x,  y, 10.0, 190.0, 0 ;
      proc Circle32  x,  y, 30.0, 20.0, 0 ; proc Circle32  x,  y, 6.0, 190.0, 1 ;

    while cnt < 9
     
      x2# = MoveX(x, 90.0, angle) ;  y2# = MoveY(y, 90.0, angle) ; set color 0,0,255
       proc Circle  x2,  y2, 30.0, 1 ; set color 255,255,255 ; proc Circle  x2,  y2, 30.0, 0 ;
       proc Circle32  x2,  y2,  10.0,20.0, 0 ;
    '  x2# = MoveX(x, 150.0, angle) ;  y2# = MoveY(y, 150.0, angle) ; set color 50,50,255
    '   proc Circle  x2,  y2, 25.0, 1 ; set color 200,200,255 ; proc Circle  x2,  y2, 25.0, 0 ;
        set color 0,155,255 ; proc Circle32  x2, y2, 10.0,10.0, 0 ;
      x2# = MoveX(x, 227.0, angle) ;  y2# = MoveY(y, 227.0, angle) ; set color 100,100,255
       proc Circle  x2,  y2, 22.0, 1 ; set color 255,255,255 ; proc Circle  x2,  y2, 22.0, 0 ;
       set color 0,255,155 ; proc Circle32  x2, y2, 8.0,8.0, 0 ;
      x2# = MoveX(x, 275.0, angle) ;  y2# = MoveY(y, 275.0, angle) ; set color 150,150,255
       proc Circle  x2,  y2, 19.0, 1 ; set color 255,255,255 ; proc Circle  x2,  y2, 19.0, 0 ;
       set color 0,150,100 ; proc Circle32  x2, y2, 8.0,8.0, 0 ;
      x2# = MoveX(x, 320.0, angle) ;  y2# = MoveY(y, 320.0, angle)
       set color 255,255,255 ; proc Circle  x2,  y2, 16.0, 1 ;
       set color 0,200,200 ; proc Circle32  x2,  y2,  8.0,8.0, 0 ;
      angle = angle + 45.0;
      cnt = cnt + 1
    wend
     cnt = 1;
    while cnt < 9
       
          x2# = MoveX(x, 190.0, angle2) ;  y2# = MoveY(y, 190.0, angle2)
            set color 255,255,0 ; proc Circle32  x2,  y2,  30.0,30.0, 0 ;
          x2# = MoveX(x, 310.0, angle2) ;  y2# = MoveY(y, 310.0, angle2)
            set color 0,255,150 ; proc Circle  x2,  y2, 40.0, 1 ;
            set color 255,255,0 ; proc Circle32  x2,  y2,  26.0,26.0, 0 ;

        angle2 = angle2 + 45.0
        cnt = cnt + 1
    wend
endproc

procedure Mandala()
       ' Outer background
       set color 30,10,50
       cls

    angle# = 0.0; cnt = 1; x# = 600.0 ; y# = 350.0 ; size# = 40.0 ; d# = 100.0 ; angle2# = 22.5
        ' Middle Background
    set color 50,0,180 ; proc Circle  x,  y, 350.0, 1 ;
        ' Center Background
    set color 60,0,30 ; proc Circle  x,  y, 200.0, 1 ;

        ' Draw from center
    set color 0,40,60 ; proc Circle180  x,  y, 80.0, 270.0, 0 ;

    set color 0,170,150 ; proc Circle32  x,  y, 60.0, 140.0, 0 ;


      set color 255,0,0 ; proc Circle32  x,  y, 10.0, 190.0, 0  
      set color 255,55,255 ; proc Circle32  x,  y, 30.0, 20.0, 0
      set color 255,0,255 ; proc Circle32  x,  y, 6.0, 190.0, 1 ;

    while cnt < 9
      ' 8 main angles
      x2# = MoveX(x, 90.0, angle) ;  y2# = MoveY(y, 90.0, angle) ;
       set color 100,0,200 ;  proc Circle  x2,  y2, 10.0, 1  
       set color 255,255,255 ; proc Circle  x2,  y2, 30.0, 0 ;
       proc Circle32  x2,  y2,  10.0,20.0, 0 ;
   
       proc Circle  x2,  y2, 25.0, 1 ; set color 200,0,255 ; proc Circle  x2,  y2, 25.0, 0 ;
        set color 150,0,255 ; proc Circle32  x2, y2, 10.0,10.0, 0 ;
      x2# = MoveX(x, 227.0, angle) ;  y2# = MoveY(y, 227.0, angle) ; set color 100,0,255
       proc Circle  x2,  y2, 22.0, 1 ; set color 255,255,255 ; proc Circle  x2,  y2, 22.0, 0 ;
       set color 100,5,155 ; proc Circle32  x2, y2, 8.0,8.0, 0 ;
      x2# = MoveX(x, 275.0, angle) ;  y2# = MoveY(y, 275.0, angle) ; set color 150,0,255
       proc Circle  x2,  y2, 19.0, 1 ; set color 255,255,255 ; proc Circle  x2,  y2, 19.0, 0 ;
       set color 150,0,100 ; proc Circle32  x2, y2, 8.0,8.0, 0 ;
      x2# = MoveX(x, 320.0, angle) ;  y2# = MoveY(y, 320.0, angle)
       set color 255,255,255 ; proc Circle  x2,  y2, 16.0, 1 ;
       set color 50,0,200 ; proc Circle32  x2,  y2,  8.0,8.0, 0 ;
      angle = angle + 45.0;
      cnt = cnt + 1
    wend
     cnt = 1;
     ' alternate angles
    while cnt < 9
       
          x2# = MoveX(x, 190.0, angle2) ;  y2# = MoveY(y, 190.0, angle2)
            set color 255,5,155 ; proc Circle32  x2,  y2,  30.0,30.0, 0 ;
          x2# = MoveX(x, 310.0, angle2) ;  y2# = MoveY(y, 310.0, angle2)
            set color 250,55,150 ; proc Circle  x2,  y2, 40.0, 1 ;
            set color 255,100,200 ; proc Circle32  x2,  y2,  26.0,26.0, 0 ;

        angle2 = angle2 + 45.0
        cnt = cnt + 1
    wend
endproc



end

Print this item

  RetroB forum is in closing.
Posted by: Aurel - 10-14-2019, 05:23 PM - Forum: Local pub - Replies (27)

End of Retrogamecoding and Basicprogramming Forum

Print this item

  OBJECTION
Posted by: Aurel - 10-04-2019, 06:13 PM - Forum: Local pub - Replies (4)

Marcus 
is this web hosting on some sort of free market hosting or is it paid
i have free hosting but i necer see such a amount of spamm?

Print this item

  Animation basics
Posted by: Marcus - 09-10-2019, 06:42 AM - Forum: Showcase - Replies (3)

This example shows some simple animation stuff for new beginners. It's just a pacman-like character that can move around.



Attached Files
.zip   pocman.zip (Size: 2.17 KB / Downloads: 6)
Print this item

  back buffer (draw to a texture before display)
Posted by: bul71 - 09-06-2019, 10:07 PM - Forum: Questions and discussions - Replies (1)

Hi!

I'm leaning naalaa and I make beautiful pictures BUT I'd like to prepare the display on a back buffer and display the result on the screen once all the picture is ready and not in a progressive way.

Thanks for your help.


oups !
I've just found a way :

set redraw off


redraw


If there's an other way I just listen.

Thank you.

Print this item