j0schi's Forum Posts

  • sure its possible, here are the steps i would do:

    sql table

    ID|plaeruniqueid|name|score|

    phpapi

    • requests scores
    • submit scores

    html5game

    • generates a unique id (for example a big random value) and saves it in local storrage at the first start
    • makes a ajax request to submit thi highscore (maybe automatically) api
    • makes a ajaxrequest to get the highscore to the php api

    I am sure there is an example somewhere. Look arround a little. also you can modify the login examples to your need and replace the login with the unique id.

    this way is not very secure but it will suit your needs.

    you could work with encryption to make it a little more secure (generation and transfer)

    kind regards

  • hi set looped to yes.

    see screenshot: http://gyazo.com/4720564825ce577b9aeea45042736cc8

  • so you are making a platformer? again there are several solutions for this.

    one way would be to compare the x coordinate of the player with the x coordinate of the enemy and then set a animation frame according to it. you can also work with the "flipped" action

    i think i cant be of much more help here maybe a professional can tell us the most efficent solution?

  • in generall more layouts should have better performance... the less objects are in use the better the performance is. also group your conditions and actions and disable the group if you dont need it.

    regards

  • one solution could be:

    you loop the spinning animation (set loop to yes)

    you add a object variable "jumping" set it to 1

    is on floor set objectvariable to 0

    platform is falling AND objectvariable jumping = 0 then play animation falling

    hope that helps

    regards

  • i dont think this is perfectly possible or even usefull as all objects check for collission and collide with each other... i think i cant be of much help here, as i dont get the use of it <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">

    some approach:

    https://drive.kyberon.net/index.php/s/1FPhBAiihCmSqnJ pw: test

    sorry i couldnt be of more help here, but i would suggest to approach this from another direction

    regards

    Patrick

  • regarding the 2nd suggestiion you can also work with distance traveled (set the starting xy for each ball and calculate the distance to the current position) or with the proportion of that to the distance to the rhomb its just math XD can you provide a capx?

  • thats perfectly right VIKINGS especially as HTML is still pretty recource hungry danul777 i suggest you read https://www.scirra.com/manual/134/performance-tips

    regards

    Patrick

  • You could add another condition to Set animation to "jumpfromstand"

    -> http://gyazo.com/f5549fd9119c509df23e178b18eb1db3 jumpfromrun is NOT playing

    Regards

    Patrick

  • Object set angle towards object x y

    Example: http://gyazo.com/49ca7fb27ba42d704e25254e9a73a682

  • hi

    for your first question: work with room names.

    Join room USER INPUT ROOM NAME for game GAMENAME instance INSTANCENAME[/code:22bqwroc]
    
    so the game name and instance name must be the same for every player. but instead of a given room name the player can input the room name itself. when two players enter the same roomname they end up in the same room given, the room isent full
    
    regards
  • Try Construct 3

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

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

    you have to capture the start datetime of a timer and save it with LocalStorrage.

    then you have to compare the start datetime with the actual date.

    you can do this in different ways. one way would be to make a ajaxrequest to a php file, which returns the current date (pretty easy)

    another way would be to use https://www.scirra.com/tutorials/940/ho ... -a-project

    i personally would use the php and work directly with unix time stamp.

    kind regards

    Patrick

  • for a 2d engine that are plenty of resources to use... also it seems to be pretty strong, more than most casual players will have... keep that in mind

  • i am not entirely sure but i think pin would not work here, as the rhomb does not move...

    my approach would be to set the oject scale of the balls and move them closer to the center...

    something like

    each x seconds  balls set scale to balls.scale -0.05
                    balls move 1px at angle angle(balls.x,balls.y,rhomb.x,rhomb.y) [/code:m11rrn8f]
    
    but thats when the balls are not in motion... you can also try to use a force on the balls directing to the center of the rhomb and as closer they get the lower is the scale 
    [code:m11rrn8f]balls set scale to distance(balls.x,balls.y,rhomb.x,rhomb.y)/100[/code:m11rrn8f]
    
    hope that helps
    kind regards 
    Patrick
  • Hi Folks,

    I use the following simple formular to calculate the absolute positon of a touch relative to the size of the canvas window:

    Touch.AbsoluteX/(WindowWidth/1280)[/code:8fkdz5tq]
    screenshot: [url=http://gyazo.com/55bf28b8fceb6c3767333e788df5e85d]http://gyazo.com/55bf28b8fceb6c3767333e788df5e85d[/url]
    (my project is 1280 px width)
    
    which works like a charm on my desktop in every possible window size! 
    
    the problem is it does not work on mobile! for example if i test on my z1 compact (which has a 1280px width screen) the most right position is displayed with 640. which is exact halv.  but the formular should return 1280/(1280/1280) = 1280!
    i am helpless here <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad"> ive get similar results if i test on my s2... but on desktops i can resize windows as i want, everything gets calculated fine with every windowsize...
    
    Kind Regards 
    Patrick