Results 1 to 12 of 12
  1. #1

    Default Serialization and Reflection Framework

    Hi,

    I have been browsing the documentation looking for ways to do serialization of game state to save data, load data structures for AI functionality, but found no way to do this. Is there a Serialization and Reflection framework? (accessible using scripting or is this only available with a low-level source access.)

    Say i want to create an avatar/character creation tool like on Sims3, or a racing game with custom cars. Is this possible without using external configuration files. I would typically do this using serialized XML files. But i don't know how i would do it, with the UDK.

    What are the main limitation, in terms of extendability and possible workarounds to add external functionality. TCPlink appears to be a way around certain limitations but not the most elegant way.

    Is it possible to have a workable fantasy style RPG game, made with hundreds of states for inventory object in UnrealScript? Or is this sort of scenario unfeasible using the UDK without access to source? I have read that UnrealScript is quite slow, and unable to manage very high amounts of data. I hope this is something of an old story.

    Thank you.
    Last edited by danielmd; 11-22-2009 at 09:15 PM.

  2. #2
    Redeemer
    Join Date
    Nov 2007
    Posts
    1,207

    Default

    There is only a little bit of reflection, and no built-in serialization. Perhaps the bigger hurdle to get over is the lack of file loading functionality though. At the moment if you want save/load data the only built-in method is the config system.

    TCPLink is the only way to graunch(*) in external stuff at the moment.

    I don't think UnrealScript is unreasonably slow when used well. It is not like the state of all those objects are going to be accessed or changing every frame.

    (*) - Graunch is the technical term for forcing things regardless of whether they really fit.
    Nightblade, a stealth based total conversion for UT3

  3. #3
    MSgt. Shooter Person
    Join Date
    Oct 2008
    Posts
    119

    Default

    As far as configuration goes, don't bother with XML, serialize to INI's using the features provided. If you have lots and lots of data you may want a proper database.

  4. #4

    Default

    There's no reflection in UE3. UE1 and 2 provided access to variable values via variable names as strings, but that feature was removed in UE3, probably because it was exploitable in a bad way. Storing persistent data is usually done via config variables, possibly in PerObjectConfig classes if you need an undefined number of these data sets.
    Wormbo's UT/UT2004/UT3 mods | PlanetJailbreak | Unreal Wiki | Liandri Archives

    <elmuerte> you shouldn't do all-nighters, it's a waste of time and effort
    <TNSe> nono
    <TNSe> its always funny to find code a week later you dont even remember writing
    <Pfhoenix> what's worse is when you have a Star Wars moment
    <Pfhoenix> "Luke! I am your code!" "No! Impossible! It can't be!"
    Note that your questions via PMs will be ignored if they actually belong in the forum.

  5. #5

    Default

    Thanks for the replies guys. I see now that there are a few options. Sill...

    This is really frustrating. It's one of those features that can be done over the weekend, it would really be of use by everyone and eliminate allot of frustration. Well i guess we can always email Tim Sweeney, and nag him to add this feature in the next UDK release lol

  6. #6
    Super Moderator
    Join Date
    Feb 2005
    Posts
    2,920

    Default

    Is there a Serialization and Reflection framework? (accessible using scripting or is this only available with a low-level source access.)
    Yes, there is a framework, but it is only accessible from C++

  7. #7
    Redeemer
    Join Date
    May 2000
    Location
    between the monitor and chair
    Posts
    1,523

    Default

    I don't see why you would need reflection. Also the idea you propose in the second segment of your first post can be done using the config system currently available in the engine. (See PerObjectConfig).
    Michiel 'El Muerte' Hendriks
    Magicball Network - Little Big Adventure community
    the Unreal Admin page - Unreal server administration
    UnrealWiki - UnrealScript and UnrealEd wiki.
    UnCodeX - powerful UnrealScript tool for programmers

  8. #8

    Default

    No serialization, are you sure? What about SerializeItem and CopyCompleteValue? Found those in some docs...
    Last edited by horstdraper; 11-24-2009 at 08:45 PM.

  9. #9
    MSgt. Shooter Person
    Join Date
    Oct 2008
    Posts
    119

    Default

    See above, C++. Also, I believe you can still get and set values of properties in chosen objects, via console. I haven't verified this tho.

  10. #10
    MSgt. Shooter Person
    Join Date
    Nov 2009
    Posts
    115

    Default

    The 'no external file access' issue is the big thing for me. Seems like basic read/write file functionality wouldn't be too big of a deal for Epic to add to UnrealScript. Without it, making something like an RPG will be more difficult than it should be.

  11. #11
    MSgt. Shooter Person
    Join Date
    Oct 2008
    Posts
    119

    Default

    Marcus, that functionality is already included. Use the config system. If you want some custom file format, you can implement support for it.

  12. #12
    Redeemer
    Join Date
    May 2000
    Location
    between the monitor and chair
    Posts
    1,523

    Default

    Quote Originally Posted by horstdraper View Post
    No serialization, are you sure? What about SerializeItem and CopyCompleteValue? Found those in some docs...
    UE does contain serialization and reflection, but as Joe Graf already pointed out, it's not exposed to the UnrealScript.

    Reflection isn't really an issue, because you would only need to resort to reflection if you don't have control over the code you are using.
    As for missing serialization, most of its functionality can be substituted by using the configuration file system and PerObjectConfig (and optionally in combination with UIResourceDataProvider subclasses).
    Michiel 'El Muerte' Hendriks
    Magicball Network - Little Big Adventure community
    the Unreal Admin page - Unreal server administration
    UnrealWiki - UnrealScript and UnrealEd wiki.
    UnCodeX - powerful UnrealScript tool for programmers


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.