Author Topic: GAME: Optimize this! (83+BASIC)  (Read 11669 times)

0 Members and 1 Guest are viewing this topic.

Delnar_Ersike

  • Guest
GAME: Optimize this! (83+BASIC)
« Reply #75 on: September 12, 2007, 01:17:00 pm »
QuoteBegin-nitacku+12 Sep, 2007, 3:32-->
QUOTE (nitacku @ 12 Sep, 2007, 3:32)
c1-->
CODE
ec1:If W=2
:Then
:(B?51)(55-B?E
:1+15(B=51
:End
:If not(W
:2(B=53)+3(B=52)+4(B=50)+7(B=51
:If B?49
:Then
:If W=1
:4E+53-B
:If W=3
:7-B-14(B<52
:If W>3
:84-3W
:End
:Ans?D
c2
ec2

A little bit beter  

 Actually, since the code is all on one line, your optimization has no effect in the real code.

Here is what the code I posted above does. Some of you might have seen the screenshot a long time ago:
user posted image

Offline dinhotheone

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 410
  • Rating: +2/-1
    • View Profile
GAME: Optimize this! (83+BASIC)
« Reply #76 on: September 12, 2007, 02:40:00 pm »
i think he was actually just tryng to help other people optimize it by making it more readable.  

Insanity

  • Guest
GAME: Optimize this! (83+BASIC)
« Reply #77 on: September 12, 2007, 05:04:00 pm »
That looks awesome.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
GAME: Optimize this! (83+BASIC)
« Reply #78 on: September 12, 2007, 05:56:00 pm »
nice delnar :Dbiggrin.gif

Offline kalan_vod

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2715
  • Rating: +10/-0
    • View Profile
    • kalanrock.us
GAME: Optimize this! (83+BASIC)
« Reply #79 on: September 13, 2007, 03:46:00 am »
If I did not know any better I would think this was a SS thread, as it is sick! :Ptongue.gif

Making something less sophisticated sometimes help with the speed.

Delnar_Ersike

  • Guest
GAME: Optimize this! (83+BASIC)
« Reply #80 on: September 13, 2007, 03:56:00 am »
It's actually slower than in the screenshot, as I turned on power mode in PTI (by pressing the spark plug thingy).

Back on topic, can anybody actually optimize the code snippet? I know Weregoose is holding back on purpose, but is there anyone else who can read the line (other than me)?

Offline kalan_vod

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2715
  • Rating: +10/-0
    • View Profile
    • kalanrock.us
GAME: Optimize this! (83+BASIC)
« Reply #81 on: September 13, 2007, 09:08:00 am »
c1-->
CODE
ec1:(B≠51 and W=2)(55-B→E
:not(W)(1+15(B=51))+(W=2)(6-(B-49)+3(B=51)-(B=50))+(B≠49)(4E(W=1)+6-B+3W+(W=3)-14(B<52 and W=3)-10(W=1→Dc2
ec2

Kinda ran through it, but I think it would work (can be made to work if not). This would be optimized of:
c1
-->
CODE
ec1:If W=2
:(B≠51)(55-B→E
:not(W)(2(B=53)+3(B=52)+4(B=50)+7(B=51))+(W=2)(1+15(B=51))+(B≠49)((W=1)(4E+53-B)+(W=3)(7-B-14(B<52))+(W=4)(72-B)+(W=5)(75-B)+(W=6)(78-B→Dc2
ec2
I know this can be optimized more, I am not too great with long logic :Ptongue.gif.