Dec 282011
 

Introducing Ego – a ridiculously simple class for saving and loading information from/to your Corona SDK application.

This was inspired by Jon Beebe’s Games Class – which is a lot more complex and elaborate than Ego – mostly because it is designed to do a bunch of awesome stuff besides saving and loading data.

So, I wrote a little something in a similar style – except it is only for saving and loading.

Ego is not made to save tables – it’s bare bones and basic. You save one value to a text file and load it when needed.

Take a look in the file – it has got a nice example in the comments and explains all you need to know to use Ego. (Which isn’t much!)

Download Ego


Enjoy – any questions or comments feel free to let me know below.

Peach Pellen :)

PS - I hope before long to put up two samples using Ego, one for saving the highest score and the other for locking/unlocking levels with ease, so stay tuned for those!

Download test
Like this post? Subscribe to the monthly newsletter!

 

  17 Responses to “Ego – Easy Saving and Loading in Your Corona Apps”

  1. i might be retarded but how F do i download this??

    • Right below where it says “Download Ego” choose to Like it, Tweet it, +1 it — do any one of those things and the download link will then show for you. Make sense?

  2. [...] template is simple, using Ego (people keep asking me about that name but that’s a story for another time) you will see how [...]

  3. Peach,

    Cool IceBox is pretty awesome. Thanks for referring me to it. So far liking what i see.

    :-D

  4. So if you want to save several variables – do you need to save in separate txt files?
    For instance, say you want to save the user’s highest score, best streak count, level, etc. – can we somehow save this data in the same .txt file? Or does this require individual txt files?

    Maybe we can use tables instead of passing in strings, numbers, etc..?

    I’m trying to repurpose some code. I found this code that allows saving tables – it works in my simulator but once I get onto my device – it errors out at the new function. It’s strange.

    https://github.com/robmiracle/Simple-Table-Load-Save-Functions-for-Corona-SDK/blob/master/README

    The Ego code seems to work fine for saving just one variable – just trying to make this work for a table.

    Any help would be appreciated.

    Thanks,
    Christina

    • Hey Christina,

      Ego is absolute bare-bones stuff and was not made to work with tables. If you take a look at Ice I believe that may be closer to what you are looking for :)

  5. [...] obviously involves saving and loading data, I’ve used Ego for that [...]

  6. [...] already checked out the tutorial for saving highscores in your Corona app with Ego, you can find it here. Tweet  Posted by Peach Pellen at 6:17 pm  Tagged with: Ego, Level Locks, [...]

  7. [...] *This code relies on Ego, which can be downloaded from here. [...]

  8. please please pretty please release a quick tutorial! I want to put the keeping high score issue behind me!

  9. I am glad :) Corona is awesome!

    I’m sure we will get more chances to chat in the new year, perhaps things will be less busy then.

    Stay well :)

  10. Peach you`re right! :)

    Honestly after have got my first app into the store I cannot stop studying even more! It`s your “fault” too! hahaha… :D

    You know why my friend? Because you`ve showed me the Light! (== Corona SDK)! :)

    Please, keep in touch Mrs. ;)

    Best Wishes,
    Rodrigo RSCdev.

  11. @Nick – I know, I know :P

    @Rodrigo – It’s OK, I think we have probably both been very busy! I hope you have a fantastic New Year as well :)

  12. Nice one my Friend!

    PS: “So long I do not speak with you…” :(

    But I do not forget the Mrs. :)

    My best wishes for you & family!
    Happy New Year 2012!

    THANK YOU FOR ALL! ;)

    Rodrigo RSCdev.

  13. :)

    +1 for lock /unlock (as you know already hehe)

    ng

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.