randomly's Recent Forum Activity

  • Hey everyone,

    I'm currently testing my C2 knowledge by creating a Sudoku Solver.

    I'm pretty far already, everything's coded basically. At least that's what I think.

    Because at the very moment, it doesn't work. I have the feeling there are some (maybe many) small, but important bugs or flaws in my program.

    If anyone could help me with the debugging, I'd be very very thankful.

    A warning though:

    The whole .capx will be needed to debug the program.

    It contains 49 events right now, some basic and some more advanced stuff.

    I just want you to know that this probably won't be a thing of five minutes and I ask you to help me because I'm not able to find the bugs.

    If you want to help me, PM me and I'll happily send you my .capx, all commented.

    And know that if you want to help me, I will be so, so, so thankful.

    Cheers.

  • Animations should always be client-sided.

    Depending on what animations you use, send animation-specific info to clients, like "start animation X".

    The client will then, on receiving such string, interpret this and do the appropriate animation.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • IJCT

    Except if your Sprites aren't big enough and your Parallax effect is too strong, you need to restrict the scrolling to not reveal parts of the layout where the Sprites aren't visible anymore.

  • Take a look at this demo: http://nfk.kissr.com

    Is that what you are aiming for?

    This is the source code .capx:

    https://www.dropbox.com/s/cd9v6imdn1sb7 ... .capx?dl=1

  • Actually, a isn't 0 since it gets the value from the Function param.

    But I figured out what the issue was. Very specific one.

    In case you are interested what the problem was (if not, just skip) :

    That algorithm is part of a translation of the contents of 9 by 9 TextBoxes into an Array.
    I wanted to keep the optical order of the TextBox contents and translate them logically into the Array.
    
    In order to do so, I had to translate the IID's to X and Y coordinates in my Array.
    The thing that was causing the freeze was me forgetting to filter the TextBoxes which are empty (value 0), so the algorithm doesn't get applied to them. (And doesn't get freezed in the process)
    
    So what I added was a simple picking condition and that was it. Phew.[/code:10ryr9r8]
    [img="http://i.imgur.com/ZQAWElC.png"]
    
    Anyways, thank you very much for telling me that my implementation of the Algorithms was correct, so I didn't bother around with fixing that but could instead focus on the important stuff.
  • Hey everyone,

    I'm a bit ashamed.

    Tried to port the Euclidian algorithm (to calculate the greatest common divisor) to C2.

    I'm failing on the "While" condition since the program freezes as soon as I call the function.

    Apparently, I don't seem to really understand or use the "While" condition appropriately.

    This is the Euclidian algorithm according to Wikipedia:

    Pretty simple, huh? One would think, that's easily implementable.

    This ismy current setup:

    This causes a freeze for some reason.

    Notes: each time the function is called, b is supposed to stay the same (9) and a is variable.

    (And yes, I know that I could compress the code, but for overview's sake, I kept it like that)

    Any ideas how I should use the "While" condition correctly and why it causes a freeze in its current state?

  • Still appreciate your efforts, thank you. :)

  • You have to have the following layout:

    Get item "HighScore" [action]
    On item get "HighScore" [event]
       -> Set HighScore to LocalStorage.ItemValue [action][/code:31xgsjjm]
  • korbaach

    Are you Jesus?

    That is brilliant and exactly what I need.

    Obviously, I didn't see that I need to divide the distance by 2...(any easy-to-understand explanation for that to make a math noob understand what he is implementing in his project?)

    And I forgot about the "distance" expression.

    Thank you very much, this thread is SOLVED!

    (Also, thank you very much for your posts. )

  • Just to clarify this: as soon as the dragging starts, the angle of the cue stays constant.

  • Good to know, thought it was spelled differently <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    Your solution seems pretty obvious.

    Though how should I calculate the variable of the distance containing both X and Y coordinates?

    Maybe, I wasn't clear enough:

    I don't want the cue to follow the mouse. Assuming the cue is at angle 0 for example, in that case I would want it to just follow the x movement of the mouse.

    If the cue was at 90 degrees, just the Y movement.

    And at 45 degrees for example, a combination of X and Y.

    This combination is what bugs me.

    Since I'm no native English speaker, my intentions may not seem too obvious. <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    Maybe this is easier to understand:

    When the mouse button is down, I want the cue to follow the mouse, but at the same time, the cue should be restricted to only move on a line having the current cue's angle.

    (As if it had the drag and drop behaviour and there were walls parallel to the cue)

    Could also be possible that I misunderstood your solution.

    I uploaded my .capx here: https://www.dropbox.com/s/aemopym3697i7 ... .capx?dl=1

    Maybe you can just download it, edit it and upload the working result so that I can understand your solution. <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    (all the disabled events are what I tried to geet it to work)

  • Uh, that'd be sad, I'd really appreciate an upvoting system in the forum...

randomly's avatar

randomly

Member since 26 Sep, 2016

Twitter
randomly has 1 followers

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies