What do tables do?

Saw tables up in the corner and wanted to know what they do with their columns and rows.

Comments

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273

    You can think of each row and column as an attribute, because that's what they are. Tables are extremely poweful. They can be searched, organized and more. I use tables in almost each project. You can look up video tutorials on gshelper.com.

  • AlchimiaStudiosAlchimiaStudios Member Posts: 1,069

    They are generally used to store large amounts of data in an orginized manner. This is great for save systems, positioning systems, and more. It lets you put and remove values in to rows and columns both in real time or before hand, or make copies/delete information.

    Do a search for gamesalad tables, i'm sure some videos exist that can give you a nice idea of how to use them within the engine.

  • SLOCM3ZSLOCM3Z Member Posts: 797

    So it's good for adding coins or changing certain attributes?

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273

    @jdlcrater said:
    So it's good for adding coins or changing certain attributes?

    It depends. I'd say yes, just because I like working with tables more than I like working with game attributes.

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    This should help. Tables are static variables.

  • SLOCM3ZSLOCM3Z Member Posts: 797
    edited December 2014

    Could you explain how YOU use them? I would try to make my ammo reduce or health go down. Is that how you would use them?

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    Watch the video I posted on tables above.

  • AlchimiaStudiosAlchimiaStudios Member Posts: 1,069
    edited December 2014

    Just as an example:

    I use them for save systems in every project. So any variable needing to be written to disk gets put in a table.

    Lets say col 1 is weapons, and is of the variable type boolean and i have 16 weapons in my game, so 16 rows.

    We then have col 1 row 1 = weapon type 1, col 1, row 2 = weapon type 2, etc, etc. Rather then make 16 booleans attributes to determine if the weapons has been awarded, I can see them all in one table.

    If I want to save the table I just use the save table behavior and now it's written it to disk in one go.

  • SLOCM3ZSLOCM3Z Member Posts: 797

    THANKYOU!!!

  • SLOCM3ZSLOCM3Z Member Posts: 797

    :D

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    Tables are just static variables that are outside the normal code scan. It's that simple. You access that data by addressing the column and row of the table instead of game.whatever.

  • SLOCM3ZSLOCM3Z Member Posts: 797

    The tables are awsome :wink: Thanks a bunch

Sign In or Register to comment.