HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Hiro_Protagonist

Pages: [1] 2
Holy crap I was just going to post this question!

I created new versions of E_PlayerAccount and E_PlayerCharacter (MO_PlayerAccount and MO_PlayerCharacter), on both the client and server side. I copied the code from the E_ versions and updated the account and player prototypes (created the prototype as well). All good so far. I deleted my characters and created a new one, and it has the proper MO_PlayerCharacter class. However, my account node is not updated. I use the CLI and added my class (mnac) to the account, and then tried to remove the E_PlayerAccount class via mnrc. MNRC reported everything OK, but Show Node (SN) reports elsewise. I know this would clear up if my account was recreated but 1. I don't know how to do that and 2. All the devs would have to do the same, just seems like a major PITA.

To answer the OP, changing the prototype in HE_UsePrototypeForAccountRootNode only works when the account is created. My follow up questions are:

1. How would you change the root node?
2. Should you change the root node? As in, is this more trouble than it's worth, and should I instead just adopt E_Player[Character|Account] as my own and modify those for our game?

GUI Creation / Re: Layer Manipulation
« on: Mar 17, 14, 12:11:32 AM »
in the hideAllOtherLayers() you need to pass in the current layer or the layer you wish to keep. Otherwise it wont work.

Interesting. I figured it would know what layer to keep based on the fact that it is a method of a layer. So I need to do something like:

var layer = me.getMyLayer()


I was just playing with this myself, and indeed, it seems that reverse replication only works for server->server proxies. I'm getting identical results. For my changes, I'm using RPC to relay the changes from client back up to server, with the server still replicating changes back to me.

Thanks for the input, but unfortunately it doesn't really answer my question. I get proxyForward and proxyLocal with server to server replication. No problems there- I have read that article several times trying to figure this out :)

My real question is: do these modifiers apply in Server->Client replication? There is no documentation that says they would, and since the classes we are replicating exist in two separate DOMs, my guess is that they do not apply.

The second question is related- since you can replicate a server node of class Foo to another server node of class Bar, how do proxyLocal/Forward interact in this scenario? If Bar has a method declared proxyForward, that Foo does not have, what happens?

GUI Creation / Layer Manipulation
« on: Mar 13, 14, 04:44:17 PM »
Hey, I'm playing with the Layer mechanics, and they don't seem to be doing anything. I have created my own class to override the functionality in $GUI, MO_GUI (based on E_GUI), and adjusted the system node. I added my own override for HE_validGuiLayersList, with a new "dashboard" layer:

Code: [Select]
method HE_validGUILayersList() as List of String 
  layers as List of String

  add back "bottom" to layers
  add back "nameplates" to layers
  add back "default" to layers
  add back "game" to layers
  add back "dashboard" to layers
  add back "cinematics" to layers
  add back "guieditor" to layers
  add back "guieditorutilities" to layers
  add back "alert" to layers
  add back "hotspot" to layers
  add back "tooltips" to layers
  add back "contextmenu" to layers
  add back "cursor" to layers
  return layers

Then I created a function to show a requested dashboard. The prototype's topmost control is set to layer=dashboard:
Code: [Select]
method ShowSystemAreaDashboard(dashboardControl as String)
  // Hide all the other stuff
  // Find the specified gui control
  dashboard as NodeRef of Class GUIControl = FindGUIControlByName(0, "dashboard." + dashboardControl)
  // Destroy it, we're going to rebuild it
  if dashboard != None
  // Create a new dashboard.
  dashboard = CreateNodeFromPrototype(dashboardControl)
  dashboard.build = true
  // Hide all the non dashboard layers
  var layer = dashboard.getMyLayer()

Which all makes sense to me, but it doesn't work. When I call ShowDashboard, the dashboard shows up but none of the other layers are hidden. The Wiki is kind of out of date with the Layer stuff, at least the "Layer State Snapshots" part that says the actual layer object has _pushGUILayerState, but now the $GUI system node has it. So that said, I'm definately doing something wrong. I want to show my dashboard, hide everything else, and then call HideDashboard and restore the other GUIs.

Thanks again for your help!

I made two topics for these questions to make them easier to search later on.

My second question is proxyLocal/proxyForward and server-client replication. I totally get what those modifiers do on server<>server replication. But I can't find anything about client<>server. Do these have any use in client-server, or documented behavior? Since you have to map the server class to a client class (Destination Class (Client)), seems like you could not guarantee both DOM definitions would have the same methods, but you can also map server-server nodes to different classes (Destination Class (Server)), which would seem to me to have the same problem. Can anybody give me the lowdown on this? What happens if a proxyForward method on your destination class has no counterpart on the source class? Is this detected by the compiler, throw a script error, or just unguaranteed behavior?

As a note, in the wiki, it states that calling a method on a proxied node without one of these modifiers will produce a script error. I am calling a method on client proxied nodes without issue, so it seems that the proxy modifiers are only for server-server replication, but I'd like to know all the ins and outs.

I just got replication working pretty much how I want it to, and for the most part everything is working awesome.

I have two quick questions that I can't seem to figure out. To make searching and answering easier, I've made two separate topics.

First question: My debugging messages are all doubled! Once I enter the area and the nodes start replicating, I get doubled debug messages such as below (GlobalDataAnchor is the primary node in my replication group)

[Debug] [GlobalData](GlobalDataAnchorClassMethods) _SO_appeared event raised
[Debug] [GlobalData](GlobalDataAnchorClassMethods) _SO_appeared event raised
[Debug] [GlobalData](GlobalDataAnchorClassMethods) client added to replication
[Debug] [GlobalData](GlobalDataAnchorClassMethods) client added to replication
[Debug] [GlobalData](GlobalDataAnchorClassMethods) Recieved proxied node 9223372057563021553
[Debug] [GlobalData](GlobalDataAnchorClassMethods) Recieved proxied node 9223372057563021553
[Debug] [GlobalData](GlobalDataAnchorClassMethods) Classes on proxied node: GlobalDataAnchor
[Debug] [GlobalData](GlobalDataAnchorClassMethods) Classes on proxied node: GlobalDataAnchor
[Debug] [GlobalData](GlobalDataAnchorClassMethods) Recieved proxied node 9223372057563021565
[Debug] [GlobalData](GlobalDataAnchorClassMethods) Recieved proxied node 9223372057563021565
[Debug] [GlobalData](GlobalDataAnchorClassMethods) Classes on proxied node: AttributeDefinition
[Debug] [GlobalData](GlobalDataAnchorClassMethods) Classes on proxied node: AttributeDefinition
..... etc.

All the code is based on the Replication Tutorial. I only have a single replication group (\qn in the console confirms), and I'm sending these via $debug.SendNotifyDebugMessage. All my other debug messages are singular, but everything dealing with replication is doubled. I kind of thought it might be a client/server issue but then I'd expect the order to be messed up. Anybody have any ideas as to what is going on?

GUI Creation / Re: Pattern for an Editor GUI?
« on: Mar 11, 14, 11:46:10 PM »
RPC would definitely work, it just seems like more work than necessary when you have Replication available. The only way I can think of to get the data to the client in order to edit it is via an extra set of server->client RPC calls with a big parameter list. What are you doing to get the data to the client when you need it?

GUI Creation / Re: Hiding Tab Panels in the GUI Editor
« on: Mar 11, 14, 03:46:18 PM »
I knew there was something basic I was missing. Thanks, so much better now.

GUI Creation / Hiding Tab Panels in the GUI Editor
« on: Mar 11, 14, 12:25:49 PM »
Quick question: I am creating a tabbed GUI, based on the wiki (http://hewiki.heroengine.com/wiki/GUI_Tabs). However, it is really difficult to actually build the content in the tabs because everything is visible- I see all the tabs all the time, overlapping. Other GUI editors allow you to hide the tabs so you can edit just one at a time- HE must have this so I must be missing something basic, but for the life of me I can't figure out how to make this easy!

Edit: things I've tried:
Set the panel to visible=false
Set the panel to enabled = false
Right click everywhere

Last remaining idea:
Build the tabs as separate GUIs and add them dynamically to the tab set. This seems like major overkill though.

GUI Creation / Pattern for an Editor GUI?
« on: Mar 11, 14, 12:19:51 PM »
Hey, I'm hoping somebody can point me in the right direction a bit.

I have some nodes on one particular server that hold some dynamic data- they have to be normal nodes, not prototypes. Ordinarily, these nodes sit around and only the server and some other servers know about them- they are not replicated to the client.

I need to make a GUI that allows you to edit these nodes, and I'd like to know what the general pattern for this is?

I think what I need to do is set the nodes up to be replicated to the client (when I am in that particular area). I can then build a GUI based on the proxies. Changes to the data in the client proxy nodes should be replicated directly to the Server nodes. For some reason, it seems like there are complications involved here, though. I appreciate any guidance you can give me!

Thank you both for your input. In my particular case, I think either method would work fine, I am mostly concerned as we have several systems that will have the same issues and I want to know how to properly balance the pros and cons when we get to designing them. I will probably play with both at this point as the cost of change is very small and the learning value is very high.  :)

Scripting & Programming / Re: Lost in spec oracles =[
« on: Mar 02, 14, 12:50:10 PM »
Funny, I am having the EXACT same problem right now!

I created my own Hotspot class, MO_HotSpot, and glomed that onto the $HOTSPOT node. Then I dove into the HJRef because CleanEngine does not seem to have an override example already set up, and grabbed the HE_buildHOtSpotGUI method out of the HJHotSpot class- this is key.

Everything I've done since then- trying to copy the Hotspot gui into my own copy- has caused things to break. Fortunately, you should be able to revert by simply commenting out the HE_buildHotSpotGUI method in your override- it has saved me several times already.

On a related note, I have been trying to check out the GUIXML in the HJRef world, and it looks like there is nothing there- the script picker for GUIXML is empty. Anybody know if that is a security thing put in place to avoid you screwing with HJRef, or is it a bug in the world? I've been wanting to look at the hthotspotgui.xml file and figure out why mine is broken.

Thanks for the well-thought out reply, keeper. I think the only thing that may not be clear is that all the data in the system area that I am talking about would only be replicated between the area servers- not to the client. So the trust issues are not a problem- any time the client would actually make use of this data it would be via RPC. I'm using a generic spec system for all the actual client-side data.

The condensed version at this point is I want to distribute mutable data between all the area servers in the cluster. I will have a single master system area that manages the data, all the others would simply read the data. In this case, it seems (to me) that replication is a viable (even preferable) option vs. RPC, although both would work.

From there make changes just to the system area's values. You will end up making a bunch of calls to this system area, as any time the values need to be used you would want to look to the values stored at that time in the system area.

It's going to be a hit but one you will just have to take, there is no point to cache the data to the client. If it's changing that frequently, cause you going to spend more time sending the data then just making a call to retrieve it. It's a fine line of balance here, but assuming you have cool downs, etc for skill use you probably would end up caching about as often as you are updating. Also it would have to be put to the area glom for checking as well.

I'm pretty sure I understand the design you are recommending, which is very similar to what I have in mind except you are recommending RPC instead of replication. This would indeed result in a bandwidth hit, especially without some kind of caching layer- that would not be too bad, I could simply set a timer to update the cache every five minutes or so. My question- simply for my own elucidation- is why not use replication to distribute the data in the system area? Obviously, having all other areas have a copy of this data increased the memory footprint, but it would seem to me to be very bandwidth conservative. Once the nodes are proxied, the replication system should only ever be sending out delta packets, which would only happen when the data is changed.

Thanks for sticking with me on this stuff!

Pages: [1] 2