Author Topic: Why COH will not get a server emulator.  (Read 98859 times)

TonyV

  • Titan Staff
  • Elite Boss
  • ****
  • Posts: 2,175
    • Paragon Wiki
Re: Why COH will not get a server emulator.
« Reply #20 on: January 04, 2013, 02:52:29 AM »
Boo.

Code: [Select]
1. Query the database for characters that match the desired account name,
   sorted by last logon date (descending), limit 1. Cause finding needles in
   haystacks is what SQL servers have been doing for ages and they're really
   good at it.
2. Profit!

Boo.

1. Since this is a VERY commonly used functionality, create a column per account for last logged in character.
2. Access that column when the person logs in, and update it whenever they choose a character.  You don't need a separate query to find this information.
3. Dance like it's Christmas and you were drawn by Charles Shultz.

Manga

  • Elite Boss
  • *****
  • Posts: 334
Re: Why COH will not get a server emulator.
« Reply #21 on: January 04, 2013, 04:59:18 AM »

Code: [Select]
1. Query the database for characters that match the desired account name,
   sorted by last logon date (descending), limit 1. Cause finding needles in
   haystacks is what SQL servers have been doing for ages and they're really
   good at it.
2. Profit!

If only the database query was THAT simple...  :)


Manga

  • Elite Boss
  • *****
  • Posts: 334
Re: Why COH will not get a server emulator.
« Reply #22 on: January 04, 2013, 05:04:00 AM »
It's no longer a hint if you point it out like that, but people on the Multimedia forum know very well that I intend for us to be able to make our own maps, and finish the incomplete bits that the devs left in the i24 Beta client. Their creations deserve to see the light of day as they intended.

See, now you're talking reverse engineering the client as well as the server.  The pair are designed so that the server contains as little data as possible, and sends as little traffic as possible to the client, and the client uses its massive archive of objects and data to build a world in real time.  Without the client side stuff, the "map" on the server is just garbage data.


Starsman

  • Elite Boss
  • *****
  • Posts: 286
Re: Why COH will not get a server emulator.
« Reply #23 on: January 04, 2013, 05:15:06 AM »
Boo.

1. Since this is a VERY commonly used functionality, create a column per account for last logged in character.
2. Access that column when the person logs in, and update it whenever they choose a character.  You don't need a separate query to find this information.
3. Dance like it's Christmas and you were drawn by Charles Shultz.

Now sort the character list by last played. :)
For the sake of the community: please stop the cultural "research" in your attempt to put blame on the game's cancelation.

It's sickening to see the community sink that low. It's worse to see the community does not get it.

I'm signing off and taking a break, blindly hope things change.

Tenzhi

  • Elite Boss
  • *****
  • Posts: 1,677
    • My DeviantArt Page
Re: Why COH will not get a server emulator.
« Reply #24 on: January 04, 2013, 05:16:02 AM »
This is probably important information from a technical viewpoint, but from the POV of a layperson it seems that hairs are being split.
When you insult someone by calling them a "pig" or a "dog" you aren't maligning pigs and dogs everywhere.  The same is true of any term used as an insult.

Victoria Victrix

  • Team Wildcard
  • Elite Boss
  • *****
  • Posts: 1,886
  • If you don't try, you have failed.
    • Mercedes Lackey
Re: Why COH will not get a server emulator.
« Reply #25 on: January 04, 2013, 05:19:28 AM »
This is probably important information from a technical viewpoint, but from the POV of a layperson it seems that hairs are being split.

I will go down with this ship.  I won't put my hands up in surrender.  There will be no white flag above my door.  I'm in love, and always will be.  Dido

Tenzhi

  • Elite Boss
  • *****
  • Posts: 1,677
    • My DeviantArt Page
Re: Why COH will not get a server emulator.
« Reply #26 on: January 04, 2013, 05:27:13 AM »


That is an interesting sculpture.  And I find it a particularly funny response because I nearly went with "hares" myself. :)
When you insult someone by calling them a "pig" or a "dog" you aren't maligning pigs and dogs everywhere.  The same is true of any term used as an insult.

Angelus Animi

  • Lieutenant
  • ***
  • Posts: 76
Re: Why COH will not get a server emulator.
« Reply #27 on: January 04, 2013, 05:41:17 AM »



I find this disturbing on many levels... ???

Victoria Victrix

  • Team Wildcard
  • Elite Boss
  • *****
  • Posts: 1,886
  • If you don't try, you have failed.
    • Mercedes Lackey
Re: Why COH will not get a server emulator.
« Reply #28 on: January 04, 2013, 05:52:07 AM »
It's literally called "Split Hare," it is in the Yorkshire Sculpture Park in the UK, and it is by an artist named Sophie Ryder.  She does a lot of monumental Sculptures featuring Lady Hares.  http://www.sophieryder.net/
I will go down with this ship.  I won't put my hands up in surrender.  There will be no white flag above my door.  I'm in love, and always will be.  Dido

Arnabas

  • Minion
  • **
  • Posts: 48
Re: Why COH will not get a server emulator.
« Reply #29 on: January 04, 2013, 06:11:01 AM »
You know, I don't care what it is called or how it works. If something lets me play again , I want it.

I would even be happy if the game was somehow made single-player.

dwturducken

  • Elite Boss
  • *****
  • Posts: 2,152
  • Now available in stereo
Re: Why COH will not get a server emulator.
« Reply #30 on: January 04, 2013, 06:11:34 AM »
1. Since this is a VERY commonly used functionality, create a column per account for last logged in character.

I had to read this three times before it stopped sounding like some kind of programmer punishment. Right up there with, "Copy this seven pages of code from this old copy of COMPUTE! Gazette."

Also,



Can anyone spare some Brain Bleach?
I wouldn't use the word "replace," but there's no word for "take over for you and make everything better almost immediately," so we just say "replace."

Starsman

  • Elite Boss
  • *****
  • Posts: 286
Re: Why COH will not get a server emulator.
« Reply #31 on: January 04, 2013, 06:12:45 AM »
It's literally called "Split Hare," it is in the Yorkshire Sculpture Park in the UK, and it is by an artist named Sophie Ryder.  She does a lot of monumental Sculptures featuring Lady Hares.  http://www.sophieryder.net/

A furry that is actually respected as an artist by society?!  :o
For the sake of the community: please stop the cultural "research" in your attempt to put blame on the game's cancelation.

It's sickening to see the community sink that low. It's worse to see the community does not get it.

I'm signing off and taking a break, blindly hope things change.

Tenzhi

  • Elite Boss
  • *****
  • Posts: 1,677
    • My DeviantArt Page
Re: Why COH will not get a server emulator.
« Reply #32 on: January 04, 2013, 06:20:12 AM »
A furry that is actually respected as an artist by society?!  :o

Such art is historically highly sought after.  In ancient Egypt, for instance.
When you insult someone by calling them a "pig" or a "dog" you aren't maligning pigs and dogs everywhere.  The same is true of any term used as an insult.

Victoria Victrix

  • Team Wildcard
  • Elite Boss
  • *****
  • Posts: 1,886
  • If you don't try, you have failed.
    • Mercedes Lackey
Re: Why COH will not get a server emulator.
« Reply #33 on: January 04, 2013, 06:24:48 AM »
A furry that is actually respected as an artist by society?!  :o

Here's the lady herself.



I think she's more about mythic images.  I could go on at some length about the hare in celtic, greek, and other myth, but I don't want to bore you.
I will go down with this ship.  I won't put my hands up in surrender.  There will be no white flag above my door.  I'm in love, and always will be.  Dido

krtbuni

  • Underling
  • *
  • Posts: 11
Re: Why COH will not get a server emulator.
« Reply #34 on: January 04, 2013, 07:16:05 AM »
I've heard a fair bit about it. =>.>=


Reiraku

  • Boss
  • ****
  • Posts: 134
Re: Why COH will not get a server emulator.
« Reply #35 on: January 04, 2013, 07:36:28 AM »
You know, I don't care what it is called or how it works. If something lets me play again , I want it.

I would even be happy if the game was somehow made single-player.

This is me, right here.

For anyone working on it, you have my thanks.

The Fifth Horseman

  • Elite Boss
  • *****
  • Posts: 961
  • Outside known realities.
Re: Why COH will not get a server emulator.
« Reply #36 on: January 04, 2013, 01:15:21 PM »
Now sort the character list by last played. :)
0. Since you already have a field storing last activity date for each character, you can add an index on it to speed up the query.
1. SELECT * FROM characters WHERE account=<account ID> ORDER BY last_active DESC

If only the database query was THAT simple...  :)
Yes, it is. If you're selecting by account name and not ID, it will need an extra JOIN and that's that.
1. SELECT <fields> FROM characters JOIN accounts ON characters.account=accounts.id WHERE accounts.name=<account name> ORDER BY last_active DESC LIMIT 1
We were heroes. We were villains. At the end of the world we all fought as one. It's what we did that defines us.
The end occurred pretty much as we predicted: all servers redlining until midnight... and then no servers to go around.

Somewhere beyond time and space, if you look hard you might find a flash of silver trailing crimson: a lone lost Spartan on his way home.

Codewalker

  • Hero of the City
  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 2,740
  • Moar Dots!
Re: Why COH will not get a server emulator.
« Reply #37 on: January 04, 2013, 02:00:00 PM »
0. Since you already have a field storing last activity date for each character, you can add an index on it to speed up the query.

And since the character table will be the most used table in the database, then indexes on it will very likely be in the memory cache at any time other than right after server startup. So index queries against it are very, very cheap.

Quote
1. SELECT * FROM characters WHERE account=<account ID> ORDER BY last_active DESC
Yes, it is. If you're selecting by account name and not ID, it will need an extra JOIN and that's that.
1. SELECT <fields> FROM characters JOIN accounts ON characters.account=accounts.id WHERE accounts.name=<account name> ORDER BY last_active DESC LIMIT 1

That's assuming the accounts are in the same database, which they wouldn't be -- there's no reason for every shard to have the master account list in its own database, and it would be a security risk for it to have direct access to that table anyway. Presumably the dbserver would already have the account ID on hand, probably passed in a token from the authentication server.

Leandro

  • Elite Boss
  • *****
  • Posts: 310
Re: Why COH will not get a server emulator.
« Reply #38 on: January 04, 2013, 02:15:06 PM »
See, now you're talking reverse engineering the client as well as the server.

Actually, the client has a built-in map editor mode, so there was no reverse engineering involved. The map format is human readable (as you can see in the linked thread), and the client reads maps from .txt files from the "data" overrides folder. We don't need to disassemble the client or touch one byte on it in order to create and include new maps; the COH client is very, very, very mod-friendly.

It's true that Codewalker posted a binary patch so people could load maps right now, but that was just a case of "gimme NAO!" and not a necessity. With the server in place, the client doesn't need to be touched in order to create new maps; it's one of the things it can naturally do.

Codewalker

  • Hero of the City
  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 2,740
  • Moar Dots!
Re: Why COH will not get a server emulator.
« Reply #39 on: January 04, 2013, 02:16:37 PM »
It's true that Codewalker posted a binary patch so people could load maps right now, but that was just a case of "gimme NAO!" and not a necessity. With the server in place, the client doesn't need to be touched in order to create new maps; it's one of the things it can naturally do.

Maps load just fine without that patch. The only thing the patch is needed for is if you want to create new scenes (skyfiles), or add new meshes (which we don't yet have a tool for doing).