How do I store a list of objects for "Connect the Dots" ?

0 favourites
  • 5 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • I am working at a "Connect the Dots" game. This is how the gameplay works. After the user completes a drawing, an object (sprite) appears, fades away and after that a new set of dots is loaded.

    What is the best/recommended method to store a list for the dots of more objects ?

    I will store the following information for each object:

    • object's name
    • number of dots
    • dot's coordinates (X,Y for each dot)
    • sprite/animation's name
    • sprite's size (width and height)
    • continuation ("no" if the drawing has only one layer /// "object_name" if the object has more layers (example: 1st layer to draw is the Sun and the 2nd layer is Sun's glasses))
  • Games

    Thanks, I've thought of Arrays, but will result in some big Arrays. Also I would like to be able to modify the file easily (like an Excel document)

    Any ideas ?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • An 2D array is like an excel document. It is like a rectangle of information. They can be modified easily with the "for each element" condition, for example. You can write a function and let this function store all the information you mentioned in the array.

  • An 2D array is like an excel document. It is like a rectangle of information. They can be modified easily with the "for each element" condition, for example. You can write a function and let this function store all the information you mentioned in the array.

    Thanks, but I know how Arrays work in C2, and it doesn't really help me ... I need a way to edit/store Arrays like an Excel document ... or load the data from an Excel document (or something similar) into an Array.

    I am talking about preset values for objects. Let's say that an object has max 10 points/dots, then I will have:

    object's name - 1 cell

    number of dots - 1 cell

    dot's coordinates - 20 cells

    sprite/animation's name - 1 cell

    sprite's size - 2 cells

    continuation - 1 cell

    I will need 26 cells only for an object. My game will have at least 30 different objects. That means the Array will be 2D and at least 26x30 (or 30x26), results 780 cells. I need a good way to organize my preset values.

    Yes, I will use Arrays in my game, but only to load 1 object at time.

    So the question remains: How can I store and load data into Arrays in most efficient way for my "Connect the Dots" game ?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)