xoros's Forum Posts

  • Hello Guys,

    just wanted to share with you this great paper on procedural sokoban level generation, which of course could be used to generate rooms for another game genres:

    larc.unt.edu/ian/pubs/GAMEON-NA_METH_03.pdf

    I'm going to implement it with C2.

  • But anyways, something has to be done with this, because if your game is heavily based on arrays calculations, it's inevitable, that you stumble upon this issues.

    Custom out of boundaries value is the best solution.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, that's true. Custom out of boundaries value is a good solution.

  • Because 0 is a value, which could be present in the game in some way e.g. UID. Logically, if I check the value at the position which is out of bounds, the value doesn't exist. So may be it would be even beter to return NaN.

    It's not a big deal to limit a loop to the bounds of the array, but anyways it would save time.

  • Hello there,

    right now, if you check an array at the position, which is out of bounds, you'll get 0, which is totally inconvinient and error prone. E.g. array.width=7, you check at array.x=10 and it returns 0. It would be much better if in this case it will retur a -1 or NaN.

    What do you think?

  • Yes, so far everything works.

  • Hello fellas,

    I'm trying to figure out what is the most efficient way of "looping" through data in C2. I'd better explain, what I mean with an example:

    I made a convay's game of life with like 40x40 grid. First I looped through all the inatances and compared them with for each "instance" loop - it was slow as hell. Than I saved instance data in the array and looped through the array, which was a way faster, but still sort of slow.

    I also noticed FPS rate drops during large nested loops ca. 1000 iterations.

    What are the best practices to loop through data in C2?

  • No plugins. I tried to export an empty project and got this error.

  • Hello there,

    I'm getting this error mesage in the console all the time, even in template projects:

    GET localhost/jquery.min.map 404 (Not found)

    As far as I understand, jquery was removed? Are there any consequences?

  • Yes, the string will do the job.

  • Hello there,

    It would be very usefull to be able to return multiple values in a function and adress them with indexes like parameters.

    What do you think?

  • Ok, I thought it would be possible to check the whole string at once, but I had to do it for each pair - it works like this.

  • Ah, this will only work if both strings are exactly the same or pairs have the same order. I think may be Regex could help, but the biggest problem here is the order of pairs, the search should be unordered.

  • Hello there,

    I would explain it with the examle:

    The game needs a pattern matching algorithm. E.g. there's a list of all possible patterns as 2d array coordintates (as string):

    Here's one possible pattern:

    0,1 0,2 0,3 1,1 1,2 1,3

    Than I have a set of 2d array coordinates, that I would like to check if it contains a pattern from the list (the string above):

    5,4 0,0 0,1 0,2 0,3 0,4 1,1 1,2 1,3

    How to check if the 2nd string contains all the pairs from the first string, despite of order of pairs?

  • Hello fellas,

    here's just a feature suggestion: similar to photoshop you can make a history snapshot (sort of intermediate save), so that you can revert to it by clicking on a snapshot icon. You can create multiple snapshots in one project. It's sort of undo to the specific point. I think it's just comfort feature, but it would be nice to have.