lennaert's Forum Posts

  • My small test proves that native export is required even if you make a simple game with no behaviours and only one simple event.

    My test contains 5 moving 64x64 squares. The only behaviour they have is "wrap".

    APK - it runs 40-45 fps and 8-13% cpu on my mobile device (Apk is made via last version of intel XDK and crosswalk 11)

    HTML it runs 58-60 fps and 9-11% cpu on the same mobile device

    .CapX

    This test proves that Intel XDK kills about 15 fps in a very-very-very simple game.

    And now imagine what will happen with complex games.

    P.S. Later I can show you the same test built via native apk-export - you will see the difference. It is great.

    I played a little with your file, could you test this for me exporting over intel xdk and check the results ?

    Now, the FPS might not be optimal ... but ... do me a favor and check how you experience the movement

    edit:

    > i've spent over 14 years in programming( c,c++,c#, JS, Java and more),

    >

    >

    I guess. either that's not truth or you are a bad programmer, otherwise why would programmer use engine without coding?

    Been programming for near 20 years ... I can write in lots of different assembly languages and a buttload of scripting languages ....

    C2's potential for rapid development wipes the floor with each and every language I have used.

  • You need to craft your own ID system.

    Easiest would be on the host end, which upon object creation you set an object variable like ID and set it with the IID of the object.

    When this gets synched both host and peer have the same object.id for the objects.

  • On Chrome there is a peer connection limit of 256.

    Its a limit in place to safeguard stability.

  • Perhaps check the tutorial section for PHP related works.

    It is not a small thing if you have never done it.

  • Generally, a synched object needs to be destroyed on the host end, which gets reflected on the peer end a moment later.

    To smooth-en this a bit, I always use some logic to synch the health as on the host to the peers, and on the peer end, when the health would be gone, set the object invisible. (or other effect related to death) During its invisible moment it should get destroyed.

    Its actually some nifty camouflage for the lag time difference.

  • I'll give that a shot.

    What does <> mean?

    Thanks for the help!

    Its the written expression equivalent of "does not equal" (less or more)

  • Ah, you missed the concept here:

    events I proposed should look like:

    example for player at the top of screen, Lets call this paddle peerA

    event:

    Ball.Y < 50

    -subevent: PeerA.peerid <> multiplayer.hostid

    -action: set oldx to peerA.x

    -action: peerA set X to lagcompensateX(PeerA.peerid, multiplayer.hostid)

    --subevent: Ball is overlapping paddle

    --subevent: peerA set x to oldx

  • You can use ajax in combination with PHP for user registration and clan setup/joining.

    Then in game when using multiplayer, at some point when you need to update the stats of a player, again use Ajax and PHP to update the players stats.

    When you want the stats overview, again use Ajax and PHP to retrieve all the stats from your clan.

    Thats how I would go about.

  • The moving peer id would be the peers paddle, and seeing how the host needs to determine when/where, the frompeerid would be the host.

    EDIT: this is a bit of a problem, as that would rely on knowing where something was.

    This makes me think it will not work.

  • First off, I am not sure the lag compensate mechanic is applicable to this situation.

    It seems to me the required mechanic here relies on knowing where a paddle/ball might be, in stead of having to know where it was.

    But, seeing as there is a level of predictive-ness involved in the plugin, it might apply.

    I have not made a mechanic like this yet, but I would start by trying:

    if the ball passes a certain Y , on either end where it crosses a line where it 'could' interact with a peer's paddle, I would perform a quick lag compensated X,Y on the peer's paddle, check for collision with the ball, then return paddle to original position.

    Remember, only the host can perform the lag compensate re-positioning. So if the host deemed it a collision, it will perform the actual collision.

    Right after, you replace the paddle back to its original position, but it will have performed the bounce if that is already in the host mechanics. (and if it really works )

    I always envision the lag compensate test as a method to determine a connected users position (either host or peer), a moment in the past based on the lag time from a peer(!not host).

  • Might I ask how you determine ball movement on peer end ?

  • 1. you can still use ctr+shift+left arrow/right arrow to shift the selection over entire words

  • I don't think there are any way to manipulate nodes after a path have been found, however not 100% sure. If that is the case there are no "easy" solution to what you want to do. At least not easy enough for me to make an example

    Including my previous post:

    Pick waypoint.number = X , set position X,Y

    allthough, its not editing the nodes of the actual found path.

  • Add sprite, waypoint, add var waypoint.number

    Place the waypoints on your layout and edit the variable number for all waypoints in the layout editor accordingly so it becomes the path you want.

    Then add a variable to your player object with pathfinding. Player.waypoint. Set default to 1.

    When you start the route

    player find path to player.waypoint

    And add

    on pathfinding arrived

    add 1 to player.waypoint

    player findpath to player.waypoint.

    If you want a loop, like a racing track, and say you have 20 waypoints, you could make instead of the above:

    on pathfinding arrived

    sub

    -player.waypoint = 20, set player.waypoint = 1

    sub else

    -add 1 to player.waypoint

    blank sub

    -player find path to player.waypoint

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • you present something ... but not now ...

    I'll give feedback .. not now though.