? Summer Programming Contest 2017 (Page 6) ● SmileBASIC Source Forums

Sign In

Register
*Usernames are case-sensitive
Forgot my password

📣 Summer Programming Contest 2017

1 2 3 4 5 6 7 8 9 10 11
  • #101 ✎ 226 HTV04 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Avatar Taboo I didn't change my avatar for 180 days Website Forum Contributor Hidden Achievements
    After the contest is over, could I improve my program (which might make it more than one screen)?
    Nope. It's stuck like that forever. Lol of course you can. The folder I put up for voting will have it preserved in all its OSP glory.
    Ok 😂.
    Posted
  • #102 ✎ 94 Giant_Gamer Spring 2017 Contest Participant I participated in the SmileBASIC Source Spring 2017 Contest! Programming Contest Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Winter 2016 Contest Participant I participated in the SmileBASIC Source Winter 2016 Contest! Programming Contest Here is my Entry: "ROC6" KEY: 12LEVK8V A fancy but simple Rock Paper Scissors game. Features: Simple Button input Score updates visual 2x2 rock, paper and scissors for your move and CPU choice 4 Different Ending screen savers! Can you get them all? (hint in ROC6NOTES) (Also included is ROC (1)-ROC5 and ROC6NOTES where I detail and explain the final version, and show how it works (for other beginners).) EDIT:
    ROC (1) I basically wrote this out long form, then compacted it a bit.
    ROC2 I was looking at the sort of famous Commodore 64 BASIC single line program, and thought it might be a nice touch to add my own version of it. https://10print.org/ 10 PRINT CHR$(205.5+RND(1)); : GOTO 10
    ROC4 Thanks to 12ME21, he helped me to squish this monster, into a single line. (note: No ROC3 screen shot as it is very similar to ROC2)
    ROC5 Realizing that a blank screen telling you if you win or lose is borring, and stumbling on the idea to use the trick 12ME21 told me, I saved space creating a PRINT out of a small 2x2 text, using the [R] modifier for text selection.
    ROC6NOTES (long form of final version but minus a few format changes) I wanted to notate everything in the program, so With a dramatic format change, here it is. (also includes an ending guide)
    Posted Edited by randomous
  • #103 ✎ 1572 12Me21 Head Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Second Year My account is over 2 years old Website More random tips:
    • Use short variable/label names
    • It's usually shorter to store data in strings and use ASC() to read it, rather than using DATA or something
    • Try removing spaces and colons from your code and checking if it's allowed: GOTO @L [email protected] 'yes IF B AND #R THEN IF B AND#R THEN 'no X=1:END X=1END 'no ?"TEST":END ?"TEST"END 'yes
    • Reversing things can save space: IF A$=="+"THEN ... IF"+"==A$THEN ...
    • Use numbers instead of functions: GCOLOR RGB(255,128,0) GCOLOR-32768
    • Use constants for large numbers: BGMSET 128,"CDEFG" BGMSET #Y,"CDEFG"
    • Some # constants don't actually save any space: IF B AND #LEFT THEN IF B AND 4THEN GCOLOR #WHITE GCOLOR-1
    Posted Edited by 12Me21
  • #104 ✎ 94 Giant_Gamer Spring 2017 Contest Participant I participated in the SmileBASIC Source Spring 2017 Contest! Programming Contest Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Winter 2016 Contest Participant I participated in the SmileBASIC Source Winter 2016 Contest! Programming Contest I was debating shortening a few more labels such as @START, @GEND, and @BEND, but the space that would save would not allow me to make an script AI for the computer. But with those tips I could possible reduce it another half line. (Partly because I left in an ENDIF that could be cut and save more space... BUT it would mean It couldn't be all in one line of coed. XD ) EDIT: Possible tip: reduce 3 digit or greater numbers by converting to HEX.. maybe? Posted Edited by Giant_Gamer
  • #105 ✎ 94 Giant_Gamer Spring 2017 Contest Participant I participated in the SmileBASIC Source Spring 2017 Contest! Programming Contest Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Winter 2016 Contest Participant I participated in the SmileBASIC Source Winter 2016 Contest! Programming Contest
    I liked this contest so much, I made two entries... and I have no idea which one I'll use. First off I have a platforming game with six unique levels. In each level, the player must collect all five crowns to open the door to the next stage.
    Any tips on collecting the last crown on the bottom right on the last level... I can't collect it with out dying,
    Posted Edited by randomous
  • #106 ✎ 168 Nathaniel Avatar Block I didn't change my avatar for 30 days. Website Avatar Embargo I didn't change my avatar for 90 days Website Avatar Taboo I didn't change my avatar for 180 days Website
    Any tips on collecting the last crown on the bottom right on the last level... I can't collect it with out dying,
    It's fairly hard to collect that one. From the start, jump right onto the nearist platform and take the top route over the next one to the right. Fall down to the next platform and jump left to collect the crown followed by heading right to return to the platform.
    Posted
  • #107 ✎ 1572 12Me21 Head Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Second Year My account is over 2 years old Website numbers are only shorter in hex if they're REALLY big, because of the &H part Posted
  • #108 ✎ 42 kantackistan Key: QES3KD Name: aVoid Code: Go to a dark room and put on your best pair of headphones - because the only way to detect the predators in the night is to listen for their heartbeat. Use echolocation to survive as long as you can. But beware, the beasts get faster and faster as the night goes on. Controls: Circle Pad - Walk or Run Volume Slider - Adjust level of difficulty https://smilebasicsource.com/page?pid=851 Gameplay Screenshot: Posted Edited by kantackistan
  • #109 ✎ 94 Giant_Gamer Spring 2017 Contest Participant I participated in the SmileBASIC Source Spring 2017 Contest! Programming Contest Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Winter 2016 Contest Participant I participated in the SmileBASIC Source Winter 2016 Contest! Programming Contest
    numbers are only shorter in hex if they're REALLY big, because of the &H part
    yeah, scrap the 3 digit use, it saves nothing except for certain exception numbers. Oh well it was a nice thought. (MYTH BUSTED)
    Posted
  • #110 ✎ 96 niconii Video Games I like to play video games! Hobbies Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Drawing I like to draw! Hobbies
    numbers are only shorter in hex if they're REALLY big, because of the &H part
    Specifically, when a leading space is needed, these ranges are shorter for hex numbers, since they don't need a leading space: GCOLOR&HF4240 GCOLOR 1000000 GCOLOR&HFFFFF GCOLOR 1048575 GCOLOR&H989680 GCOLOR 10000000 GCOLOR&HFFFFFF GCOLOR 16777215 GCOLOR&H5F5E100 GCOLOR 100000000 GCOLOR&HFFFFFFF GCOLOR 268435455 GCOLOR&H3B9ACA00 GCOLOR 1000000000 GCOLOR&H7FFFFFFF GCOLOR 2147483647 GCOLOR&H80000000 GCOLOR-2147483648 GCOLOR&HC4653600 GCOLOR-1000000000 Anything else is either shorter in decimal or the same length. This is also assuming you don't use math to calculate numbers in a way that's shorter. For example: GCOLOR&H80000000 GCOLOR 1<<31
    Posted Edited by niconii
  • #111 ✎ 38 Imasheep Minecraft Is Awesome! I love Minecraft! Express Yourself OSP Contest 1 Contest Participant I participated in the first SmileBASIC Source OSP Contest! OSP Contest 2 Contest Participant I participated in the second SmileBASIC Source OSP Contest!
    Key: QES3KD Name: aVoid Code: Go to a dark room and put on your best pair of headphones - because the only way to detect the predators in the night is to listen for their heartbeat. Use echolocation to survive as long as you can. But beware, the beasts get faster and faster as the night goes on. Controls: Circle Pad - Walk or Run Volume Slider - Adjust level of difficulty https://smilebasicsource.com/page?pid=851 Gameplay Screenshot:
    Nice game concept! I hope it works out! :D
    Posted
  • #112 ✎ 408 UnderCake Halloween 2017 Contest Runner Up I placed 2nd in the SmileBASIC Source Halloween 2017 Contest! Programming Contest Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength First Year My account is over 1 year old Website ill probably be like the last submission lol, cause it keeps changing ideas but idk now.. need something good Posted
  • #113 ✎ 210 PesticidePoison Good Page Hidden Achievements Spring 2017 Contest Runner Up I placed 2nd in the SmileBASIC Source Spring 2017 Contest! Programming Contest Second Year My account is over 2 years old Website
    ill probably be like the last submission lol, cause it keeps changing ideas but idk now.. need something good
    No, I will be lol, I just got sick, my grandparents are here so I have no time to program with all the fun events, work, and daily chores. By the end of it all, the last of my energy is spent watching youtube and anime lmao. EDIT:(I also have been having trouble making an entry)
    Posted Edited by PesticidePoison
  • #114 ✎ 168 Nathaniel Avatar Block I didn't change my avatar for 30 days. Website Avatar Embargo I didn't change my avatar for 90 days Website Avatar Taboo I didn't change my avatar for 180 days Website Update: I made a huge platformer OSP using text compression. I think I'll use this instead of 3D Pong. Current key: E3S3VXQF EDIT: This has been changed. Posted Edited by randomous
  • #115 ✎ 1572 12Me21 Head Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Second Year My account is over 2 years old Website
    Update: I made a huge platformer OSP using text compression. I think I'll use this instead of 3D Pong. Current key: E3S3VXQF
    You don't need to use FLOOR since MOD sucks and only works with integers. Also if you just use a more simple packing algorithm and store two 8-bit values per character, you can decode it without needing a list of characters (since SB uses a 16 bit encoding), or if you reduce the list down to 31 unique characters, you could fit 3 per character instead of just 2. And if you store the level data in a separate variable, you can just do A$=VAR("0:WHATEVER$") in the compressed program, rather than PRGSETing it.
    Posted Edited by randomous
  • #116 ✎ 168 Nathaniel Avatar Block I didn't change my avatar for 30 days. Website Avatar Embargo I didn't change my avatar for 90 days Website Avatar Taboo I didn't change my avatar for 180 days Website
    Also if you just use a more simple packing algorithm and store two 8-bit values per character, you can decode it without needing a list of characters (since SB uses a 16 bit encoding)
    I understand everything but this part. Can you show an example on here like: A$="UNCOMPRESSED TEXT" 'COMPRESSING ALGORITHM CLIPBOARD A$ 'DECOMPRESSING ALGORITHM
    Posted Edited by Nathaniel
  • #117 ✎ 1572 12Me21 Head Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Second Year My account is over 2 years old Website A$="UNCOMPRESSED TEXT "'even length FOR I=0 TO LEN(A$)-1 STEP 2 INC B$,CHR$(ASC(A$[I]) OR ASC(A$[I+1])<<8) NEXT CLIPBOARD B$ FOR I=0 TO LEN(B$)-1 B=ASC(B$[I]) INC C$,CHR$(B AND &HFF) INC C$,CHR$(B>>8) NEXT ?C$ Here's a really short version: 'compressor FOR I=0 TO LEN(A$)-1 STEP 2 UNSHIFT B$,CHR$(ASC(A$[I]) OR ASC(A$[I+1])<<8) NEXT 'decompressor WHILE""<B$B=ASC(POP(B$))C$=C$+CHR$(255AND B)+CHR$(B>>8)WEND I feel like compressing the code isn't really true OSP anymore though, but it's not technically breaking any of the contest rules, so I guess it's allowed. Posted Edited by 12Me21
  • #118 ✎ 908 Y_ack I had a lot of fun with this! I loved seeing everyone's entries, too! Here's mine, a simplified Lindenmayer system expander and interpreter with a ruleset generator: 【V3S3XJQS】key graciously donated by 12Me21 and may be revoked without notice The interpreter supports stochastic and bracketed (branching) grammars. Gravity affects plant growth. The symbol strings can get very large after a few generations! So please be patient during the drawing process. If the "plant" is swaying, that means it's done drawing. The rule generator uses symbol bigram frequencies I got from some example L-systems to generate results better than random generation, but still often makes less-impressive knots, vines, and snares. About 1 in 8 look nice, though! For this reason, it's best to run it from direct mode. Specifying a seed allows you to generate the same plant by recording the seed value. Try 2, 4731, and 14522. To disable it, see the Editing Guide. I didn't get to add everything I wanted, such as leaf, bud, and flower nodes, or a third dimension (and rendering), or evolutionary selection... but I think it's almost fair for an OSP. You can read more about L-systems here: https://en.wikipedia.org/wiki/L-system ACLS:INPUT"SEED";E:RANDOMIZE.,E:GPAGE.,4GCLS:B$="ABC"F$=B$*3+"["*10+"+-"P$=(B$*3+"+")*2M$=(B$*3+"[-")*2N$="-+"*8+B$+"["E$=B$*2+"["*6+"++--"DIM R$[3,13]FOR I=0TO 2P=10S=0WHILE.<P:N=RND(P)+1P=P-N:R$[I,S]=STR$(100-P*10)A$=(B$*3+"[")[RND(10)]R$[I,S+1]=A$FOR J=RND(6)TO 6U$="]"*K:Q=21Q$=F$+U$*2IF"+"==A$THEN Q=20Q$=P$ELSEIF"-"==A$THEN Q=22Q$=M$ELSEIF"["==A$THEN Q=20Q$=N$ELSEIF"]"==A$THEN Q=16Q$=E$ENDIF:A$=(Q$+U$)[RND(Q+K)]K=K+2*(ABS(INSTR("] [",A$))-1)INC R$[I,S+1],A$+">"*MAX(MIN(K,2),0)NEXT:INC R$[I,S+1],"]"*(K/2)S=S+2K=0WEND:NEXT:DEF GR(C)J=RND(100)N=0WHILE J>VAL(R$[C,N])N=N+2WEND:RETURN R$[C,N+1]END:DEF EV(S$)FOR I=0TO LEN(S$)-1C=ASC(S$[I])IF C>64&&C<91THEN:G$=GR(C-65)S$[I]=G$I=I+LEN(G$)-1:ENDIF:NEXT:RETURN S$END:DEF LD S$DIM H[0]X=0Y=240w=90V=1D=RND(3)+1WHILE.<LEN(S$)&&Y>-20C=ASC(SHIFT(S$))IF C==91THEN PUSH H,V:PUSH H,w:PUSH H,Y:PUSH H,X:ELSEIF C>92THEN X=POP(H)Y=POP(H)w=POP(H)V=POP(H)ELSEIF C<44THEN w=w+20:ELSEIF C==45THEN w=w-20 ELSEIF C==60THEN V=V-2:ELSEIF C==62THEN V=V+2 ELSEIF C>64&&C<91THEN O=RGB(150-V/2,132+V,108-V)FOR I=0TO D:IF Y<-10THEN BREAK:ENDIF:w=w+SGN(X)*ATAN(X,Y+X*(V/&HC350))X=X+COS(RAD(w)):Y=Y-SIN(RAD(w))GPSET X+200,Y,O:NEXT:ENDIF:WEND:END:SPSET.,0,0,#R,#R:SPHOME.,200,240SPOFS.,200,240M$="A"@L:Z=Z+PI()/48?"A Grow"WAIT:CLS:IF BUTTON(2)THEN M$=EV(M$)T$=M$*1LD T$ENDIF:SPROT.,2.5*SIN(Z)[email protected] Removing the Seed Prompt: If you don't care about the randomization seed (the screenshots were generated without it), you can remove INPUT"SEED";E:RANDOMIZE.,E: on the first line. Defining L-systems: It's possible to use your own L-system ruleset, as well. To do so without destroying the generator code, insert a line break on the 26th wrapped line at column position 22, after :WEND:END and define rules by accessing indexes of the 2-dimensional array R. The first dimension of R$ corresponds to letter symbols A-Z: R$[0] is the rule for replacing A, R$[1] for B, and so on. The second dimension is the replacement rules for the corresponding symbol. Every n*2 index starting at n=0 is the probability (as a string) that the following replacement will be made, from 0 to 100. Every n*2+1 index is the replacement. Thus A -> B[+A][-A]BA B ->(.5) BB ->(.5) BBB would be declared with R$[0,0]="100"R$[0,1]="B[+A][-A]BA" R$[1,0]="50"R$[1,1]="BB"R$[1,2]="50"R$[1,3]="BBB" The default size declaration of R$[] is found on the fourth wrapped line, at the second column. The generator uses only symbols A through C for rules. To disable the generator, insert a linebreak on the 12th line in the 24th position (before DEF) and begin a comment at the 13th column of the fourth wrapped line, before "FOR I=0." The symbol table used is shown below. A-Z : Advance growth by one unit. Used for expansions. - : Decrease angle by 20 degrees + : Increase angle by 20 degrees > : Shift color towards green by 2 units < : Shift color towards brown by 2 units [ : Push state to the stack ] : Pop state from the stack Angle changes are a constant 20 degrees, and unit growth is controlled by the randomized variable D in LD() [L_DRAW()]. For best effects, increase the color with > a few times when beginning a branch. Posted Edited by Y_ack
  • #119 ✎ 56 brilliance360 First Week Joined in the very first week of SmileBASIC Source Website Spring 2017 Contest Participant I participated in the SmileBASIC Source Spring 2017 Contest! Programming Contest Deep Sleep Hidden Website Title: Defender How to Play: Tap enemy ships to destroy them Key: 2J7E33QJ Posted Edited by randomous
  • #120 ✎ 408 UnderCake Halloween 2017 Contest Runner Up I placed 2nd in the SmileBASIC Source Halloween 2017 Contest! Programming Contest Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength First Year My account is over 1 year old Website
    ill probably be like the last submission lol, cause it keeps changing ideas but idk now.. need something good
    No, I will be lol, I just got sick, my grandparents are here so I have no time to program with all the fun events, work, and daily chores. By the end of it all, the last of my energy is spent watching youtube and anime lmao. EDIT:(I also have been having trouble making an entry)
    yeah i really need to finish mine today lol. EDIT: lol by today i mean tomorrow at like midnight.
    Posted Edited by UnderCake
1 2 3 4 5 6 7 8 9 10 11