GeorgeZaharia's Forum Posts

  • this might help your case tracking your users with ajax-php-mysql

    ajax-php-mysql should do the trick then is a matter of updating / making the order complete or in progress by altering the table entries

    the tutorial covers most of the aspects +- some

  • Haha, im just glad you learned something, sure you can use any code inside my examples however you want.

    > You need to use the values to adjust the sprite object position that will move around in a circle.

    >

    > here is my orbit example | test it live

    Thanks bro, that is really good and works so well.

    However if i try to add any drag and drop behaviour or touch, the moon just stops.?

    yea that is cause it needs a everytick condition to change the A and update the position.

    for position on moon that needs some more adjustments probably more than a couple :D

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You need to use the values to adjust the sprite object position that will move around in a circle.

    here is my orbit example | test it live

  • lol ... i wish .... nah im really bad at math ... but some of the expressions we use in Construct i use them very often so i sort of understanding them in my own way.

    Anyway the above examples should help you understand the elliptical motion, whenever u want a circle movement u use cos() for X and sin() for Y.

  • Yes it could solve it if the platforms were static but the core concept of my game is to create platforms at the player position so the platforms could be anywhere. So reducing the power fixs the issue just for this case but it's possible that a platform will be a little lower.

    you lost me there, i can't understand what your trying to achieve without seeing it.

    but if u have a position at which u spawn the platforms u then calculate the distance from bottom margin of the 1st platform to the position of the 2nd block or 3rd block topmargin u spawning and set the distance to the players power jump. you will also have to adjust the gravity/fall speed and all those little values to match and react properly.

    since u using 32 pixels by 32 pixels blocks u can also set the power jump to whatever is in front of the player so if u have 2 blocks u can set jump strength to 32 * N number of blocks stacked on top of each other in front of player at a distance of 100 pixels or less lets say.

    edited: example updated pick objects that are closer than 64 pixels distance and alter player jump based on it... isn't perfect but somewhere around there.

    it might not be what ur looking for but atleast will give u an idea.

  • u have to also reduce the power of the jump to 450 sorry i edited the above reply to late. the issue is the jump takes in account the speed ur running at the faster u run the higher u jump like in real life...

  • change is W down to W was pressed. that fixes it on my end. and reduce the power jump to 450 instead of 460.

  • try this tutorial Ellpitical Orbit its a old c2 tutorial but for sure will work on your end.

    basically is using Cos() and sin()

    and this is the 2nd circular/eliptical motion one but might be a bit complicated. cause it has to many variables.

    but to rotate a object around a point u basically calculate it like this

    position x centerX + cos( A*B ) * circumferenceX

    position y centerY + sin( A*B ) * circumferenceY

    centerX and centerY are like for example the position of a planet you want a moon to spin around it.

    curcumferenceX and circumferenceY will make the circular motion change around a 3d plane of sorts(it moves in a 2d plane but altering live the values of A*B and circumferenceX or Y it will make it look like is a 3d sphere - very similar to the 2nd tutorial i linked). if u make circumeferenceY less than circumferenceX ul see it go on a smaller Y motion while keeping same X width motion.

    cos(A*B) and sin(A*B) calculates moons position relative to the position of the planet in degrees * circumferenceX or Y (not sure if i explained it the right way but that's how i understand it).

  • ok, try replicate your exact jumping system you have issues with it now, no need for other events(that is if other events are not movement based, if they are movement based please include those also in the same order/values).

    and will take a look at it.

  • every 1 seconds add to variableScore 1

    txtScore set text to "Score: " & variableScore

  • this topic here might help you with the time display from seconds to hours days etc and formating display seconds to minutes to

    and then just increment the number in that topics every 1 seconds or 5 seconds. etc... like u did in the above file.

  • i updated the file above redownload the file from the same link or press here

    if u want to subtract u just enable the 1st group and disable the 2nd one, then change daytime global variable to you target reset.

  • i just tested it out with the default settings of platformer, it acts the same if i move.

    it's probably ur acceleration being higher than the deceleration make sure they are equal.(that is why i asked for a screenshot or setting values from your project, it might be some settings are not properly set)

    however u can override the default settings by gapping sort of speak the max jump to a surtain value by changing the player.Platform.VectorY

    and say in ur conditions on jump or up arrow/w key pressed player set Self.Platform.VectorY-(your value)

    default jump strength is 650 (that is not taken in account the moment u use the above custom vector.y) if you want to lower it just change -(your value) to desired strength.

    u might also want to disable the default controls and create custom ones by events like i explained above.

    if it's not fixing the issue, it's probably some event in ur project that interferes with acceleration / deceleration /gravity / game time scale.

    if u want to revert the settings of platformer behavior without removing the behavior and you can't remember what it was by default here are the values

  • Here you go made u a quick example. Also added some comments inside hope it makes sense to you.

    seconds to minutes to C2/C3

    see also old construct classic thread explaining this seconds to minutes to and stackoverflow seconds to minutes to to better understand how it works.

    I didn't use a function, but i used some variables and the calculation of how seconds are converted to minutes to hours and days etc... if u need weeks u just do weeks=floor( number / 604,800) if u need months that is a tricky one cause months aren't the same all year. but to get an average 28 days a month u just do month = floor(number /2,419,200)

    Have fun, and hope it's what you're looking for.

  • depends on how you setup the jump action. we need to see those events for jumping and how the platformer/jumping behavior is setup.

    in theory u could set a variable max-jump and set the vertical Y motion to it once it passes a surtain amount, it can also be that it pushes u higher cause of the inertia or sustain jump(the platform setting that pushes u higher the more u keep the jump button down) setting from the platformer if that is still a feature.