franmcod's Forum Posts

  • I've always wonderes by we are limited to number and string variable types. Having objects or arrays would be so amazing. This is a serious limitation to the engine in my opinion.

    This rant is because i would to have "something" in C2 that would allow me to do this structure:

    {

    "training": {

    fishes: ["-1", "1", "2", "3"]

    },

    "Island": {

    fishes: ["-1", "4", "5", "7"]

    },

    }

    That json file would be retrieved with Ajax.

    How could i do this? using XML

    <zones>

    <training>

    <fish>-1</fish>

    <fish>1</fish>

    ...

    Thanks in advance

    [EDIT]:

    using the xml ideia, i managed to get the fishes for a specific zone seprated by a , doing this:

    RegexReplace(

    trim(

    RegexReplace(

    zones.StringValue("/Zones/Training"),

    "(<.+>)(.+)(<\/.+>)",

    "ig",

    "$2,"

    )

    ),

    "\s+",

    "g",

    ","

    )

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm doing a online game(not real time), and decided to use websockets to do the communication between the client and the sever (nodejs).

    Besides using wss over ws, how do i handle security? what can i do to authenticate a message over the channel?

    i've read about using access_tokens, but i can't set cookies or headers in construct so i'd have to pass it along side the actual data right? websocket.send([token]|[data])

    So when the client connects to the server, the server responds with the token so the client can send it on the next messages.

    But someone listenning to these messages, can just grab the token and use it for them selfs no?

    Anyone has any hints, tips, articles i could check?

    Thanks in advance

  • time to change to unity

  • hey! game is kinda broken, but how did u do this mechanic?

  • Have u made any progress?

  • ok awsome! let me know if u make progresses plz

  • nono, its just a ghost, it copies everything the player does, if the player is moving left, the ghosts move left, if the player jumps at X,Y, the ghosts jump at the same X,Y, basicly a delayed shadow, i'm trying to make this mechanic, youtube.com/watch

  • it has the same problems as mine, if i had platforms, in different y levels, it starts to mess up

  • the ideia is that yes, but doesn't work properly xD but thank you sir

  • Both the player and the ghost are at the same speed, acceleration is very high, so that they reach max speed almost instantly. Yeah i mean i tried with the wait, because i did not know how to do it.

    I mean i could save the position where the player jumps in a list in each ghost, but instance variables can only be numbers,text or bools(i would live to have more than 1 ghost) but still, no ideia how to do this in C2, outside of C2 yeah sure, but here....

    I tought of the wait, because (i can't add images but i'll hammer it) ok so speed = d / t

    G = ghost P = player

    |-------|

    G---- --P if the player jumps here, knowing the distance beetween both, and the speed of the G, i know how long he takes to make that distance right? so waiting that time and then jump, maybe i'm wrong. I know when i call the function, the player and the ghost keep moving, that's why i tried to save the position of both

  • Hey, i've been having some problems with this, basically i have 1 player, and 1 or more "ghosts", and these ghosts replicate the player's movement.

    In both, player and ghost, i'm using the latform behavior, simulating left, right, jump, when the player does too.

    My current ideia is, i calculate the time it takes for the ghost to get to the position when the player performs an action. Lets say, when the player jumps, i call a function passing the player's X and Y as arguments, that loops(using for each) all ghosts, setting 2 instance varialbes to the ghosts X and Y, then i wait z seconds, where

    z= distance(Function.Param(0), Function.Param(1), Ghost.X, Ghost.Y) / Ghost.Platform.Speed and then i simluate the jump on the ghost.

    This doesn't work very well in a couple of scenarios, if i have multiple platforms, different Y levels, the ghosts start to derp. Also I have the Wrap behavior, soo if i jump while some ghosts are "wrapping" to the other side, these ones only jump after a while.

    Any tips, maybe a new approach? Thanks in advance!

    PS: the for each loop, does it run in parallel?

  • the capx that he provides doesn't work, but i'm trying to make my own stuff, to understand how it works

  • ok this is really cool, thx alot!

  • lh4.ggpht.com/OPIfp0B-vCdK_xoE8vgX30dwXtxTaX4cLIMfOnhUBnMkLiG5I6FDzXsSFJyPnTlMeoU=h900-rw

    this is an image from a mobile game Magic Touch: Wizard for Hire, from Nitrone.

    Is this possible using construct 2? I've tried some stuff, but not close enouf to show it :/

    I have read about this stuff, pattern matching, symbol recognition, but no ideia how to do this in C2

    (wrote a program usng Java, and it worked like 2/200 times lol)

  • ramones solved it, thx alot!!!