Waltan's Recent Forum Activity

  • Try to slice your sprites to be smaller. Not only it uses less memory. It also allows greater modularity.

    For collision polygons, use a sprite specifically for "solids" in your case. Expand them to fill the area as neccessary. You can turn them invisible in your game.

    What if I'll make collisions like this and then fill empty places with tiled background?

    Also, which is better, two tiled backgrounds with length of 4 or 1 with length of 10?

  • I have this map. I want to put it in 1 layout. So I have question about it.

    What will work faster?

    • If I will split this map to parts, and then put it it game as sprites and then make collision polygons for each of them?

    or

    • If I will make all black color with tiled background and rounded edges with sprites?
  • >

    > >

    > > Every 0,05 seconds:>Send ("alldata," & "," & id & "," & x & "," & y)

    > >

    > For the server part or a client? I'm a little misunderstood.

    >

    > If I will send some kind of data to the server, how can I split it

    Your client. You gonna delete the pick, the "is moving?" condition and put a clear "every 0,05"... as I said.

    The server side gonna be something like this:

    socket.on("message", function (data) {

    var new_data = data.split(',');

            if (new_data[0] == 'alldata') {

                id = new_data[1];

                x = new_data[2];

                y = new_data[3];

                

                socket.broadcast.emit("message",

                  ?'alldata,' + id + ',' + x + ',' + y);

            }

    Alright. Thank you.

    Also, how "socket.broadcast.emit" is different from "socket.send"?

    breackzin

  • Every 0,05 seconds:>Send ("alldata," & "," & id & "," & x & "," & y)

    For the server part or a client? I'm a little misunderstood.

    If I will send some kind of data to the server, how can I split it?

    By the way, what language do you speak? Are you deep into socket.io? I have problems myself about hosting it. Could you help me?

    My native language is Russian, but I can uderstand English well enough and write it clearly enough :)

    If you need help add me on Skype: ivladoss

  • Get it tested and see for yourself.

    It still did not helped. Maybe there is a problem with my code?

    <img src="https://dl.dropboxusercontent.com/u/34384736/construct/socket.png" border="0" />

  • every tick - system scroll to object "player"

    Hope this wil help.

  • Instead, use every 0,05 seconds.

    Are you sure this will help?

    What about 0,1?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I created a little project in which I have 2 players.

    Every tick Im asking server for the second player's coordinates and      

    along with this sending him mine.

    Everything works fine for the first 10-15 second. Then it began to lag and then it freezes.

    Can you tell me any other way how to optimise exchange of coordinates?

  • Maybe there is "On page closed" or "On game ended" condition?

  • He just means, you shouldnt connect in the layer where your map is.

    Or he means that you shouldnt connect twice...

    Jeck your inbox already, dude.

  • Im going to send your my skype name soon ok?

    Did you also checked the firewall of your router? Try to forward the port.

    Which ports should I open?

Waltan's avatar

Waltan

Member since 5 Jul, 2011

None one is following Waltan yet!

Trophy Case

  • 14-Year Club
  • Forum Contributor Made 100 posts in the forums
  • x4
    Coach One of your tutorials has over 1,000 readers
  • x2
    Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies