-->
GAME: Optimize this! (83+BASIC)
-->
-->
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
-->
Home
About
Team
Rules
Stats
Status
Sitemap
Chat
Downloads
Forum
News
Our Projects
Major Community Projects
Recent Posts
Unread Posts
Replies
Tools
SourceCoder3
Other Things...
Omnimaga Radio
TI-83 Plus ASM File Unsquisher
Z80 Conversion Tools
IES TI File Editor
Free RAM areas
Comprehensive Getkeyr table
URL Shortener
Online Axe Tilemap Editor
Help
Contact Us
Change Request
Report Issue/Bug
Team
Articles
Members
View the memberlist
Search For Members
Buddies
Login
Register
Omnimaga
»
Forum
»
Calculator Community
»
TI Calculators
»
TI-BASIC
»
GAME: Optimize this! (83+BASIC)
« previous
next »
Print
Pages:
1
2
3
[
4
]
5
6
Go Down
Author
Topic: GAME: Optimize this! (83+BASIC) (Read 13539 times)
0 Members and 1 Guest are viewing this topic.
DJ Omnimaga
A Dream of Magic Everywhere
CoT Emeritus
LV15
Omnimagician (Next: --)
Posts: 55943
Rating: +3154/-232
CodeWalrus founder & retired Omnimaga founder
GAME: Optimize this! (83+BASIC)
«
Reply #45 on:
September 07, 2007, 12:05:00 am »
oh crap missed it, but i know the others people like weregoose didn't, even if they read the new rules
Logged
Delnar_Ersike
Guest
GAME: Optimize this! (83+BASIC)
«
Reply #46 on:
September 07, 2007, 04:03:00 am »
If you guys want, I can post one of my own programs and see how you can optimize it. Note, however, that it uses xLib heavily.
Logged
Radical Pi
LV9
Veteran (Next: 1337)
Posts: 1143
Rating: +5/-2
GAME: Optimize this! (83+BASIC)
«
Reply #47 on:
September 07, 2007, 10:21:00 am »
That sounds like a good challenge. xLib unreadability should be a tough obstacle to add to the contest.
I'm trying (once again) to program a Tic Tac Toe game. I could submit that for an optimization contest here, since it's not like I could submit it to ticalc
Logged
One of these days I'll get a sig I'm really proud of.
Delnar_Ersike
Guest
GAME: Optimize this! (83+BASIC)
«
Reply #48 on:
September 07, 2007, 11:30:00 am »
Alright then guys, here it is; turns it it doesn't use xLib as much as some of my other programs:
c1-->
CODE
ec1:6→dim(L5
:Text(‾1,0,0,"CHOOSE A TRAIT:
:Text(‾1,9,0,">DARE DEVIL
:Text(‾1,18,6,"CAUTIOUS
:Text(‾1,27,6,"GEAR HEAD
:Text(‾1,36,6,"PACIFIST
:Text(‾1,45,6,"BLOODTHIRSTY
:Text(‾1,54,6,"RANDOM TRAIT
:DelVar B1→A
:Repeat B=54
:0
:Repeat Ans
:real(8
:End
:Ans→B
:A→E
:A+(B=1 and A<6)-(B=4 and A>1→A
:If A≠E:Then
:For(C,9E,9A,A-E
:Text(‾1,C-1,0,"
:Text(‾1,C,0,">
:For(D,0,Z/5
:End:End:End:End
:A-(A=6)(randInt(1,5→L5(1
:prgmθSTDRKN
:real(12,6,0,0,95,62,1
:Text(‾1,0,0,"USE ARROW KEYS
:Text(‾1,9,0,"TO PUT POINTS IN
:Text(‾1,18,0,">PILOTING:
:Text(‾1,27,6,"GUNNERY:
:Text(‾1,36,6,"MERCHANT:
:Text(‾1,45,6,"ENGINEERING:
:Text(‾1,54,0,"EXTRA:
:4→dim(L2
:L5(1→A
:Fill 2,L5
:A→L5(1
:L5(2)+(A<3)-(A=3→L5(2
:L5(3)+(A=5)-not(fPart(A/2→L5(3
:L5(4)+(A=4)-(A=5→L5(4
:L5(5)+(A=3)-(A=1→L5(5
:For(A,1,4
:L5(A+1→L2(A
:End
:11→L5(6
:prgmθSTLGHT
:2→A
:While L5(6
:For(B,2,6
:Text(‾1,9B,82,L5(B
:If 10>L5(B
:Text(‾1,9B,88,"
:End
:Repeat B=3 or B=2
:Repeat Ans
:real(8
:End
:Ans→B
:A→E
:A+(B=1 and A<5)-(B=4 and A>2→A
:If A≠E:Then
:For(C,9E,9A,A-E
:Text(‾1,C-1,0,"
:Text(‾1,C,0,">
:For(D,0,Z/5
:End:End:End:End
:B=3 and L5(6)>0 and L5(A)+1≤7+L2(A-1→C
:C+L5(A→L5(A
:L5(6)-C→L5(6
:B=2 and L5(A)-1≥L2(A-1→C
:L5(A)-C→L5(A
:C+L5(6→L5(6
:End
:For(A,1,4
:Text(‾1,9A+9,82,L5(A+1
:End
:DelVar L2real(12,6,0,55,95,62,1
:Text(‾1,54,0,"CONFIRM? (Y/N)
:Repeat 5=abs(Ans-39
:real(8
:End
:If Ans=34
:Then
:DelVar L420→dim(L4
:{2,L5(1),L5(2),L5(3),L5(4),L5(5),125,100,0,2.2,5000,10→L4
:End
:DelVar L5c2
ec2
Logged
Xphoenix
Guest
GAME: Optimize this! (83+BASIC)
«
Reply #49 on:
September 07, 2007, 03:28:00 pm »
Space Trader, right? Looks fairly well optimized, but I
might
be able to do a few bytes...
Logged
Delnar_Ersike
Guest
GAME: Optimize this! (83+BASIC)
«
Reply #50 on:
September 07, 2007, 04:26:00 pm »
QuoteBegin-Xphoenix+7 Sep, 2007, 19:28-->
QUOTE
(Xphoenix @ 7 Sep, 2007, 19:28)
Space Trader, right? Looks fairly well optimized, but I
might
be able to do a few bytes...
Yup, it actually took me some time to decide which one to post, as I didn't want to give away any secrets (like the two special reputations).
EDIT: W00t, 500 posts!
Logged
DJ Omnimaga
A Dream of Magic Everywhere
CoT Emeritus
LV15
Omnimagician (Next: --)
Posts: 55943
Rating: +3154/-232
CodeWalrus founder & retired Omnimaga founder
GAME: Optimize this! (83+BASIC)
«
Reply #51 on:
September 07, 2007, 04:40:00 pm »
congrats delnar (*
DJ Omnimaga
Logged
kalan_vod
LV11
Super Veteran (Next: 3000)
Posts: 2715
Rating: +10/-0
GAME: Optimize this! (83+BASIC)
«
Reply #52 on:
September 08, 2007, 12:20:00 am »
QUOTE
:If Ans=34
:Then
:DelVar L
420→dim(L4
:{2,L5(1),L5(2),L5(3),L5(4),L5(5),125,100,0,2.2,5000,10→L4
:End
:DelVar L5
I just took a glance at this, looks fairly good. I just noticed that line, i wont point it out so you can find it
.
Logged
Delnar_Ersike
Guest
GAME: Optimize this! (83+BASIC)
«
Reply #53 on:
September 08, 2007, 06:31:00 am »
QuoteBegin-kalan_vod+8 Sep, 2007, 4:2-->
QUOTE
(kalan_vod @ 8 Sep, 2007, 4:20)
QUOTE
:If Ans=34
:Then
:DelVar L
420→dim(L4
:{2,L5(1),L5(2),L5(3),L5(4),L5(5),125,100,0,2.2,5000,10→L4
:End
:DelVar L5
I just took a glance at this, looks fairly good. I just noticed that line, i wont point it out so you can find it
.
Hehe, that is the exact line I was expecting for people to optimize.
Logged
kalan_vod
LV11
Super Veteran (Next: 3000)
Posts: 2715
Rating: +10/-0
GAME: Optimize this! (83+BASIC)
«
Reply #54 on:
September 08, 2007, 02:20:00 pm »
Making sure you realized, other than that I see a few things but I will find some time
(looking good though!).
Logged
Weregoose
Guest
GAME: Optimize this! (83+BASIC)
«
Reply #55 on:
September 09, 2007, 09:10:00 pm »
c1-->
CODE
ec1augment({2},augment(seq(L5(X),X,1,5),{125,\EE\2,0,2.2,5\EE\3,1->L4c2
ec2
Just saves 14 bytes.
Logged
Delnar_Ersike
Guest
GAME: Optimize this! (83+BASIC)
«
Reply #56 on:
September 10, 2007, 03:48:00 am »
Nice Weregoose!
How the heck could I forget about augment? :paf:
Logged
DJ Omnimaga
A Dream of Magic Everywhere
CoT Emeritus
LV15
Omnimagician (Next: --)
Posts: 55943
Rating: +3154/-232
CodeWalrus founder & retired Omnimaga founder
GAME: Optimize this! (83+BASIC)
«
Reply #57 on:
September 10, 2007, 09:35:00 am »
For some reasons I think weregoose will win this one, because i didn't found anymore possible optimizing in his last post
Logged
Weregoose
Guest
GAME: Optimize this! (83+BASIC)
«
Reply #58 on:
September 10, 2007, 11:30:00 am »
Actually, you can save 15 bytes here:
c1-->
CODE
ec1Text(-54125+1,0,0,"CHOOSE A TRAIT:
For(X,1,6
Text(-54125+1,9X,6(X≠1),sub(">DARE DEVIL CAUTIOUS
Logged
DJ Omnimaga
A Dream of Magic Everywhere
CoT Emeritus
LV15
Omnimagician (Next: --)
Posts: 55943
Rating: +3154/-232
CodeWalrus founder & retired Omnimaga founder
GAME: Optimize this! (83+BASIC)
«
Reply #59 on:
September 10, 2007, 11:45:00 am »
Logged
Print
Pages:
1
2
3
[
4
]
5
6
Go Up
« previous
next »
Omnimaga
»
Forum
»
Calculator Community
»
TI Calculators
»
TI-BASIC
»
GAME: Optimize this! (83+BASIC)
\n\t\t\t\t\t\t\t\t\t
<' + '/div>\n\t\t\t\t\t\t\t\t\t
%body%<' + '/textarea>
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
Max characters: 20000; characters remaining:
...<' + '/span><' + '/span>
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t<' + '/div>\n\t\t\t\t\t\t\t\t<' + '/div>', sTemplateSubjectEdit: '
', sTemplateBodyNormal: '%body%', sTemplateSubjectNormal: '
%subject%<' + '/a>', sTemplateTopSubject: 'Topic: %subject% (Read 13539 times)', sErrorBorderStyle: '1px solid red' }); aJumpTo[aJumpTo.length] = new JumpTo({ sContainerId: "display_jump_to", sJumpToTemplate: "
Jump to:<" + "/label> %dropdown_list%", iCurBoardId: 70, iCurBoardChildLevel: 1, sCurBoardName: "TI-BASIC", sBoardChildLevelIndicator: "==", sBoardPrefix: "=> ", sCatSeparator: "-----------------------------", sCatPrefix: "", sGoButtonLabel: "go" }); aIconLists[aIconLists.length] = new IconList({ sBackReference: "aIconLists[" + aIconLists.length + "]", sIconIdPrefix: "msg_icon_", sScriptUrl: smf_scripturl, bShowModify: true, iBoardId: 70, iTopicId: 2296, sSessionId: "ed1ef3a4a4f70788f1e47b0368081897", sSessionVar: "f2aad33e02", sLabelIconList: "Message Icon", sBoxBackground: "transparent", sBoxBackgroundHover: "#ffffff", iBoxBorderWidthHover: 1, sBoxBorderColorHover: "#adadad" , sContainerBackground: "#ffffff", sContainerBorder: "1px solid #adadad", sItemBorder: "1px solid #ffffff", sItemBorderHover: "1px dotted gray", sItemBackground: "transparent", sItemBackgroundHover: "#e0e0f0" }); } function tick2() { if (typeof(document.forms.quickModForm) != "undefined") { calcCharLeft2(); setTimeout("tick2()", 1000); } else setTimeout("tick2()", 800); } function message_onkeyup() { if (typeof(document.forms.quickModForm) != "undefined" && typeof(document.forms.quickModForm.message) != "undefined") { document.forms.quickModForm.message.onkeyup = function onkeyup(event) { storeCaret(this); calcCharLeft2(); }; } else setTimeout("message_onkeyup()", 800); } message_onkeyup(); function calcCharLeft2() { var maxLength = 20000; var oldEditor = "", currentEditor = document.forms.quickModForm.message.value; if (!document.getElementById("editorLeft2")) return; if (oldEditor != currentEditor) { oldEditor = currentEditor; if (currentEditor.replace(/\r/, "").length > maxLength) document.forms.quickModForm.message.value = currentEditor.replace(/\r/, "").substring(0, maxLength); currentEditor = document.forms.quickModForm.message.value.replace(/\r/, ""); } setInnerHTML(document.getElementById("editorLeft2"), maxLength - currentEditor.length); } // ]]>-->