Jump to content


Photo

Online Engine V2


  • Please log in to reply
864 replies to this topic

#651 tailsxp

tailsxp

    GMC Member

  • New Member
  • 22 posts

Posted 18 October 2007 - 09:36 PM

When i start the client i get the error

ERROR in
action number 1
of Other Event: Game End
for object obj_client:

Error in code at line 4:

writebyte(global.myid);

at position 19: Unknown variable myid
  • 0

#652 Crysonium

Crysonium

    GMC Member

  • New Member
  • 6 posts

Posted 23 October 2007 - 04:39 PM

JUST WHAT I NEED!

it will be so easy!

thanks you so much
  • 0

#653 Hay44444

Hay44444

    GMC Member

  • New Member
  • 181 posts

Posted 23 October 2007 - 05:18 PM

JUST WHAT I NEED!

it will be so easy!

thanks you so much

<{POST_SNAPBACK}>


:D
Haha, I love how many mmo's(cheasy ones) popped up after this was released, B)
  • 0

#654 Mister_M

Mister_M

    GMC Member

  • New Member
  • 499 posts

Posted 23 October 2007 - 08:44 PM

Wow, Youre great with online -ONL1N3-.
I just need to do port forwarding and to check it (using linksys rounter).
I worked on the engine all night! Good thing you left comments, now I fully understand EVERYTHING in the engine and almost completely modified it. I.O.U
  • 0

#655 Hay44444

Hay44444

    GMC Member

  • New Member
  • 181 posts

Posted 24 October 2007 - 03:50 AM

ya, its fun huh?
I've been working on my own engine for over a year.

oh ya...its nice, lol
im tempted to release it..but instantly there'd be 100 billion noobish lil mmo's.
haha
  • 0

#656 Mister_M

Mister_M

    GMC Member

  • New Member
  • 499 posts

Posted 24 October 2007 - 06:53 AM

Say, Every player must do port forwarding if he has a router right?
Isnt it too complicated for many players who want to play with a click of a button?
  • 0

#657 MatrixQuare

MatrixQuare

    Matrix Square Entertainment Corp.

  • GMC Member
  • 772 posts
  • Version:Unknown

Posted 24 October 2007 - 06:56 AM

Say, Every player must do port forwarding if he has a router right?
Isnt it too complicated for many players who want to play with a click of a button?

<{POST_SNAPBACK}>

If the connections are made via TCP (which is slow), then only the Host needs the port forwarded. If you're using UDP (faster than TCP), than everyone should have their ports forwarded.

HOWEVER, there are NAT punchthrough methods where players don't need to forward their UDP port--but the down side is that this doesn't work with ALL NAT filters (a.k.a. doesn't work with all routers). Google up "NAT Punchthrough" and you should find some articles you can read and then incorporate that knowledge into your game.

Edited by MatrixQuare, 24 October 2007 - 06:57 AM.

  • 0

#658 Mister_M

Mister_M

    GMC Member

  • New Member
  • 499 posts

Posted 24 October 2007 - 08:37 AM

Wow, thanks it really helped!
Lets assume I need to work via UDP connection which I also recommend, Is it even possible to have an auto port forwarding?
Starcraft for example and many other games have this feature.
Why cant game maker?

Edit: Wow im frustrated... It wont work... I changed the 207.0.0.1 to my ip.
and enabled port forwarding to port 12564 TCP and NOTHING.
NOTHING happens... What can I do?

Edited by Mister_M, 24 October 2007 - 05:43 PM.

  • 0

#659 Hay44444

Hay44444

    GMC Member

  • New Member
  • 181 posts

Posted 24 October 2007 - 07:14 PM

guys...all you need is the sever forwarded...and everythings smooth.
Actually...you dont even need that...
This whole port forwarding thing is...i dunno why ppl bother..
I use a wireless router and a dynamic ip...soooooo much easier han anything else. I've never had a problem.
  • 0

#660 Mister_M

Mister_M

    GMC Member

  • New Member
  • 499 posts

Posted 24 October 2007 - 07:41 PM

hehe, I did do port forwarding and all...
After rebuilding almost the whole thing I managed to do it right.
it apears that the problem was a typo... a simple typo with the port...
Well, at least i know how to use 39dll perfectly...
  • 0

#661 MatrixQuare

MatrixQuare

    Matrix Square Entertainment Corp.

  • GMC Member
  • 772 posts
  • Version:Unknown

Posted 24 October 2007 - 08:14 PM

Wow, thanks it really helped!
Lets assume I need to work via UDP connection which I also recommend, Is it even possible to have an auto port forwarding?
Starcraft for example and many other games have this feature.
Why cant game maker?

Edit: Wow im frustrated... It wont work... I changed the 207.0.0.1 to my ip.
and enabled port forwarding to port 12564 TCP and NOTHING.
NOTHING happens... What can I do?

<{POST_SNAPBACK}>

That's not auto-port forward, it's what I'm referring to as "NAT Punchthrough". It's a concept--not a feature-set. That means it can be implemented using 39dll.

I guess you can call it "auto-port forwarding"... but it's not actually forwarding any ports.

Edited by MatrixQuare, 24 October 2007 - 08:15 PM.

  • 0

#662 billydoesitbest

billydoesitbest

    GMC Member

  • GMC Member
  • 445 posts

Posted 24 October 2007 - 08:18 PM

I thought you needed a static IP to host a server, not a dynamic IP.
  • 0

#663 L0rdCyrus

L0rdCyrus

    GMC Member

  • New Member
  • 59 posts

Posted 26 October 2007 - 11:27 AM

Well, my unfinished mmorpg project is running atm, done with this example http://gmc.yoyogames...howtopic=335649. But i have to warn you that my net kinda sucks, also im hosting this server behind the router so there maybe some lag.
  • 0
GM Resources and other sources: http://cyrus.planet.ee/

#664 Mister_M

Mister_M

    GMC Member

  • New Member
  • 499 posts

Posted 27 October 2007 - 11:19 AM

Wow, I read and studied the dll over and over and managed to finally get it to work and it works not only well, but great! I already implanted part of my game in it!

billy dont worry, im not dumb - Im using a static IP now. figured
when the router died and the IP changed...

-ONL1N3- I dont recognize youre engine anymore its just not it X~X
  • 0

#665 matty_richo

matty_richo

    GMC Member

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

Posted 27 October 2007 - 09:47 PM

can someone please add login/register to this and cred will be given
  • 0
Posted Image

#666 Mister_M

Mister_M

    GMC Member

  • New Member
  • 499 posts

Posted 30 October 2007 - 04:48 PM

LOL IM STUCK ON CAPSLOCK. IM NOT REALLY ANGRY XD
LISTEN YOU HAVE TO CHANGE THE ONLINE ENGINE FILE AND IN THE OBJ_CLIENT YOU CAN REPLACE THE GLOBAL.IP WITH YOUR IP SO THAT PEOPLE COULD JOIN. THEN AND ONLY THEN SOMEONE WILL BE ABLE TO LOGIN OR REGISTER IN YOUR SERVER AS LONG AS IT IS OPERATIONAL. ON TOP OF THAT IF YOU HAVE A ROUTER YOU NEED TO DO PORT FORWARDING AND MAKE SURE YOU HAVE A STATIC IP.
  • 0

#667 Spencer G.

Spencer G.

    GMC Member

  • GMC Member
  • 348 posts
  • Version:GM8

Posted 09 November 2007 - 04:26 AM

I have a problem i wanted to the chat thing to follow the view but when i change the

//Draw the chat
script_drawlines(100,100);

//Draw the text for the chat bar
draw_text(16,144,"|" + keyboard_string);

to

//Draw the chat
script_drawlines(view_xview+100,view_yview+100);

//Draw the text for the chat bar
draw_text(view_xview+16,view_yview+144,"|" + keyboard_string);

but then the view doesnt follow my player for some reason.

Edited by Spencer G., 09 November 2007 - 04:26 AM.

  • 0

#668 cpsgames

cpsgames

    GMC Member

  • GMC Member
  • 79 posts
  • Version:Unknown

Posted 11 November 2007 - 11:19 AM

Okay I have been using your engine, its really nice but do you know how when you collided with someone it gets their player id? and if you attack them it sends a message to them.
  • 0

#669 tha master

tha master

    GMC Member

  • New Member
  • 84 posts

Posted 15 November 2007 - 10:04 PM

I don't really get how to send a message to a single player, i tried this but nothing happend :D
The recieve code
   case 10:
    
    show_message(readstring());
    break;

The send code

clearbuffer();

writebyte(10);
writestring("test",true);

sendmessage(tcp);

What did i do wrong?

Edited by tha master, 15 November 2007 - 10:12 PM.

  • 0
Working on my new website: http://demontunes.com/
Posted Image

#670 CaKsTeR

CaKsTeR

    GMC Member

  • New Member
  • 761 posts

Posted 15 November 2007 - 11:21 PM

for the view_xview problem, u have to add the view in [] after the command. so it would be like this:

//Draw the chat
script_drawlines(view_xview[0]+100,view_yview[0]+1
00);

//Draw the text for the chat bar
draw_text(view_xview[0]+16,view_yview[0]+144,"|" + keyboard_string);
  • 0

#671 Kakashi_Hatake

Kakashi_Hatake

    {(GM)}

  • New Member
  • 1713 posts

Posted 17 November 2007 - 11:57 PM

I don't really get how to send a message to a single player, i tried this but nothing happend ::lmao::
The recieve code

   case 10:
    
    show_message(readstring());
    break;

The send code

clearbuffer();

writebyte(10);
writestring("test",true);

sendmessage(tcp);

What did i do wrong?

<{POST_SNAPBACK}>

i dont think you can writebyte(10); is it writedouble(10);?

Edited by Kakashi_Hatake, 18 November 2007 - 12:12 AM.

  • 0

thnkz 4 da avie t3mp3st

#672 Mister_M

Mister_M

    GMC Member

  • New Member
  • 499 posts

Posted 18 November 2007 - 10:18 PM

Wow, just a question, how come you can only have 255 players?
What doesnt support thousands? You see, our game might become extremely big, and extremely populated. Even the offline version had about 2,000 downloads...
  • 0

#673 Toon-Master

Toon-Master

    Half-Toon Hero!

  • New Member
  • 340 posts

Posted 19 November 2007 - 04:15 PM

Wow, just a question, how come you can only have 255 players?
What doesnt support thousands? You see, our game might become extremely big, and extremely populated. Even the offline version had about 2,000 downloads...

<{POST_SNAPBACK}>


You can have more then 256 players if you wanted to.

Involves changing the player id data type to something like ushort (65536 players worth I think) or uint (forgot the number but it's big haha).

After changing that you gotto change the number in the for loop (where it initializes the array of player objects and searches for a empty player id).

So a few things to change and your set. It's up to you to decide how many players you intend to have in a server. The byte is a good default for like a 20 player game (requires less effort to change since data type is a byte size).

Maybe there are bits that are required to change more but this should be the basis.

- Toon-Master
  • 0
D: I'm sorry if I'm unavailable for answering questions through messaging on GMC.
-------------------------------------------------------------------
I love Leanny Basil, Heart on Artivale. You inspired me for so many years.

#674 Mister_M

Mister_M

    GMC Member

  • New Member
  • 499 posts

Posted 20 November 2007 - 01:29 AM

Well then if thats the case ill use ulong hehe.
Thanks ill try working working with ith
  • 0

#675 miluaces

miluaces

    GMC Member

  • New Member
  • 29 posts

Posted 23 November 2007 - 10:39 PM

Wow, this is great. I got a game I had online, after many tries with other engines. Thanks!
  • 0

#676 Blaze984089

Blaze984089

    Fire-games leader

  • New Member
  • 491 posts

Posted 24 November 2007 - 07:31 AM

I keep getting timed out, I tryed to take out PING (for some reason, I knew I shouldent have) and I got the "Error defining some thing"

Please help, I did the I.P thing, right.



Edit:New problem, players cant see each others text or people.

Edited by Blaze984089, 24 November 2007 - 07:46 AM.

  • 0
Want a place to discuss games my team, Dark Games, has made?
Want a place where you can just hang out and talk about random stuff?
Want a new forum to visit every day for updates?

http://darkgames.fre...s.org/index.php

Join my forum, and have fun! (Make sure to read the rules!)

#677 brybry96

brybry96

    GMC Member

  • New Member
  • 463 posts

Posted 26 November 2007 - 11:52 PM

Well are you trying with other people because it works for me with just me


My only problem is when i log on and put my name in and then my friend tries to log in and i get this error saying Unable to connect but i have the server up and everything no it doesn't show an error it shows a show_message("Unable to connect")
So can i get some help i really need this i have been wanting to make an online game for a good while now :) but if you cannot help that is fine i just won't make an online game
  • 0

#678 kickassgames

kickassgames

    GMC Member

  • GMC Member
  • 230 posts

Posted 18 December 2007 - 12:41 PM

All of you note this. you will have to edit the engine a bit to make it run fully. in the empty one it has no X and Y sending. It won't send to other clients so you must edit that yourselves. Noobs don't expect it to be easy to use.
  • 0
Come fight me fool:
Click HERE

#679 Konochi

Konochi

    GMC Member

  • New Member
  • 629 posts

Posted 21 December 2007 - 05:53 AM

are the new accounts to this engine server side or files?
  • 0

#680 salmjak

salmjak

    GMC Member

  • New Member
  • 80 posts

Posted 22 December 2007 - 05:25 PM

My friend get this error when he try to run the game :S

ERROR in
action number 1
of Create Event
for object obj_client:

Error defining an external function.

  • 0

#681 Konochi

Konochi

    GMC Member

  • New Member
  • 629 posts

Posted 22 December 2007 - 05:32 PM

My friend get this error when he try to run the game :S

ERROR in
action number 1
of Create Event
for object obj_client:

Error defining an external function.

<{POST_SNAPBACK}>

it's either you didn't extract the files or you don't have 39dll in the same place as the game
  • 0

#682 salmjak

salmjak

    GMC Member

  • New Member
  • 80 posts

Posted 23 December 2007 - 09:44 AM

Thanks.

Hmm, the text in the chat just turned invisible when I added the "case 2" from the kirby demo into my game :S
  • 0

#683 Konochi

Konochi

    GMC Member

  • New Member
  • 629 posts

Posted 23 December 2007 - 04:24 PM

Thanks.

Hmm, the text in the chat just turned invisible when I added the "case 2" from the kirby demo into my game :S

<{POST_SNAPBACK}>

That, I do not know :blink:
  • 0

#684 bradbury_daniel

bradbury_daniel

    GMC Member

  • New Member
  • 35 posts

Posted 26 December 2007 - 07:42 AM

about how many people do u think that this engine could support in the same room with little to no lag?
  • 0

#685 That guy behind you

That guy behind you

    Local Psychopath

  • New Member
  • 1093 posts

Posted 27 December 2007 - 09:24 PM

kirby online example wont work for me for some reason. Im connecting to 127.0.0.1 and always run the server first so i dont know what the problem is. It says "no session found"
  • 0

#686 brybry96

brybry96

    GMC Member

  • New Member
  • 463 posts

Posted 27 December 2007 - 09:28 PM

Did you setup a server you need to do that, are you launching it with gm7 that will not work launch it with gm6



**Note this was a fast reply**
  • 0

#687 Observing Daylight Saving Time?

Observing Daylight Saving Time?

    GMC Member

  • New Member
  • 314 posts

Posted 27 December 2007 - 10:38 PM

That guy behind you:
I think he said that he didn't update the kirby example to work with the server.

**Note this was a fast reply**
  • 0

#688 Konochi

Konochi

    GMC Member

  • New Member
  • 629 posts

Posted 28 December 2007 - 12:39 AM

are the player accounts in the engine server side or files
  • 0

#689 That guy behind you

That guy behind you

    Local Psychopath

  • New Member
  • 1093 posts

Posted 28 December 2007 - 03:18 AM

oh yeah he did say that


1 more question, using the normal engine, how do i tell the id of a message? Im creating bullets, but as far as i can tell theres nowhere to enter the id. I looked at the messages that send x and y, which have an id of 5, but i dont see anywhere where there is a 5
  • 0

#690 gurilazs

gurilazs

    GMC Member

  • New Member
  • 385 posts

Posted 28 December 2007 - 03:29 AM

oh yeah he did say that


1 more question, using the normal engine, how do i tell the id of a message? Im creating bullets, but as far as i can tell theres nowhere to enter the id. I looked at the messages that send x and y, which have an id of 5, but i dont see anywhere where there is a 5

<{POST_SNAPBACK}>



Here's a sample showing how it works. It should be pretty easy to understand (I'm sorry, I'm not good at implementing things). :(

Clientside:
//Recieve
case 99:
readbyte();
xx = readshort();
blah blah...
break;

//Send
clearbuff();

writebyte(98); //Check the case id in the serverside | sends the data to case 98 in serverside

writeshort(x);
with(obj_client)
send.... blah
break;

Serverside:
case 98:
readbyte();
xx = readshort();
blah blah...
clearbuffer();
writebyte(99); //Check the case id in the client side | Sends the data to case 99 in recieve (Client side)
writeshort(xx); //Sends the data back to the client (Recieve)
with blah blah


Use this scratch to start you off making the message:

//Sending from Clientside
clearbuffer();
writebyte(case id in serverside);

//Message
MESSAGE HERE
e.g :
writeshort, writestring

//Send
sendmessage(global.clienttcp);

//Reading in Serverside
case id:

//Message
MESSAGE HERE
e.g :
readshort, readstring
break;

//Reading and reply back (can be Both)
case id:
//Message
readshort, readstring

//Reply
clearbuffer();
writebyte(case id in clientside);

//Message
writestring, writeshort

//Send
with(obj_client)
{
        sendmessage(tcp);
}
break;

:)

Edited by gurilazs, 28 December 2007 - 03:43 AM.

  • 0
Instant File Upload: http://upload.shoutsomething.com

#691 e_barroga

e_barroga

    ES Studios Leader

  • GMC Member
  • 2475 posts

Posted 28 December 2007 - 05:06 AM

Wouldn't it be a bad idea to change the sync to blocking mode? Because then, say for an MORPG, someone hangs the server.
  • 0

rsa_gmc_sig.png

 

logoGIF1.gif EXTENSION. PM TO PURCHASE LICENSE.


#692 That guy behind you

That guy behind you

    Local Psychopath

  • New Member
  • 1093 posts

Posted 28 December 2007 - 02:36 PM

oh i see, you send a message to the server and it sends it back with a different id

EDIT: dang im stuck again. how do i send x and y of an indivdual bullet without it screwing up the x and y of other bullets?

Edited by That guy behind you, 28 December 2007 - 02:53 PM.

  • 0

#693 That guy behind you

That guy behind you

    Local Psychopath

  • New Member
  • 1093 posts

Posted 29 December 2007 - 02:42 AM

... =(
  • 0

#694 Fyeregg

Fyeregg

    Fyeregg Productions

  • New Member
  • 763 posts

Posted 30 December 2007 - 09:32 PM

.
Note to everyone: If you post stupid things in this topic like "There's no one on! ZOMG MAKERZ COMPUTERZ!" then you will be completely ignored by me.

Thanks,
-0NL1N3-

<{POST_SNAPBACK}>


ZOMG DIZ IZ 4Z0M3!!

Lol srry, I couldent help but speak noob. I will translate for every one...

"Omg, This is awsome!"
  • 0
I think I am done with Game Maker, so if I was working on any projects, they will most likely never get finished.

I am moving on to...

C++
Java

#695 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 31 December 2007 - 01:58 AM

Ok, If you all want a platform example that SAVES then look at mine. It saves all sorts of stuff...It's nice :)
  • 0

#696 Manaphy94

Manaphy94

    GMC Member

  • New Member
  • 142 posts

Posted 31 December 2007 - 08:00 PM

can someone help when i hit run it says cant connect to server
How do i use this?Someone said you didnt
extract the files how do i do that?

Edited by Manaphy94, 31 December 2007 - 08:02 PM.

  • 0

#697 That guy behind you

That guy behind you

    Local Psychopath

  • New Member
  • 1093 posts

Posted 31 December 2007 - 09:13 PM

you just have to run server.exe first or whatever its called

i keep thinking someone is posting the answer to my question. its been 4 days and no one knows how to make a simple bullet?
  • 0

#698 Chris94

Chris94

    GMC Member

  • New Member
  • 203 posts

Posted 07 January 2008 - 09:07 PM

OK, I think you could give it a player ID or something, as if it were a player or a monster (you would do this for monsters too). So when the bullet is created send a message to the server, server receives it and sends a message with the player id for the bullet (+1), then the client receives it and gives the bullet the player id then the bullet is created and it updates it position in an Alarm 0 event. When the bullet is destroyed, have the client send a message to the server sayying the bullet was destryoed, then the server receives and sets everyones player id's -1. This would work but if people spam, the server will lag, so you would have to monitor what people do and make a rule for spamming like that. (You could set a limit on how many bullets you use or have once you create your fifth bullet or something, it destroys one of it's old ones, this way it could maintain how many bullet were floating around.) :blink:

Well, hope this can help, and sorry it's so long! :GM084:
  • 0


How to use 39DLL in C++/Delphi Code Example : ZIP


#699 IServers

IServers

    GMC Member

  • Validating
  • 9 posts

Posted 08 January 2008 - 10:49 PM

Hello all!

If you use this example, and want a free server to host your game on, contact me! Links in my sig for topic!

#700 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 10 January 2008 - 11:56 AM

Hello all!

If you use this example, and want a free server to host your game on, contact me! Links in my sig for topic!

<{POST_SNAPBACK}>

This has a server for it! They don't want a server because they have no professional game (yet) and would rather have a limitless account range for free! What's up with the ad?
  • 0