dupuqub's Recent Forum Activity

  • And I forgot to mention in the last comment (but won't edit it, because sometimes I have to reupload the images) is that by those definitions you can clearly see how a big enough matrix could solve also the QBR movements. Cheers.

  • This is not terribly complex, but there are some quirks you must be aware.

    First of all there are 2 (or 1, depending on the perspective) types of moves in chess:

    1. Queens, Bishops and Rooks move in "infinite" straight lines.

    2. Pawns, Kings and Knights have cell-dependent movement.

    I will explain further down how Qs, Bs and Rs can actually move like Ps, Ks and Ns, but for now imagine they are different.

    In a simple matrix system the QBR movement is pretty obvious, you test diagonals and/or horizontals until you cannot move further and display the possible moves to the player, but PKN movement can be a little tricky, and this is how I implement it.

    The A is the actor and the dots around are the cells of the board.

    The case above represents for example how a knight moves. You can clearly see the radial symmetry happening. You can simplify the symmetry notation so it's easier to read and write like below.

    In the image above you can see how we just have to flip the matrix to get the other side, and you can do it again, this time mirroring.

    There is a last mirror we can do in 45 degrees and then you'll have the primordial move matrix.

    Now that you can know you can get the full movement from just this simple matrix, and you can give out addresses to each cell like below.

    In this notation the PKN moves would look like this: "knight: [3]", "king: [0, 1]" and "pawn: [0, 1, 2]". In the pawn case, the 1 and 2 would be conditional, but you can check for yourself any special or situational needs your pieces may have.

    You can also expand this matrix to whichever number you want as long as you want radial symmetry. Any time you do NOT want radial symmetry you have to unfold the matrix to address your needs.

    This is just a general idea that helps to visualize the movements, but I hope it helps. Feel free to continue this thread if you have any questions about it.

  • First thing is adding the file and double-clicking it. You'll open the text editor.

    JSON are very specific about how you write them. There can never be commas in the last statement in a section, and every variable must be inside double quotes, as you can see below:

    Then you can load the file into an object. You can then read and write to the object, like below.

    The resulting text from this experiment would be like below:

    These are all basic tips for you to get started, but feel free to continue this thread if you have any more doubts on the subject.

    Hope it helps.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is a JSON file. For it work you must have 3 things.

    1. 1 JSON file.
    2. 1 JSON object to contain the JSON file after you load it.
    3. The AJAX object to load the JSON file and put it in the JSON object.

    EDIT: After the load, you'll interact with the JSON object. Consider the JSON file an initial state of what you need. Also, you can work with only the JSON object from the start and never use a JSON file or the AJAX object, you just add the data you need from event sheets, but then you won't be able to use the editor like in the picture.

    You can check out how on the official C3 tutorials.

  • You do not have permission to view this post

  • I don't have the skills to really give any input on this, I'm essentially an UI developer, but what eleanor said about dynamically creating shell objects with the exact amount of information you need them to have sounds amazing, mainly through the argument of demanding less instance checking, like the wall slide she mentioned.

    I'm still reading through the posts again and trying to understand everything, but just wanted to show some support.

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

dupuqub's avatar

dupuqub

Member since 4 Aug, 2019

Twitter
dupuqub has 1 followers

Trophy Case

  • 5-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

10/44
How to earn trophies