Skip to content
Jimmy Cushnie edited this page Nov 12, 2019 · 3 revisions

What SUCC is

SUCC is a tool for saving and loading C# data as text. It is designed with video games in mind, but it could be used for any purpose. SUCC is built on three fundamental principles (not necessarily in order of importance):

  • SUCC is easy to use from code. Saving data to a file and then loading it later is a simple, straightforward process. You don't have to do anything special to save or load a given type of data; you just give your variables to SUCC and it sorts everything out.
  • SUCC files are easy for humans to read. When you look at a SUCC file, it is immediately obvious what kind of data is being represented and what that data is.
  • SUCC files are easy for humans to write and modify. Editing a SUCC file is easy. You never have to worry that you forgot some formatting; the structure of the file makes it immediately visually obvious if something is off. The rules of SUCC files are simple enough that you can confidently write a file from scratch and know that SUCC will be able to parse it.

What SUCC is not

The benefits of SUCC do come with some drawbacks.

  • SUCC is not fast.1 SUCC makes heavy use of reflection in order to gracefully handle whatever type of data is thrown at it. In particular, working with non-array collections will compile generic methods at runtime. SUCC is fast enough for its intended usage in configuration files, but if you need to save megabytes of data, it is not ideal.
  • SUCC is not type safe. SUCC will happily save a value as an int and then later load it as a string. This is the cost of SUCC's lean file formatting; there's no room for specifying the type. However, this is rarely an issue: when you save a value, you know what type it is, so you know what type to load it as in the future.
  • SUCC is not portable. SUCC is intended for programs that load and save their own data. Saving data with one program that uses SUCC does not guarantee that another program using SUCC can load that same data.

 1. Not that it shouldn't be fast - pull requests that improve performance are very welcome!