Jump to content


Photo

[blaxun] Online Engine/examples And Documentation


  • Please log in to reply
1484 replies to this topic

#1401 2DLuis

2DLuis

    Graphic Designer

  • GMC Member
  • 2493 posts
  • Version:GM8

Posted 03 May 2010 - 01:11 AM

Ive got the classic problem -.-

On one screen my other player is visual.. But on the other.. Its not.


Have you modified the engine at all? If so, what code did you change, we're not psychic here :P


No, nothing special. It seems to react on the "enter" script when I put it (on the first case)
i.visable = true. Then It shows on the first guy's screen.

When I start up the game in one stand alone you can see your guy walking around, and everythings perfect. And you can also see the guy that is logging in.. But the guy that logs in, Cant see the first player!

When I put it visable = true on the other case (it can maybe too se the first player? - I thought)
But no..

The first player sees the second.. But the second that logs in cant see the first.


Thanks for any help :D


Maybe because thats not how you spell visible :P
its visible
  • 0

#1402 Universal_X

Universal_X

    GMC Member

  • New Member
  • 126 posts

Posted 03 May 2010 - 03:49 PM

Maybe because thats not how you spell visible :D
its visible


I did spell it visible.. :blink:

And now its visible on both clients.. But Im afraid that the objects will show, even if they are in another room.

How can I solve this problem?

Edited by Universal_X, 03 May 2010 - 03:57 PM.

  • 0

#1403 Kyon

Kyon

    Creator of Dirkels

  • New Member
  • 4237 posts

Posted 03 May 2010 - 03:53 PM

Maybe because thats not how you spell visible :blink:
its visible


I did spell it visible..

And now its visible on both clients.. But Im afraid that the objects will show, even if they are in another room.

How can I solve this problem?

you spelled it 'visable'...
  • 0

#1404 Universal_X

Universal_X

    GMC Member

  • New Member
  • 126 posts

Posted 03 May 2010 - 04:06 PM

Maybe because thats not how you spell visible :blink:
its visible


I did spell it visible..

And now its visible on both clients.. But Im afraid that the objects will show, even if they are in another room.

How can I solve this problem?

you spelled it 'visable'...


Ahh No I didnt.. I check my code and I see it were visible on both sides :D I only forgot the word now in the forum -.-
  • 0

#1405 2DLuis

2DLuis

    Graphic Designer

  • GMC Member
  • 2493 posts
  • Version:GM8

Posted 03 May 2010 - 06:50 PM

Maybe because thats not how you spell visible :blink:
its visible


I did spell it visible..

And now its visible on both clients.. But Im afraid that the objects will show, even if they are in another room.

How can I solve this problem?

you spelled it 'visable'...


Ahh No I didnt.. I check my code and I see it were visible on both sides :D I only forgot the word now in the forum -.-

So is it working now? It has no reason to randomly show if they are in another room, if thats what you are worried about.
  • 0

#1406 hanyunanodesudc

hanyunanodesudc

    GMC Member

  • New Member
  • 360 posts

Posted 03 May 2010 - 10:40 PM

Where do I need to change for a different string for the en/decryption (global._buffpass)?
Server's obj_controller's create event " scr_vars_init('testingthis') "
and Client's init engine, " global._buffpass = 'testingthis' ".
Where's the other place? D:
or is that it;;?

Edited by hanyunanodesudc, 03 May 2010 - 10:58 PM.

  • 0

#1407 2DLuis

2DLuis

    Graphic Designer

  • GMC Member
  • 2493 posts
  • Version:GM8

Posted 03 May 2010 - 11:40 PM

Where do I need to change for a different string for the en/decryption (global._buffpass)?
Server's obj_controller's create event " scr_vars_init('testingthis') "
and Client's init engine, " global._buffpass = 'testingthis' ".
Where's the other place? D:
or is that it;;?


That should be it, if I'm not mistaken, unless you're receiving screwed data :/
  • 0

#1408 hanyunanodesudc

hanyunanodesudc

    GMC Member

  • New Member
  • 360 posts

Posted 03 May 2010 - 11:55 PM

Where do I need to change for a different string for the en/decryption (global._buffpass)?
Server's obj_controller's create event " scr_vars_init('testingthis') "
and Client's init engine, " global._buffpass = 'testingthis' ".
Where's the other place? D:
or is that it;;?


That should be it, if I'm not mistaken, unless you're receiving screwed data :/


Yeah, it's working now... For some reason, my firewall settings changed to something really weird without any notice TT
  • 0

#1409 kdixon24

kdixon24

    GMC Member

  • New Member
  • 82 posts

Posted 05 May 2010 - 08:16 PM

yay!
more problems! :P

when i use this on my moms computer, it says server offline.

we are networked, i did the port forward, my computer was the server, is there something i'm missing?


Anyone? Please, i'm trying to get this working...
  • 0

#1410 2DLuis

2DLuis

    Graphic Designer

  • GMC Member
  • 2493 posts
  • Version:GM8

Posted 06 May 2010 - 02:21 AM

yay!
more problems! :P

when i use this on my moms computer, it says server offline.

we are networked, i did the port forward, my computer was the server, is there something i'm missing?


Anyone? Please, i'm trying to get this working...

Are you sure you port forwarded to the correct local ip? Furthermore, use your pc's external ip, not internal
  • 0

#1411 kdixon24

kdixon24

    GMC Member

  • New Member
  • 82 posts

Posted 15 May 2010 - 02:27 PM

yes, I found my IP, and my moms IP, they were the same, I checked to make sure it was a static IP, and an external IP
  • 0

#1412 hanyunanodesudc

hanyunanodesudc

    GMC Member

  • New Member
  • 360 posts

Posted 17 May 2010 - 01:20 AM

Soooo I was wondering.... How safe is this (just by the engine itself without any edit)?
And I mean safe as in internet security (not just in-game hacking). Can hackers mess up the server's cpu or anyother users' that are connected?
If so, to what degree?
  • 0

#1413 sabriath

sabriath

    12013

  • GMC Member
  • 3147 posts

Posted 17 May 2010 - 03:37 AM

yes, I found my IP, and my moms IP, they were the same, I checked to make sure it was a static IP, and an external IP

Your IP and your moms IP were the same? yet you have 2 different computers? That means you're using your external IP address, you must use your internal IP address if you are within the same network. This is because residential routers don't normally have a re-route check across the network, it just sees "oh, you want to access **.**.**.** this address, that's outside somewhere, let me put it on the line out there" and not realizing that it's actually pointing to itself. When it hits the next hop on the line, the hop sees that you are backtracking and will ignore the message, dropping your packet.

If you have an industrial router, or the ability to set up a direct route table, set an incoming message pointing toward its own IP address to go back into the internal network based on the port. This is a little more advanced than just simple port-forwarding, therefore the best option to take is just point your client to your INTERNAL IP address for computers INSIDE the network.
  • 0

#1414 kdixon24

kdixon24

    GMC Member

  • New Member
  • 82 posts

Posted 17 May 2010 - 12:09 PM

yes, I found my IP, and my moms IP, they were the same, I checked to make sure it was a static IP, and an external IP

Your IP and your moms IP were the same? yet you have 2 different computers? That means you're using your external IP address, you must use your internal IP address if you are within the same network. This is because residential routers don't normally have a re-route check across the network, it just sees "oh, you want to access **.**.**.** this address, that's outside somewhere, let me put it on the line out there" and not realizing that it's actually pointing to itself. When it hits the next hop on the line, the hop sees that you are backtracking and will ignore the message, dropping your packet.

If you have an industrial router, or the ability to set up a direct route table, set an incoming message pointing toward its own IP address to go back into the internal network based on the port. This is a little more advanced than just simple port-forwarding, therefore the best option to take is just point your client to your INTERNAL IP address for computers INSIDE the network.

thanks for the help, ill try that later today or tomorrow
  • 0

#1415 BlaXun

BlaXun

    Slime Online Creator

  • GMC Member
  • 2616 posts
  • Version:GM:Studio

Posted 19 June 2010 - 05:05 PM

Soooo I was wondering.... How safe is this (just by the engine itself without any edit)?
And I mean safe as in internet security (not just in-game hacking). Can hackers mess up the server's cpu or anyother users' that are connected?
If so, to what degree?


Messages are encrypted...
Messing with others computers isnt possible if you dont code anythign malicious that the "attacker" can somehow use
  • 0

#1416 sabriath

sabriath

    12013

  • GMC Member
  • 3147 posts

Posted 29 June 2010 - 07:18 AM

@BlaXun:

I'm not sure if anyone has stated this or not, but I'm going through your stuff for some inspiration on my work, just went through your "developing an online engine" thing....Just some errors that I see in your documentations:

* A "short" and "ushort" both use 2 bytes, you declare in your png and doc that a "short" is 4 bytes
* An "int" and "uint" both use 4 bytes, you declare in your png that "uint" is 3 bytes and "int" is 5 bytes.
On top of this, it looks like you just incremented from left to right instead of showing the actual number of bytes used. Because "float" uses 4 bytes, and "double" uses 8 (not 6 and 7). Also, string uses 'characters+1' bytes (it appends a nil char), while 'chars' is 'characters' bytes.
* You state this:

We must make sure that we do not pass this Limit else we will get into serious trouble.

Continuing to send over limit sizes will result in hangups, but TCP will automatically throttle data on throughput methods. If a limitation is to be made, it should be much lower than the full limit of your connection.
* You say that packets are "at least 36 bytes". Close but it's actually 60 bytes minimum (40 for IP frame, 20 for TCP frame). This actually could be more considering it goes through windows sockets and adds the application layer to it. (RFC 791 for IP, RFC 793 for TCP)
* There's only 1 type of port...not 2. UDP and TCP are protocols, not port designs.
* Modern day network cards use sliding windows to constantly place data on and off the line, so Nagle's algorithm is 'almost' pointless with gaming. If the information were simply x/y locations, fine, but it's better to buffer your info prior to sending rather than use nagle.
* You state "The good about this would be that there is no need for a server to be online to play." This would be false, the server needs to be up in order to connect players together. You might be thinking of a p2p system, but a server would be needed to connect 'new' people into the loop.


:)
  • 0

#1417 NinjaBril

NinjaBril

    Many games, little time

  • GMC Member
  • 2331 posts
  • Version:Unknown

Posted 01 July 2010 - 09:42 PM

I am about to try this, haven't worked with GameMaker in some years but I miss it. :]

Much props to you Blaxun, i remember back when I was active, you were a factor in the GMG's Online world and I played this game every once and a while.

Edited by Senar, 01 July 2010 - 09:46 PM.

  • 0

#1418 peppermint

peppermint

    GMC Member

  • New Member
  • 11 posts

Posted 14 July 2010 - 08:31 AM

For a noob like me: How do you chat with other players? Any example for me? Thank you!
edited: ok got it!!! Just integrated the chat from the previous version of this.

Next question:
How can I enable players to spawn new objects (an apple for example) so that other players can see it? Which scripts will I need for this? Any examples?

Edited by peppermint, 14 July 2010 - 12:56 PM.

  • 0

#1419 iPodClassic

iPodClassic

    GMC Member

  • GMC Member
  • 273 posts
  • Version:GM8

Posted 15 July 2010 - 07:54 AM

Create the instance and send a message to the server, then the server sends the message to everyone that uve spawned or created something out so that the other players can create that instance too.
  • 0

#1420 True Valhalla

True Valhalla

    ಠ_ಠ

  • Retired Staff
  • 4900 posts
  • Version:GM:Studio

Posted 20 July 2010 - 10:57 AM

How can I enable players to spawn new objects (an apple for example) so that other players can see it? Which scripts will I need for this? Any examples?


All of your answers are within the tutorials/examples themselves...just study them well enough and you'll be on your way.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users