Author Topic: [83+ BASIC]Here's why Kalan's better coder than me  (Read 14414 times)

0 Members and 1 Guest are viewing this topic.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
[83+ BASIC]Here's why Kalan's better coder than me
« on: July 07, 2006, 01:28:00 pm »
hmm okay dysfunction was always wondering why map loading took so long in Diortem and Metroid II (between 1 and 4 seconds), well before you continue reading, I must warn you: the code below may be offensive to BASIC programmers, because there is so many things that are done at map loading that after a while the code went so messy that it now reminds me my old days of Illusiat (without the Lbl/gotos)  O_Oshocked2.gif:knight:knight3.gif and I got headache reading it. Btw this is one of the reason why Diortem died the first time, I gave up on this code. Now i rewriten most of it before finishing metriod but still... I was wondering if there would be some stuff that could be made more optimized in this mess >.
c1-->
CODE
ec10→PMT
If A≤1:Then:7→A:

Offline kalan_vod

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2715
  • Rating: +10/-0
    • View Profile
    • kalanrock.us
[83+ BASIC]Here's why Kalan's better coder than me
« Reply #1 on: July 07, 2006, 06:40:00 pm »
o.oblink.gif


Yeah I see a few things to work on, it will improve speed and size some what. I assume the

Offline Spellshaper

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1690
  • Rating: +0/-0
  • This is me. Or maybe not.
    • View Profile
[83+ BASIC]Here's why Kalan's better coder than me
« Reply #2 on: July 07, 2006, 11:34:00 pm »
QuoteBegin-xlibman+Jul 8 2006, 02:28 AM-->
QUOTE (xlibman @ Jul 8 2006, 02:28 AM)
c1-->
CODE
ec1
...

If [A](1,1)≠36 and
« Last Edit: March 24, 2014, 02:07:55 pm by Eeems »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
[83+ BASIC]Here's why Kalan's better coder than me
« Reply #3 on: July 08, 2006, 06:34:00 am »
hmm interesting, I should try this to see if it works, lot smaller

Offline kalan_vod

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2715
  • Rating: +10/-0
    • View Profile
    • kalanrock.us
[83+ BASIC]Here's why Kalan's better coder than me
« Reply #4 on: July 08, 2006, 06:38:00 am »
What exactly can

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
[83+ BASIC]Here's why Kalan's better coder than me
« Reply #5 on: July 08, 2006, 06:49:00 am »
the big N in the finance app, its the map ID

Offline kalan_vod

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2715
  • Rating: +10/-0
    • View Profile
    • kalanrock.us
[83+ BASIC]Here's why Kalan's better coder than me
« Reply #6 on: July 08, 2006, 07:15:00 am »
I figured that, as graphlink changed it to it :Ptongue.gif.

Demon

  • Guest
[83+ BASIC]Here's why Kalan's better coder than me
« Reply #7 on: July 08, 2006, 08:46:00 am »
QUOTE
the code below may be offensive to BASIC programmers....I got headache reading it.


It's not offensive but it confused the heck out of me - I just looked at the first few lines and my brain went:
QuoteBegin
-->
QUOTE
ERR:OVERFLOW
1: QUIT
2: GOTO

But I never knew you could use those FINANCE vars as... er, well, vars...
:knight:knight3.gif

*pyro_xp2k

Offline Speler

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 857
  • Rating: +6/-2
    • View Profile
[83+ BASIC]Here's why Kalan's better coder than me
« Reply #8 on: July 08, 2006, 09:07:00 am »
QUOTE
But I never knew you could use those FINANCE vars as... er, well, vars...

Well, you can and not only that but Finance Vars are not only faster then normal Vars but faster then Ans as well, which is the reason I use them in anything that needs to have an ubsurly high screen refresh rate.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
[83+ BASIC]Here's why Kalan's better coder than me
« Reply #9 on: July 08, 2006, 09:31:00 am »
o.oblink.gif that I didnt knew O_Oshocked2.gif

ok I guess I'll try to use those instead of A and B for character moving then if i make a new game :Ptongue.gif

Offline kalan_vod

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2715
  • Rating: +10/-0
    • View Profile
    • kalanrock.us
[83+ BASIC]Here's why Kalan's better coder than me
« Reply #10 on: July 08, 2006, 09:33:00 pm »
Well they can't be deleted like with A-theta and they take up one extra byte I believe.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
[83+ BASIC]Here's why Kalan's better coder than me
« Reply #11 on: July 09, 2006, 01:26:00 am »
you mean, token wise? (as some tokens takes 2 bytes instead of 1)

Offline kalan_vod

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2715
  • Rating: +10/-0
    • View Profile
    • kalanrock.us
[83+ BASIC]Here's why Kalan's better coder than me
« Reply #12 on: July 09, 2006, 07:57:00 am »
QuoteBegin-xlibman+Jul 9 2006, 07:26 AM-->
QUOTE (xlibman @ Jul 9 2006, 07:26 AM)
you mean, token wise? (as some tokens takes 2 bytes instead of 1)  

 Finance vars.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
[83+ BASIC]Here's why Kalan's better coder than me
« Reply #13 on: July 09, 2006, 10:09:00 am »
yeah I know you are talking about those, but when pasting for example "PMT" in a program does it takes 2 bytes instead of 1? Like lowercase letters? Also technically we cant even delete a finance var, as it will be set back to 0 so it will always take space

Offline Speler

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 857
  • Rating: +6/-2
    • View Profile
[83+ BASIC]Here's why Kalan's better coder than me
« Reply #14 on: July 09, 2006, 10:41:00 am »
QUOTE
yeah I know you are talking about those, but when pasting for example "PMT" in a program does it takes 2 bytes instead of 1? Like lowercase letters? Also technically we cant even delete a finance var, as it will be set back to 0 so it will always take space

Lets go over the advantages and disadvantages.

Advantages:
-Fastest

Disadvantages:
-Can't use with DeleteVar or for(
-2 bytes rather then one.

So I will say this:  it is not always the best choice of variable, but is a nice thing to know that it can be used if needed.