Author Topic: Technical side discussion  (Read 64344 times)

Prism Almidu

  • Lieutenant
  • ***
  • Posts: 84
Technical side discussion
« on: June 20, 2015, 05:53:21 PM »
Well, as long as we're posting speculation, this quote by Leandro "You can make the COH client connect directly to a dbserver, skipping the authserver entirely, and have full functionality." on this reddit page: https://www.reddit.com/r/Cityofheroes/comments/39fpnj/coh_server_emulator_project/ makes me think of combat functionality in a single player mode, assuming that the dbserver does what I think it does, i.e., holds data related to power numbers, enemy spawn placement, NPC health, and such. I could be completely wrong, I'm just speculating here :P

Codewalker

  • Hero of the City
  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 2,738
  • Moar Dots!
Re: Coming Soon
« Reply #1 on: June 20, 2015, 06:22:14 PM »
The dbserver does none of that. Its most important function is to handle loading and saving characters from a database, presenting them to the client to show the character list at login, and transferring them between maps. Powers, spawn points, etc. in COH are not part of the database.

The dbserver would also normally handle cross-map chat, but in this project that functionality is not needed for what are hopefully obvious reasons.

Prism Almidu

  • Lieutenant
  • ***
  • Posts: 84
Re: Re: Coming Soon
« Reply #2 on: June 20, 2015, 06:29:52 PM »
I see. My mistake, then. What DOES handle the number side of things, then, if you don't mind my asking? Also, I had a question about the way enemy spawns worked. In Icon, I can open the dev/debug mode and see all the markers, and see what I think are enemy spawn points marked as E1, E2, etc. However, and it may just be poor memory on my part, but I don't recall street spawns being in clumps of 8 or so. Are the E# markers just potential spawns, and the game would randomly pick which ones to use in any given spawn group?
« Last Edit: June 20, 2015, 06:43:15 PM by Prism Almidu »

Codewalker

  • Hero of the City
  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 2,738
  • Moar Dots!
Re: Re: Coming Soon
« Reply #3 on: June 20, 2015, 06:40:46 PM »
That's all part of the mapserver, which is responsible for player input, chat, movement, physics, AI, character stats, powers, emotes, animation, network communication, combat mechanics, missions, story arcs, rewards tables, NPC pathing, auctions, inventory management, the kitchen sink, and probably about 200 more things that I'm forgetting to mention.

The powers data itself is in structured binary files, the format of which has been long understood and are what powers things like City of Data and Mids.

Prism Almidu

  • Lieutenant
  • ***
  • Posts: 84
Re: Re: Coming Soon
« Reply #4 on: June 20, 2015, 06:45:48 PM »
Interesting, quite interesting. Not a programmer, simply very curious about all sorts of things. Though I did post an additional question question as an edit before seeing your response, sorry.

Codewalker

  • Hero of the City
  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 2,738
  • Moar Dots!
Re: Re: Coming Soon
« Reply #5 on: June 20, 2015, 06:50:54 PM »
Those markers are potential spawn points. Each of those clusters is an entry from the "object library" (shared components that can be pasted into a map) which contains a bunch of spawn points that get dropped into place on a map. Based on the names of the object library entries, "encounter group" is the right terminology for a cluster of spawn points.

The maps themselves contain references to spawndef files alongside those encounter groups, which presumably tell the server which of those spawn points to use (depending on team size and difficulty), and what to spawn there. The spawndefs were server-side only and do not exist in the client data.

The groups seem to be overlapped quite often, so it's likely that not all of the groups get spawned, but the server decides according to some algorithm which ones it's going to use.

Prism Almidu

  • Lieutenant
  • ***
  • Posts: 84
Re: Technical side discussion
« Reply #6 on: June 20, 2015, 06:55:08 PM »
I see. Thank you for assuaging my curiosity.

Ironwolf

  • Stubborn as a
  • Elite Boss
  • *****
  • Posts: 1,503
Re: Technical side discussion
« Reply #7 on: June 22, 2015, 08:41:29 PM »
Could you build these as stand-alone "Hive" servers?

I am curious as DayZ servers often have persistant hives. You can have a different character server-toserver but your bank and other benefits are usuable on other servers.

I am just thinking if you could hive servers to provide different functions. One server is the chat and other functions - one is combat - one is the market and so on. I am curious due to the benefits this would have for development.

Arcana

  • Sultaness of Stats
  • Elite Boss
  • *****
  • Posts: 3,672
Re: Technical side discussion
« Reply #8 on: June 22, 2015, 09:27:09 PM »
Could you build these as stand-alone "Hive" servers?

I am curious as DayZ servers often have persistant hives. You can have a different character server-toserver but your bank and other benefits are usuable on other servers.

I am just thinking if you could hive servers to provide different functions. One server is the chat and other functions - one is combat - one is the market and so on. I am curious due to the benefits this would have for development.

The short answer is obviously: yes.

But your question has some implied facets to it that are rather complex.  For one thing, at the moment there's no such thing as server persistence, because as described the state of the system is likely being stored locally.  So currently, the only persistence that can exist is what each individual player's client remembers (like the state of character slots, for example, which they seem to have hacked into the client-side software).

More generally, XMPP servers can be clustered with known techniques, and most seem to have the ability to have modular components added to them to add functionality.  Stating for the record that this is as much a developer-preference thing as anything else, I believe that if the project continues along and Codewalker continues to add both functionality and scalability, the most likely architecture he'd pursue would be one where the primary communications hub was clustered if necessary (XMPP servers can handle a lot more connected clients than City of Heroes mapservers and whole game servers could ever handle, so clustering might not be necessary from a performance perspective), and a separate, modular system for adding enhanced functionality that could plug into the base XMPP server's message processing.

However, I have a feeling that most of the work Codewalker will be focused on in the short term is enabling client-side features that require limited or no central processing to make work, which means server-side concerns will probably be theoretical for a long while.  It depends on how much functionality is already there, but knowing Codewalker I believe he's releasing this as soon as he believes he has sufficient functionality to be workable with minimal feature holes between the functionality.  That almost certainly means there's tons more things he can do: he wouldn't wait to release until every last thing was working.

Put it this way: before we see "real" combat, I suspect we'll see "fake" combat first.  From what I can deduce from what's being described, I'll bet Codewalker is (if he hasn't already, of course) dying to make powers work at least visually, and perhaps even physically (as in: using the local client-side physics engine).  Its a lot easier, albeit not easy, for Codewalker to add functionality that would allow us to activate a power, like "powexec_name Power_Blast target_name" and have the software send that message to the XMPP server, so that both you and everyone else sees the animation, FX, and sound effect played for that power when its directed at "target_name."  Nothing would happen, because there's no central server keeping track of health bars, so you can't defeat the target or even hurt it, but you could see a power "work" in that sense.  You might even be able to trigger knockback, although there are security/griefing issues to resolve when allowing that player to player (player to NPC, on the other hand, seems at least plausible).

That could happen without a central server, and therefore without having to solve the problem of central mapservers or even a combat engine.  But since Codewalker has already stated he doesn't have movement mode bits working yet for Fly, its probable this is a City of Jabber 2.0 or even 3.0 feature.  But I know Codewalker can do it with the system he's not-describing, and its the logical outgrowth of the work he's done with Icon and the XMPP system, and its a very likely waypoint between here and eventual combat.

Nightsjester

  • Minion
  • **
  • Posts: 30
Re: Technical side discussion
« Reply #9 on: June 23, 2015, 09:11:15 PM »
I just had a thought pop into my head, I know you guys are not ready to detail the full technical info on this project but I am curious if its possible to have hooks in place for character information beyond costumes like xp inf power choices etc. or even just awareness of what powersets were chosen at character creation? The reason I ask is because this could open up the game to new neat possibilities like a character api  or some kind of app to connect and interact with the game world/characters outside the client.

Rejolt

  • Elite Boss
  • *****
  • Posts: 512
  • Infinity Server 2005-2012
Re: Technical side discussion
« Reply #10 on: June 24, 2015, 09:15:32 AM »
So I can trigger X attack on target Y and get Z effect even though no damage is being scored. It would make role playing more visual as long as we had stagger/drunk/faint emotes lol
Rejolt Industries LLC is now a thing. Woo!

Arcana

  • Sultaness of Stats
  • Elite Boss
  • *****
  • Posts: 3,672
Re: Technical side discussion
« Reply #11 on: June 24, 2015, 09:49:37 AM »
So I can trigger X attack on target Y and get Z effect even though no damage is being scored. It would make role playing more visual as long as we had stagger/drunk/faint emotes lol

Hypothetically.  Codewalker is nowhere near that yet, or even close enough for anyone else to add directly yet I believe.  Its theoretically within the limits of the technology based on the outer bounds of what he's accomplished so far.  I just want to be clear my theoretical musings shouldn't get conflated with what Codewalker is prepared to release at any time.

The Fifth Horseman

  • Elite Boss
  • *****
  • Posts: 961
  • Outside known realities.
Re: Technical side discussion
« Reply #12 on: June 24, 2015, 10:00:52 AM »
Hypothetically.  Codewalker is nowhere near that yet, or even close enough for anyone else to add directly yet I believe.  Its theoretically within the limits of the technology based on the outer bounds of what he's accomplished so far.
Unless I'm missing the point, the client side of SOON is based on reverse engineering the client/server protocol sufficiently to send arbitrary information to the client.

Just the parts we know about look like a strong foundation for a fully functional community server at some point down the line.

Hmm... if either the source for SOON or the documentation for the API used by it were released at some point, the potential implications would be... interesting.
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.

Ironwolf

  • Stubborn as a
  • Elite Boss
  • *****
  • Posts: 1,503
Re: Technical side discussion
« Reply #13 on: June 24, 2015, 01:03:06 PM »
Hypothetically.  Codewalker is nowhere near that yet, or even close enough for anyone else to add directly yet I believe.  Its theoretically within the limits of the technology based on the outer bounds of what he's accomplished so far.  I just want to be clear my theoretical musings shouldn't get conflated with what Codewalker is prepared to release at any time.

You see my question on the "Hive" server idea is that if say some interested people wanted to make an "approved" server to join the group then you have a distributed server group by geography and little to no server costs to any one entity. You could join the server that gave you the best ping/least lag.

I guess what I am thinking is you eliminate the ability to shutdown the game easily and also make the running of the game fairly cheap as I know you can rent a decent server for under $50 a month. Once you have console permissions and if you can make an approved Client install - this would seem to be an ideal way to proceed.

Arcana

  • Sultaness of Stats
  • Elite Boss
  • *****
  • Posts: 3,672
Re: Technical side discussion
« Reply #14 on: June 24, 2015, 06:01:57 PM »
You see my question on the "Hive" server idea is that if say some interested people wanted to make an "approved" server to join the group then you have a distributed server group by geography and little to no server costs to any one entity. You could join the server that gave you the best ping/least lag.

I guess what I am thinking is you eliminate the ability to shutdown the game easily and also make the running of the game fairly cheap as I know you can rent a decent server for under $50 a month. Once you have console permissions and if you can make an approved Client install - this would seem to be an ideal way to proceed.

There would be technical hurdles to overcome, like interserver lag and bandwidth, in the unlimited generic case.  But that might not be completely necessary because the game itself placed some limitations on us in the first place.  We had to log into a specific server.  And on that server, we had to stand in a specific zone.  There's no reason why someone couldn't set up a "private server" that in effect was the mapserver for a private zone, sort of like a base or mission instance, that they could invite friends into, and if desired "zone out" to a public zone when they were willing and able to connect to a public server.

From what I've heard so far, it seems the actual "server" is a fairly generic XMPP server with a specific configuration, but not special code.  Its the client-side element of this system that has the special software to translate client actions into XML chunks.  They are probably exercising some level of control in the embryonic stages of this project which might prevent this sort of thing from happening easily, but I believe the hive-distributed architecture you're thinking about already implicitly exists in what they've already built.  Its just a question of figuring out the best way to make those features work in a way that keeps the community together rather than promoting fragmentation, at least while its still spinning up.

Ironwolf

  • Stubborn as a
  • Elite Boss
  • *****
  • Posts: 1,503
Re: Technical side discussion
« Reply #15 on: June 24, 2015, 07:24:38 PM »
That is just what I am thinking other than street sweeping everything is instanced - so if you let local servers handle the instances only requiring linking and updates as you zone back to the main server or in regularly scheduled pings to keep things sync'd. We have similar things here where I work to refresh IP addresses across the enterprise. It polls every few minutes to keep from duplicating addresses and if we change our connection across switches quickly - we occasionally need to run an ip config /renew so it updates.

I am not sure other than as with the DayZ servers they have to link to Steam - in this case to your version of Steam as it were. You will need some version of security handshaking to protect your central server from rogues. That is why I was saying the local servers would be required to be registered and updated.

Felderburg

  • Ask me how I got this title!
  • Elite Boss
  • *****
  • Posts: 1,590
  • Personal text? What's that?
Re: Technical side discussion
« Reply #16 on: July 02, 2015, 02:57:51 PM »
I just had a thought pop into my head, I know you guys are not ready to detail the full technical info on this project but I am curious if its possible to have hooks in place for character information beyond costumes like xp inf power choices etc. or even just awareness of what powersets were chosen at character creation? The reason I ask is because this could open up the game to new neat possibilities like a character api  or some kind of app to connect and interact with the game world/characters outside the client.

That would be pretty cool. Although until someone builds a web browser compatible costume creator, I'm not sure what use it would be before the game returned, since the only relevant info is the costume (as opposed to badges, level, power sets and such, which would be relevant to players of an actual game).

Although I suspect you could get a website that took the costume piece text strings and displayed pictures of them, to get an idea of what a character is wearing when you view it on a mobile device.

As for interacting with the "game world" outside the client, you can already do that; using a regular XMPP chat program, you log in like it's a chat room. Can't see anyone, but you can talk.
I used CIT before they even joined the Titan network! But then I left for a long ol' time, and came back. Now I edit the wiki.

I'm working on sorting the Lore AMAs so that questions are easily found and linked: http://paragonwiki.com/wiki/Lore_AMA/Sorted Tell me what you think!

Pinnacle: The only server that faceplants before a fight! Member of the Pinnacle RP Congress (People's Elf of the CCCP); formerly @The Holy Flame

slickriptide

  • Elite Boss
  • *****
  • Posts: 354
Re: Technical side discussion
« Reply #17 on: July 09, 2015, 07:17:22 PM »
Simple question - Is the protocol documented someplace such that a bot could simulate a client when talking to other clients?

If it's not obvious, what I want is to make a chatbot that has an avatar in the game and the ability to "speak" or emote as if it was a player. In other words, a kind of XMPP-based NPC.

As I understand things, at the current time a "player" is a collection of costume bits and a set of map coordinates.

Is that about the size of things?


Codewalker

  • Hero of the City
  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 2,738
  • Moar Dots!
Re: Technical side discussion
« Reply #18 on: July 09, 2015, 07:22:31 PM »
Yes, it should be possible for a bot to log into XMPP and pretend to be a player. The protocol doesn't have any formal documentation yet, but if someone wants to write some I can definitely help with that. Wiki article maybe? Just need somebody with an understanding of XML structures and technical writing.

Arcana

  • Sultaness of Stats
  • Elite Boss
  • *****
  • Posts: 3,672
Re: Technical side discussion
« Reply #19 on: July 09, 2015, 07:57:26 PM »
Yes, it should be possible for a bot to log into XMPP and pretend to be a player. The protocol doesn't have any formal documentation yet, but if someone wants to write some I can definitely help with that. Wiki article maybe? Just need somebody with an understanding of XML structures and technical writing.

I'm probably about 30% there.  If you have a schema or something, I could take a swing at it.  I think have the basics of pc:presence and pc:character Presence stanzas and the pc:u Message stanzas.  I don't have any of the Iq stuff yet.  I'm probably 75% of the way to a MirrorBot, where the bot can clone character appearances (since I don't know how to send costume data yet, but I'm close to being able to send hashes).  I thought MirrorBot would be plenty spooky enough.