0 Favourites

Binary ini type thing

This forum is currently in read-only mode.
  • Is it/would it be possible to have an ini file that you can read and write stuff to as usual but that is stored inside the exe?

    I don't know how necessary it would be or if it's already possible but i think it would be a cool idea for like level editors and stuff where you could store all your levels in INTERNAL ini's so people don't go around editing things like save files and levels etc?

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • I do this for Vert.

    I make an .ini with my level editor. Then I copy/paste the text of the .ini into a text box in my game.

    The text boxes are all instances of the same box, with a "level" PV for the level number. There is a "levelNum" global to keep track of what level you're on.

    When it's time to load, just do a quick "levelText.Value('level') Equal to global('levelNum') -> do level loading"

    Easy

    Of course, you can't write to it. You can't just write new text to a built .exe. Though I suppose you can "save" the game info after changing the level text if you're using the System save/load actions.

  • That sounds like an interesting way of doing it.

    I still would like my way though, that could give some games the option of user created levels without filling the directory with easily edited inis etc and you would also have all the other standard ini file interactions without the external files

    Or is there some sort of encryption?

    anyway it was just a thought i had that i like

  • <Insert obligatory comments on how it's the persons loss if they modify the game>

    If your level is fairly complicated, then to modify it to confer any kind of advantage or anything (which in itself isn't disastrous) would be effort. Having your games open to mod often extends the life anyway! If you have a sub directory called 'maps' or 'levels' it's no clutter.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)