|
Post by marjagonzalves on Oct 20, 2023 13:13:27 GMT
What happened to this contest? Is it over?
I was going to post another entry. But it's not a lot different from earlier. Avoid "TA", stick to eight original move commands but could use "S", "C", "N", "B". In a manner that produces interest. Must use guided randomization.
|
|
|
Post by bplus on Oct 20, 2023 13:40:25 GMT
Well I sure like to see someone other than myself posting here I say go ahead and post! the contest is just to post something with DRAW and if you have a better idea, GO FOR IT! No one's stopping you, unless you want to do it in Python ;-))
|
|
|
Post by marjagonzalves on Oct 22, 2023 0:38:57 GMT
Need to adjust the "xskew" and "yskew" values to try to make the graphics larger. I like the effect this does, only want to make it larger. The plot, not the "DRAW" strings.
I studied code from "mnrvovrfc" about the "doodle" and then came up with this.
EDIT: I liked the results but the code is wrong. Before this edit, the code wasn't changing "a3" and "a4" variables.
option _explicit dim sd(1 to 10) as string, dc(1 to 10) as string, pick(1 to 18) as integer dim as double pi2rad, a1, a2, a3, a4, b1, b2, b3, b4, c1, c2, c3, c4, xx, yy dim as string da, drawdir dim as integer kount, i, j, g, xskew, yskew, x, y
pick(1) = 1 pick(2) = 1 pick(3) = 1 pick(4) = 1 pick(5) = 2 pick(6) = 2 pick(7) = 2 pick(8) = 3 pick(9) = 3 pick(10) = 4 pick(11) = 4 pick(12) = 5 pick(13) = 5 pick(14) = 6 pick(15) = 7 pick(16) = 8 pick(17) = 9 pick(18) = 10 dc(1) = "c4" dc(2) = "c6" dc(3) = "c9" dc(4) = "c11" dc(5) = "c13" dc(6) = "c14" dc(7) = "c2" dc(8) = "c5" dc(9) = "c6" dc(10) = "c1" xskew = 100 yskew = 60
drawdir = "UDLREFGH" randomize timer
screen 12
do
for j = 1 to 10 sd(j) = "" for i = 1 to 10 da = chr$(48 + Random1(4)) if da = "3" then da = "8" da = mid$(drawdir, Random1(8), 1) + da if i = 3 or i = 7 then sd(i) = sd(i) + "N" elseif i = j then sd(i) = sd(i) + "B" end if if Random1(2) = 1 then sd(j) = da + sd(j) else sd(j) = sd(j) + da end if next next
b1 = Rand(666, 1555) / 1000 b2 = Rand(101, 750) / 1000 b3 = Rand(101, 750) / 1000 b4 = Rand(101, 750) / 1000 c1 = Rand(10, 40) / 10 c2 = Rand(10, 40) / 10 c3 = Rand(10, 40) / 10 c4 = Rand(10, 40) / 10 a1 = 0 a2 = Random1(7) * 45 a3 = Random1(7) * 45 a4 = 0 kount = 0
do xx = c1 * cos(_d2r(a1)) + c2 * sin(_d2r(a2)) + xskew yy = c3 * sin(_d2r(a3)) + c4 * sin(_d2r(a4)) + yskew a1 = a1 + b1 if a1 > 360 then a1 = a1 - 360 kount = kount + 1 end if a2 = a2 + b2 if a2 > 360 then a2 = a2 - 360 a3 = a3 + b3 if a3 > 360 then a3 = a3 - 360 a4 = a4 + b4 if a4 > 360 then a4 = a4 - 360 x = int(xx * 3) y = int(yy * 3) if x > 100 and y > 100 and x < 540 and y < 380 then g = Random1(18) pset(x, y) draw dc(pick(g)) + sd(pick(g)) end if loop until kount > 4 for i = 1 to 20 _delay 0.5 if _keydown(27) then exit do next cls loop until _keydown(27) system
function Rand& (val1 as long, val2 as long) Rand& = int(rnd * (val2 - val1) + val1) end function
function Random1& (val1 as long) Random1& = int(rnd * val1 + 1) end function
|
|
|
Post by neils4 on Oct 22, 2023 18:31:28 GMT
Hey, for the programming competition I made a small Halloween-themed program and made use of the Draw command. In my program, a jack-o-lantern appears multiple times on the screen and its mouth moves, so it looks like it is saying, "HAPPY HALLOWEEN 2023!" Later, a ghost flies around the screen and the text, "HAVE A GHOSTLY HALLOWEEN!" is displayed. I had a great time making it and learned a lot, using the Draw command as best as I could. I liked the jack-o-lantern so much that I renamed it "Pumpkin Kid" and used it as a character in my RPG. I later used the same code for the ghost flying around and made a mini-game called BUG BLASTER for my RPG. Finally, I made a YouTube channel to share videos of my game with the general public. You can find links to it and the latest version of my game in my updated second to last post in the thread about my game. I have attached my Happy Halloween 2023 .BAS file for you to view. Happy Halloween! Attachments:HappyHalloween.BAS (9.84 KB)
|
|
|
Post by bplus on Oct 22, 2023 18:44:50 GMT
Wow neils4 ! so nice to be young and so full of it! LOL Can't wait to check out you submission. Update: Fabulous!
|
|