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

Author Topic: $EDIT on a live server  (Read 1448 times)

nocake

  • General Accounts
  • *
  • Posts: 404
    • View Profile
    • BlightMMO
$EDIT on a live server
« on: Mar 05, 15, 12:12:05 PM »

I have a housing system with tiled walls, similar to that of "The Sims".

Currently when committing the house to the Area I use $EDIT._GotEditRequest()

Will this be practical to use on a live server with in a seamless world?
 

For my house item placement system I use SAS and buckets. House Items are things placed within the house and accessed often as opposed to the House Objects(walls/floor) which should only be added or removed when a player exits the house building mode.

Should I just use the same approach for the House Objects as I do the House Items?

Might be worth noting that this will be an FPS oriented game so frames and loading are very important to me. I am assuming writing to the $EDIT is a better approach. Any insight is helpful. Thanks.


« Last Edit: Mar 05, 15, 12:13:47 PM by nocake »
Logged

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: $EDIT on a live server
« Reply #1 on: Mar 05, 15, 08:15:36 PM »

Well one question is is the area an instance setup? Or is it one area per house group?

I ask cause it appears you are trying to save the house to the area. Not ideally the best option as each house would have an area. Unless you are using the SAS to hide the housing from others, but even then you will need someone to build multiple instances as one area won't hold all that data well.

Is the main point to save the data to the area? If so you should really be using an ARN to save the house information and attaching that to a player most likely. Then just run a small system that keeps tabs on who's house is which ARN so you can load it without the player being online.

So long story short need to be clear on why you are saving the house to the area, now the exception to that is if you are doing real world placement. Where the world is set and there are set number of houses present. But at that point you wouldn't really be using SAS as much. At that point would be probably best though to still have the house as an ARN just would be setting the area up to be aware of the ARNs hanging off. I say that just so you could allow house ownership and such to pass easier, etc.

So can you give us just a tid bit more info, so we can make sure things get engineered in a way you want?
Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

nocake

  • General Accounts
  • *
  • Posts: 404
    • View Profile
    • BlightMMO
Re: $EDIT on a live server
« Reply #2 on: Mar 05, 15, 08:50:46 PM »

Houses are placed with in the world. No instancing.
Foundation, Walls and Tiles. All present in a seamless world.

My House Items are associated to the ARN.

As of right now the $EDIT command works perfectly within HEBlade. For a live server I could see myself sending the command to both the EDIT ( 0 ) instance and the single Play Instance ( 1 ) at once. One to the play instance to update clients currently in the area and the other to the EDIT so upon next area reload the changes will still be in effect.

These requests will be made only when a player edits their house which shouldn't be frequent.

I guess what I am really asking is can the $EDIT command be used on live servers?


« Last Edit: Mar 05, 15, 08:53:00 PM by nocake »
Logged

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: $EDIT on a live server
« Reply #3 on: Mar 06, 15, 10:00:38 AM »

I could be wrong, but I don't think it will work in play areas, and your players will always be in a play area. You should be able to test this, though just load up the player client for your game world and give your command a test. etc.

To do a dynamic aspect like that i think you are going to have to build the ARN that holds the housing data, then when an area spins up it knows to go look for that arn and load it real time, on spin up. It will then use the SAS to determine who sees what houses / ARNs.

The area itself really wouldn't be holding the data beyond what ARNs to look up. So in your area spin up process you would look to a data node that said this area has these house ARNs so load them into the game world, using data in them to position or anchor them where they should be etc. You will want to use the spec system so you are just referencing the specKeys on the client which will be replicated to the Local repository, that can quickly load the houses etc for players.

That is semi how the Edit works anyways, when you making changes the server is just sending the changes you made to the other clients of the edit instance, and then all the edit does is save the .dat file which is really just a short cut way to deal with lots of changes. It's like taking a database log file (IE all of your changes) and backing up then truncating the log file. When a new player enters the instance they don't have to step through all of the changes, instead they just start at the last .dat file save and move forward from there. In a really bad not totally overly technical way of explaining it.

Problem to also think about is player abuse of the area. Even if you can save it to the area question is should you. I would totally just to be a jerk, have me and about 50 of my friends all make rapid edits to a group of houses we own in an area. If you are trying to save all of that to the area via the area then repush the data back out ot all the clients, it's going to be a nasty day. Since saving / rebuilding the area isn't really SAS aware as far as I think, that would mean it would update to all players after the save, or it wouldn't update at all cause they already have a .dat file in use and are watching for just the modifications to that base .dat file.

So please do test it cause this is just my understanding and while rare I have been wrong before. But this is also the general gist of the housing tutorial from the wiki as well. So I think i'm somewhat close.

HE-Devs please feel free to set things straight about it though. I haven't spent much time testing $edit in play mode areas. Or more importantly out side of heroblade, aka the player client.
Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

nocake

  • General Accounts
  • *
  • Posts: 404
    • View Profile
    • BlightMMO
Re: $EDIT on a live server
« Reply #4 on: Mar 06, 15, 01:16:32 PM »

My question really isn't approach as much as will it work on a live server.

As I said my approach now seems to have no flaws even when used within a Play Instance.

If commits become a problem I can always save a command log and put them behind a timer, tell the player "house will update in a few minutes"

I realize that SaS and Bucket systems are the best practical approach to persistent objects in a world. I am just curious if there is any advantage to my $edit approach over the Bucket system.


That is semi how the Edit works anyways, when you making changes the server is just sending the changes you made to the other clients of the edit instance, and then all the edit does is save the .dat file which is really just a short cut way to deal with lots of changes.


This is what I am asking confirmation on.

Is there any advantage/disadvantage to this approach over the bucket system?
Will this system even work on a live server?


Also i do not see the player client on my account page (grandfathered account)

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: $EDIT on a live server
« Reply #5 on: Mar 06, 15, 04:38:53 PM »

additional downloads at the far bottom should see generic player client for server XX
Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

nocake

  • General Accounts
  • *
  • Posts: 404
    • View Profile
    • BlightMMO
Re: $EDIT on a live server
« Reply #6 on: Mar 06, 15, 04:48:58 PM »

I don't have this on my account page :(

I am guessing it is because I am a grandfathered account.

nocake

  • General Accounts
  • *
  • Posts: 404
    • View Profile
    • BlightMMO
Re: $EDIT on a live server
« Reply #7 on: Apr 14, 15, 12:33:50 AM »

Shameful bump - Thread got a little of topic

Can I use $EDIT on a live server and still have it work the same as it does in heroblade?



HE-CHRISTOPHER

  • HeroEngine
  • *****
  • Posts: 424
    • View Profile
Re: $EDIT on a live server
« Reply #8 on: Apr 20, 15, 12:33:14 PM »


The editing system ($EDIT) is not optimized for gameplay, rather it is optimized to make it easy to use/debug and tweak (for example, most edits are sent as massive strings which are not coalesced).  Consequently, it is generally not recommended to use $EDIT for gameplay elements.

If one were to use $EDIT, it would work best if constrained to edit instances where the engine can optimize the process through writing area.dat files to the repository.  Play instances would be poorly suited because all of the edit commands are queue up and transmitted (without coalescing modifications) to the client during login to the area (potentially a massive amount of data delaying area load times).

There is a pretty comprehensive overview of the topic in the Player Housing Tutorial:

http://hewiki.heroengine.com/wiki/Player_Housing_Tutorial
Logged
Christopher Larsen
CTO
HeroEngine