MSX Basic / QBASIC etc - DATA clause?

Discussion in 'Game Development General Discussion' started by Trenton_net, Jul 20, 2010.

  1. Trenton_net

    Trenton_net AKA SUPERCOM32

    Joined:
    Apr 13, 2007
    Messages:
    2,255
    Likes Received:
    22
    Location:
    Canada
    Hi Everyone,

    In MSX Basic, QBASIC, or any kind of basic derivative, I noted a lot of the sample games/programs include these massive "DATA" sections. As an example:

    2790 DATA0F700F700F7007700770074003400000,FE70DA70DA40DA70DA40FC40FC40F840
    2800 DATA3C617E6106F606F60F6803687E803C80,04140414041500112014201420150011
    2810 DATA3C747E74C37F817F817F817F7EF53C71,99F499F41EFA7EA13C647EF40CFA0CFA

    Or something that looks like that. Does anyone understand what this is, how to use it, and what the purpose is?
     
    #1
  2. Calpis

    Calpis Champion of the Forum

    Joined:
    Mar 13, 2004
    Messages:
    5,907
    Likes Received:
    17
    Location:
    .ma.us
  3. Trenton_net

    Trenton_net AKA SUPERCOM32

    Joined:
    Apr 13, 2007
    Messages:
    2,255
    Likes Received:
    22
    Location:
    Canada
    Ah ha! Thanks.
     
    #3
  4. ttn

    ttn Newly Registered

    Joined:
    Oct 3, 2010
    Messages:
    1
    Likes Received:
    0
    Was that a satisfying answer to you?

    The DATA-section is where you store information inside your code instead of storing it into individual files. The data may be anything from graphical elements (sprites, levels) to music/sound fx to pre-calculated mathematical data to speed up calculations to 3D-coordinates and textures.

    When you only have tiny amounts of data you can store it like that directly into arrays instead of having to load files.
     
    #4

Share This Page