Announcement

Collapse

The Infinity Blade Forums Have Moved

We've launched brand new Infinity Blade forums with improved features and revamped layout. We've also included a complete archive of the previous posts. Come check out the new Infinity Blade forums.
See more
See less

Creating Save Games in UDK

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

  • started a topic Creating Save Games in UDK

    Creating Save Games in UDK

    Hi. I am trying to create a RPG using UDK, and there is one part I am having problems with. I need a way for the user to save their progress and then come back later. I have seen a method of creating save games using something called dll bind, but unfortunately while I am studying C++, I am still rather a C++ noob. Is this the only way to create save games from UDK? If it is (or even if it isn't) does anyone know of a really good tutorial that explains how the dll bind and C++ method works? I would not mind giving the time to learn this, but the couple tutorials I found just gave me a lot of C++ code without really explaining any of it. If this is the best method, I don't want to just copy someone else's code, I want to understand it. Any help would be greatly appreciated. Thank you.

    Raven

  • replied
    Hello guys, I am really sorry to revive this old thread, but I thought it would be better to post here than to open another thread to ask about this.
    I am trying to use relative paths for my savegame using this basicsaveobject method. I had the same problem as Spectar but thanks to you, Blade, I saw I needed to use \\ instead of \. However I am wondering if there's a way to set the save path outside the UDK directory, but without using absolute paths. For example, what if I wanted my saves to be stored in "\current user\my documents" path? I tried the %userprofile% (%userprofile%\\my documents\\) wildcard but it doesn't seem to work because the directory doesn't show up.

    Any help is more than welcome.

    Leave a comment:


  • replied
    c-like languages all escape \, use \\ ... however, you probably shouldn't hard code absolute path names, what if someone installs your game to g:\games\ ?

    Also make sure that users can't enter any filenames that will be used unless you sanitize them thoroughly to remove all .. and \

    Leave a comment:


  • replied
    I´ve a problem with specifiing the patchname. The strings UDK uses allway delete the "\" char (saw it through log). So, if i have a string s and try to assign the path

    "g:\udk\saves\save.bin" it turns out to be "G:udksavessave.bin"

    inside of s, so I get a file called "udksavessave.bin" in g:

    Those anyone know what is causing this "bugg"(if it is)?
    Having the string "g:\udk\saves\save.bin" directly inside of BasicSaveObject does have the same effect.

    Leave a comment:


  • replied
    Originally posted by PaulKrause View Post
    AWESOME thank you
    No problem I'll write up a few more soon some that would take this further

    Leave a comment:


  • replied
    AWESOME thank you

    Leave a comment:


  • replied
    Hello again,

    I put a rough tutorial together - I'll expand on it tomorrow but it should help you get started. I aim to expand and write up a few more tutorials over time but for now I'm off to bed, caught a nasty nasty stomach bug

    Enjoy: http://danhaddad.wordpress.com/2011/...save-tutorial/

    Leave a comment:


  • replied
    Ill structure the save system and post something shortly

    Leave a comment:


  • replied
    basicly a step by step tutorial how to implement such a save system ingame and attach it to the game menu.
    i know thats probably a lot, but im sure a lot of people would like to have one.
    im still noobish at Uscript....i can make weapon classes and stuff but i dont understand those savegame tutorials out there

    Leave a comment:


  • replied
    Originally posted by PaulKrause View Post
    would someone mind to make a full tutorial for idiots like me?


    or is there already one?

    What do you want the tutorial to explain?

    Leave a comment:


  • replied
    would someone mind to make a full tutorial for idiots like me?


    or is there already one?

    Leave a comment:


  • replied
    Thanks for the help everyone!

    Turns out my code was totally fine - problem was my bloody Kismet Node - I was calling the wrong function, last time I program late into the night.

    Thanks for all the help Baldtoast and Solid Snake

    Leave a comment:


  • replied
    Just so that everyone is aware, this function will create directories when requested and it will also use relative directory commands. Aka, you can use...

    Code:
    ..\..\MySaveDirectory\MySaveGame.USX
    And it will save to that file relative to the working directory.

    However, be careful as it can override files!

    Leave a comment:


  • replied
    Originally posted by DanielH View Post
    Would it make sense if I said that in my version gameState was a global and not local to the functions?
    In this case I don't believe it would make a difference. I tried making it global in my code and the results were identical.
    I wasn't joking about the fact that Load would return true even if the file doesnt exist.
    I believe you, it's just that it doesn't happen to me so I can't really imagine why it happens for you or how to solve it. I guess to work around it you could store a bool in DH_GameState that defaults to false, set it to true whenever you save it, and then set it to false right after you use it with BasicSaveObject(). That way if the load does fail but returns true, you can check that bool's value to determine if it actually was loaded.
    However, when I copied your functions and tested them into my code they worked well.

    In either case thanks for all the help this was pretty much bugging me.
    Glad I could help!

    Leave a comment:


  • replied
    Would it make sense if I said that in my version gameState was a global and not local to the functions?

    That seems to be the only difference between the 2 of us, yes I apply default values that are not 0 to all the parameters and I wasn't joking about the fact that Load would return true even if the file doesnt exist.

    However, when I copied your functions and tested them into my code they worked well.

    In either case thanks for all the help this was pretty much bugging me.

    Leave a comment:

Working...
X