Advertisement
linesguy

rendering engine demo (updated)

Feb 10th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. 100 rem setup:
  2. 110 hgr2
  3.  
  4. 200 rem Initial values:
  5. 210 X1 = 20 : Y1 = 100
  6. 220 dim X2(70)
  7. 230 y3 = 30
  8.  
  9.  
  10. 300 rem render engine loop:
  11. 310 poke 230,32 : gosub 400 : poke 49236,0 : poke 230,64 : gosub 400 : poke 49237,0 : goto 310
  12.  
  13.  
  14.  
  15. 400 rem colors + sprite index:
  16. 405 hcolor = 0 : gosub 800 : rem background
  17. 410 hcolor = 3 : gosub 500 : rem plus
  18. 420 gosub 600 : rem different speed sine waves unconnected
  19. 430 gosub 700 : rem different speed sine waves connected
  20. 440 hcolor = 1 : gosub 900 : rem diamond moving in circles
  21. 498 return
  22.  
  23.  
  24. 499 rem everything after this line is code for sprites
  25.  
  26. 800 hplot 0,0 : call -3082 : return
  27.  
  28. 500 X1 = X1 + 1 : if X1 > 200 then X1 = 20
  29. 510 hplot X1+5,Y1 to X1+5,Y1+10 : hplot X1,Y1+5 to X1+10,Y1+5
  30. 520 return
  31.  
  32. 600 for Y = 10 to 70 step 10
  33. 610 X2(Y) = X2(Y) + Y/250 : hplot sin(X2(Y))*10+50,Y
  34. 620 next
  35. 630 return
  36.  
  37. 700 X3(1) = X3(1) + 0.1 : X3(2) = X3(2) + 0.05 : X3(3) = X3(3) + 0.025
  38. 710 hplot sin(x3(1))*25+150,Y3 to sin(x3(2))*10+150,Y3+15 to sin(x3(3))*25+150,y3+30
  39. 720 return
  40.  
  41. 900 X4 = X4 + 0.1 : Y4 = Y4 + 0.1
  42. 905 XS = sin(X4)*20 : YS = cos(Y4)*20
  43. 910 hplot XS+150,YS+100 to XS+155,YS+105 to XS+150,YS+110 to XS+145,YS+105 to XS+150,YS+100
  44. 920 return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement