Announcement

Collapse
No announcement yet.

TMap<> Replication - exposing to Unreal reflection.

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • started a topic TMap<> Replication - exposing to Unreal reflection.

    TMap<> Replication - exposing to Unreal reflection.

    Would it be possible to expose TMap to reflection system and by extension to replication ?

    I have run my self in cases where I'd really like to have some sort of ordered list, where order of data is important and should be maintained. One of that case is mapping input to action bar and/or inventory where I really need to maintain certain order of items.

    I have hacked solution around by using Struct with ID variable, but it's not efficient, since something like TArray can be only be really searched linearly, and by that can't be really used for bigger amounts of data and still be efficient.

  • replied
    How mirror TMap logic via array?

    Leave a comment:


  • replied
    Yes, I know half of engine would have to change lol...
    But one gotta dream for life.

    Leave a comment:


  • replied
    Originally posted by BrUnO XaVIeR View Post
    There's optimizations for FVector replication; could be there optimizations for TMap as well.
    Sure, but it would be hideously complex - did you look at the array replication stuff? They've probably decided it isn't worth the effort vs manually handling the few cases where a replicated map is useful.

    Leave a comment:


  • replied
    There's optimizations for FVector replication; could be there optimizations for TMap as well.

    Leave a comment:


  • replied
    As people said earlier, TMap replication would be horribly inefficient even if it worked. It'd be a bad practice all the way through. Think of the lack of support as a enforcing good programming practices.

    Leave a comment:


  • replied
    Originally posted by Zeblote View Post
    What do you even need to replicate a map for, that you can't easily work around by using rpcs or similar?
    That's a silly comment, the same can be said for any other type.

    Leave a comment:


  • replied
    What do you even need to replicate a map for, that you can't easily work around by using rpcs or similar?

    Leave a comment:


  • replied
    What will be first - HL3 from Valve or TMap replication from Epic?
    I bet on Epic - they are half step ahead

    Leave a comment:


  • replied
    So.. Still no TMap replication in 2018, 20 years later?

    Leave a comment:


  • replied
    Originally posted by Syed View Post
    I know map has certain features which do not present in array (array is simple) but if it is searching, then there is a workaround for array and it *may* have the same performance. It is better than waiting for features which has no definite delivery date.

    The workaround which is sort and then binary search is not difficult to implement.
    The array I'm working with in this case is small so it's not a big deal. Does FName have a predicate defined by default for sorting?

    Leave a comment:


  • replied
    I know map has certain features which do not present in array (array is simple) but if it is searching, then there is a workaround for array and it *may* have the same performance. It is better than waiting for features which has no definite delivery date.

    The workaround which is sort and then binary search is not difficult to implement.

    Leave a comment:


  • replied
    Originally posted by Syed View Post
    What is not ideal? If it is search, then you can employ binary search. If the array count is 1000, worst case scenario is number of loop is only 10 (vs 1000 if linear search).
    Obviously there are cases where a map is better than an array or there would be no reason for its existence.

    Leave a comment:


  • replied
    Originally posted by hdelattre View Post
    I've just run into this issue too. I'm replicating a TMap<FName, float> that's causing a crash when NetSerializeItem is called (PropertyMap.cpp:417). Are there any plans to fix this? I can use an array but it's not ideal.
    What is not ideal? If it is search, then you can employ binary search. If the array count is 1000, worst case scenario is number of loop is only 10 (vs 1000 if linear search).

    Leave a comment:


  • replied
    I've just run into this issue too. I'm replicating a TMap<FName, float> that's causing a crash when NetSerializeItem is called (PropertyMap.cpp:417). Are there any plans to fix this? I can use an array but it's not ideal.

    Leave a comment:

Working...
X