Author Topic: GDB vs Pic  (Read 10313 times)

0 Members and 1 Guest are viewing this topic.

Offline The VFX Wizard

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 9
  • Rating: +0/-0
    • View Profile
GDB vs Pic
« on: March 21, 2018, 09:57:30 pm »
I was wondering what the difference was between GDB and Pic as they seem to do the exact same thing and use the same hex codes. Is there a time you would use GDB over Pic? Thanks!
5 Things I hate the most: lists, irony, lists, repitition, typos, and the Oxford comma

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: GDB vs Pic
« Reply #1 on: March 22, 2018, 08:29:12 am »
They're functionally the exact same thing, it's just a matter of semantics. It's the general consensus to use Pic* for sprites and other graphical data, and GDB* for other types of data. But nothing beats using custom names with the ° symbol in terms of readability.

Offline The VFX Wizard

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 9
  • Rating: +0/-0
    • View Profile
Re: GDB vs Pic
« Reply #2 on: March 22, 2018, 09:01:28 am »
I'm sorry, I don't know what you mean by the degree symbol.
5 Things I hate the most: lists, irony, lists, repitition, typos, and the Oxford comma

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: GDB vs Pic
« Reply #3 on: March 23, 2018, 12:32:56 pm »
I'm sorry, I don't know what you mean by the degree symbol.
Search for °VAR in https://axe.eeems.ca/Commands.html
/e

Offline johnbchron

  • LV2 Member (Next: 40)
  • **
  • Posts: 33
  • Rating: +1/-0
  • RiskALungForDiving
    • View Profile
Re: GDB vs Pic
« Reply #4 on: March 23, 2018, 02:17:02 pm »
Wait a sec, so you can type:
Code: [Select]
15 -> °FOO
and it will store to foo?!?
Just a dude who is really bored in school... and a huge nerd.
Click here to give me an internet!
 <a href="http://www.freebiebitcoin.com">Earn free bitcoin</a>

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: GDB vs Pic
« Reply #5 on: March 23, 2018, 03:47:02 pm »
Yes, though that is a constant. You can make that constant a memory location and use it as a pointer, or use it just like Pic*, GDB*, and others.

Offline johnbchron

  • LV2 Member (Next: 40)
  • **
  • Posts: 33
  • Rating: +1/-0
  • RiskALungForDiving
    • View Profile
Re: GDB vs Pic
« Reply #6 on: March 23, 2018, 04:12:50 pm »
So it would make more sense to say
Code: [Select]
blah blah -> °86EC
which would put it in L1?
Just a dude who is really bored in school... and a huge nerd.
Click here to give me an internet!
 <a href="http://www.freebiebitcoin.com">Earn free bitcoin</a>

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: GDB vs Pic
« Reply #7 on: March 25, 2018, 06:40:36 pm »
The o means that what follows is the memory location not the variable. {oA}r is exactly the same as A. It lets you make custom variables.

:L5->oVariableName
:25->VariableName
:Disp VariableName>Dec

In fact, VariableName can be anything you want! It can be as long as you want and contin numbers and lowercase letters as long as it doesn't start with a lowercase letter or number. You can also make as many as you want! (There is tecnically a limit but you will never hit it) These custom named variables can be used in ANY situation you could have used an Alpha variable. Note that each one takes up two bytes so if you place one at L5 then the next one should be placed at L5+2 and so on. There is no reason not to use them. They are just as fast as Alpha variables. In fact, the only difference between a custom named variable and the Alpha variables is the space they take up in the source code.

The o can be used for data also.

:"Im a string!"->oVariableName
:Disp oVariableName

Is the exact same as

:"Im a string!"->Str1
:Disp Str1

Notice that you need the o when it points to data. The symbol means that you want to use it as a constant and not a variable just like GDB or Str. It is useful for constants also. If you need map width and height in your program but don't need them to change while it is running make them constants. That way if you need to change the dimensions of the map, all you have to do is change the one line where they are declared.

Sorry I'm a bit late to the party... :P
I'm still around... kind of.

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: GDB vs Pic
« Reply #8 on: March 26, 2018, 12:02:21 pm »
That's a good explanation of it, thanks for doing my job. :P

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: GDB vs Pic
« Reply #9 on: March 26, 2018, 07:12:58 pm »
That's a good explanation of it, thanks for doing my job. :P
Are there positions open there?  ^-^
I'm still around... kind of.