Two Questions

1. Can you recommend any game saving and loading mechanism, library, or where to start?

2. My game is mostly text based and I have an area of the screen where I would like to have scrollable text. How would I do this?

Thank you.

Comments

  • Hi Markz,

    1. raylib includes a very simple binary data storage system, I added it by petition of my students: http://www.raylib.com/examples_web/exmain.html?name=core_storage_values

    My personal recomendation is to learn about file access (read/write, text/binary) and save/load data from a custom save file format.

    2. It could be a bit complicate, actually I was dealing exactly with the same problem with a tool I was developing that included a log area. The problem is that every character draw on screen requires a quad, so if you try to draw more than (I think) 8192 characters, you run out of quads with the default raylib configuration. The best way to deal with that is define a scrolling area and just draw characters than are visible in that area every time.

    About creating a scrolling box, it's not complicate but it requires some work... I'll take note for an example. ;)
  • 1. I took a look at your StorageSaveValue function and see how you're doing it so I'll go ahead and create my own per your recommendation.

    2. Yuck. I'll just do paging instead of scrolling.

    Thank you!
  • For any other C++ coders looking for a good save file mechanism, I found this is working well for me so far:

    https://github.com/nlohmann/json
  • Hey! Great library Markz! Didn't know about it! :D
Sign In or Register to comment.