Jump to content


Photo

[blaxun] Online Engine/examples And Documentation


  • Please log in to reply
1484 replies to this topic

#1421 Kit630

Kit630

    GMC Member

  • New Member
  • 156 posts

Posted 21 July 2010 - 02:43 PM

Forgive me if this has already been mentioned and/or fixed, but in version 1.0, if you log in and have other players log in and log out and relog, there's a bug.

Player 1 logs in, player 2 logs in, player 3 logs in. Player 2 logs out.

Player 2 tries to log back in and it throws an "Already logged in" error.

For ****s and giggles I try to log back in as player 1, and lo and behold player 1 becomes logged in twice.

Searching this thread to see if anybody has found and/or fixed this. Otherwise... /bugreport :3

EDIT: Nevermind, did a search and somebody fixed it. Be nice if it had an official fix though for the downloads.

Edited by Kit630, 21 July 2010 - 03:16 PM.

  • 0

#1422 linus371

linus371

    Cactus Games

  • New Member
  • 574 posts

Posted 01 August 2010 - 07:20 PM

Can“t Dowload
I get this error

Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /vhosts/host-a.net/include/mysql.php on line 9


  • 0

#1423 True Valhalla

True Valhalla

    ಠ_ಠ

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

Posted 27 August 2010 - 06:48 AM

Host-a was just down for a little while. It should work now.
  • 0

#1424 Conker5340

Conker5340

    GMC Member

  • New Member
  • 126 posts

Posted 28 September 2010 - 03:44 AM

Okay I read the whole thing and i still don't know how to make it write a message when i spawn a item. How do I do this?
  • 0

#1425 Šelusive

Šelusive

    GMC Member

  • New Member
  • 6 posts

Posted 01 October 2010 - 07:16 PM

I dont know if this has been posted before (couldn't find it in search either)
Can someone make a thing of all the versions like all the + chat, + ping, +inventory etc etc in a bundle

I tried to bundle it myself but then the engine stopped working :(

Im using :GM8: PRO dunno if it matters so cause i cant find any merge thing
  • 0

#1426 joshkinchela

joshkinchela

    GMC Member

  • New Member
  • 4 posts

Posted 03 October 2010 - 08:58 AM

hi can some one help me i need to know how to add an object when i press the space bar but nothing happens i have tried to create a code like instance_create but it doesn't work can you help me i am making a Pokemon online game
  • 0

#1427 Rassym

Rassym

    GMC Member

  • New Member
  • 286 posts
  • Version:Unknown

Posted 08 October 2010 - 09:29 PM

hi can some one help me i need to know how to add an object when i press the space bar but nothing happens i have tried to create a code like instance_create but it doesn't work can you help me i am making a Pokemon online game


Dude, you have no chance at all creating a pokemon online game if you can't even make a simple code!

not to be mean but you have no chance at all as i hear it!
come back in one or a half year! :)
  • 0

#1428 _mako182

_mako182

    GMC Member

  • New Member
  • 6 posts

Posted 10 October 2010 - 03:31 PM

oi eu queria saber como fazer o servidor reconhecer o image_angle do player
porque estou fazendo um player que rotaciona

PLEASE!!!!!!!!!!!!!!
  • 0

#1429 _mako182

_mako182

    GMC Member

  • New Member
  • 6 posts

Posted 10 October 2010 - 03:32 PM

hi i was wondering how to make server recognize the player image_angle
because I'm making a player that rotates

PLEASE!!!!!!!!!!!
  • 0

#1430 Boreal

Boreal

    C++ Wackjob

  • GMC Member
  • 417 posts
  • Version:None

Posted 12 October 2010 - 09:31 PM

If you understood the engine this wouldn't be a problem. It's really simple.

Also, doing that whole huge PLEASE!!!!!!!!!!!!!! thing was totally unnecessary.

Edited by Drivinucrazy Games, 12 October 2010 - 09:32 PM.

  • 0

#1431 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 12 October 2010 - 09:46 PM

If you understood what 39DLL is doing you'd have absolutely no problem with networking.
  • 1

#1432 Orbitguy

Orbitguy

    UNS Lead Guy

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

Posted 13 October 2010 - 04:30 PM

To the guy shouting "please", what you need to do is send the player's image_angle with the movement, since it ought to be read at least as much, you then have the server then send it all out to the other player's clients.

The easiest way to do this with the engine I built off of, which was -ONLIN3-'s engine, was to simply go in the movement message, and add in image_angle being sent as well,(actually it comes with that in, but I had deleted it somehow so I had to put it back in...) then add it back on the server side. If you can't find it in blax's engine, go look in that one and see how he sends it. The specific example to look at is the online racer example packaged with that engine, since I'm positive that one sends it. Blax's probably doesn't have it since the sprites are circles and you wouldn't have to send the direction of the face, but don't quote me since I haven't looked for it.

Edited by CoolGamerX, 13 October 2010 - 04:33 PM.

  • 0

#1433 hanyunanodesudc

hanyunanodesudc

    GMC Member

  • GMC Member
  • 363 posts

Posted 23 October 2010 - 02:17 AM

To the guy shouting "please", what you need to do is send the player's image_angle with the movement, since it ought to be read at least as much, you then have the server then send it all out to the other player's clients.

The easiest way to do this with the engine I built off of, which was -ONLIN3-'s engine, was to simply go in the movement message, and add in image_angle being sent as well,(actually it comes with that in, but I had deleted it somehow so I had to put it back in...) then add it back on the server side. If you can't find it in blax's engine, go look in that one and see how he sends it. The specific example to look at is the online racer example packaged with that engine, since I'm positive that one sends it. Blax's probably doesn't have it since the sprites are circles and you wouldn't have to send the direction of the face, but don't quote me since I haven't looked for it.


Since it's image_angle, I'd rather let the clients do the estimations by themselves. Well, I guess it depends on what it's used for;;

@Delusive
merging all of them won't work since Blax changed to myinidll in like the .3v and the constants can get screwed up.
Just choose one and implement each system one by one. All it comes down to is copy pasting and changing a few little things in the code.
  • 0

#1434 Šelusive

Šelusive

    GMC Member

  • New Member
  • 6 posts

Posted 27 October 2010 - 03:14 PM


To the guy shouting "please", what you need to do is send the player's image_angle with the movement, since it ought to be read at least as much, you then have the server then send it all out to the other player's clients.

The easiest way to do this with the engine I built off of, which was -ONLIN3-'s engine, was to simply go in the movement message, and add in image_angle being sent as well,(actually it comes with that in, but I had deleted it somehow so I had to put it back in...) then add it back on the server side. If you can't find it in blax's engine, go look in that one and see how he sends it. The specific example to look at is the online racer example packaged with that engine, since I'm positive that one sends it. Blax's probably doesn't have it since the sprites are circles and you wouldn't have to send the direction of the face, but don't quote me since I haven't looked for it.


Since it's image_angle, I'd rather let the clients do the estimations by themselves. Well, I guess it depends on what it's used for;;

@Delusive
merging all of them won't work since Blax changed to myinidll in like the .3v and the constants can get screwed up.
Just choose one and implement each system one by one. All it comes down to is copy pasting and changing a few little things in the code.



Oh ok then ill have to try it myself :P
  • 0

#1435 shadowman465

shadowman465

    GMC Member

  • New Member
  • 244 posts

Posted 07 November 2010 - 04:41 PM

Hi this is a really cool engine. Thanks Blaxun

I was wondering if anyone could maybe make a tutorial on how to make enemies.

I've been trying to do it for a few days now and thought I'd just try and ask
my idea on how to make it work was that the enemies have to be server sided.
And while they are server sided they will send to each player where the enemy
is sort of like when sending where the player is. The thing is I'm just not
sure how to get it to work right. Its like I don't know how the server knows
where the player is and how it would know here to put the enemy so it knows when
to move and such.

-Thanks
  • 0

#1436 2DLuis

2DLuis

    Graphic Designer

  • GMC Member
  • 2493 posts
  • Version:GM8

Posted 08 November 2010 - 10:27 PM

I've been trying to do it for a few days now and thought I'd just try and ask
my idea on how to make it work was that the enemies have to be server sided.
And while they are server sided they will send to each player where the enemy
is sort of like when sending where the player is. The thing is I'm just not
sure how to get it to work right. Its like I don't know how the server knows
where the player is and how it would know here to put the enemy so it knows when
to move and such.


Go with client sided enemies where one client is the room controller for each room (so he is the server relaying info about those enemies in that specific room), that way you take loads of calculations off of the server. This is how most online games do it. Same thing with pickups.
  • 0

#1437 sabriath

sabriath

    12013

  • GMC Member
  • 3149 posts

Posted 08 November 2010 - 11:25 PM

Go with client sided enemies where one client is the room controller for each room (so he is the server relaying info about those enemies in that specific room), that way you take loads of calculations off of the server. This is how most online games do it. Same thing with pickups.

That's not what most games do, but it would be too complicated to teach the aspects of optimizing while maintaining security, so I won't get into that...

To do server-sided anything, which is better for security, you use the server to create the objects. When the server creates the instance of the object, the ID# GM gives that instance can be used to identify it. This number can be given to all clients as-needed, and when the client needs to communicate to the server about a specific object, it uses that # for the communication purpose.

For a pseudo example, it would look like this:
//client
send("log me in: name, **pass**")

//server after receiving that message
send("sure thing")
with(all)
{
  is this object next to player?
    yes - send(what this object is + id)
}


//client receiving those sends
what this object is = read()
server's association = read()
switch(what this object is)
{
  case for each object type:
    i = create that object
    i.sid = server's association
}


//since each object is shown to player:
//player decides to "use" an object, so
// in the "use object" event:
send("i want to use an object" + sid);

Edited by sabriath, 08 November 2010 - 11:25 PM.

  • 0

#1438 BlaXun

BlaXun

    Slime Online Creator

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

Posted 09 November 2010 - 09:19 AM

Damn, I'm back again :P
So...where are we now?
Any problems?
Did I make any mistakes in the examples?
  • 0

#1439 Roki

Roki

    GMC Member

  • New Member
  • 23 posts

Posted 10 November 2010 - 06:53 AM

Damn, I'm back again :P
So...where are we now?
Any problems?
Did I make any mistakes in the examples?


So, i was using your engine, but now i wrote my own, but i want to comment it :)
There is one problem i think. So this is top down, but sending position each step isn't good :(
My friend send position each 8 steps, and when receiving, he recive xx, and yy, then:
dis = point_direction(x,y,xx,yy)
direction = dis
image_angle = dis
if x!=xx or y!=yy
speed = 1
else
speed = 0
You know what i mean? :)
I really like your engine, it's easy to use, and easy to implement in game :P Please, continue making it, maybe new version with platform movement? Or something really cool, like in Slimes Online? :D
P.s. Sorry for my bad English, but I'm from Poland :P
  • 0

#1440 BlaXun

BlaXun

    Slime Online Creator

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

Posted 10 November 2010 - 09:35 AM

What he's doing is simulating the movement after receiving the coordinates...which would bascily ..well.. "create" a slight lag.
Don't send in step at all, send on key release and key press and send the direction with it and maybe speed and current location.

Edit: What I'd like to do next is to speculate about different types of server setups.
So far all we had was one server to do all the stuff: Sending coordinates, managing login and registering etc etc etc.
We could be more efficient if we develop different kind of server applications.

Edited by BlaXun, 10 November 2010 - 09:53 AM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users