MaybeView

Note: this is based on the version of Ox in following revision in the Nostalgia repo : 1b629da8fc658a85f07b5209f2791a5ebdf79fa1 Problem In C++, hash maps are often used with strings as keys. This would typically look something like this. std::unordered_map<std::string, int> ages; ages["Jerry Smith"] = 54; And here is an example of a lookup: int age = ages["Jerry Smith"]; There is a hidden inefficiency here. The lookup operator does not take a std::string_view or a C string....

April 24, 2024 · 2 min · Gary Talent

Ox Preloader

Note: this is based on the following revision in the Nostalgia repo : e9965a63ce6a8df6427052b5464f0525c61b65fc This might be the most insane piece of software I have ever written. That’s probably mostly because I have never heard such a system as this, which should usually be a deterrent when you think you have come up with a brilliant new idea. But questions of whether or not I should proceed with this idea never stood a chance against my firm conviction that it could be done....

February 27, 2023 · 10 min · Gary Talent

Ox Model System

Note: this is based on the version of Ox in this commit in the Nostalgia repo : 5fa614ab83ee0fd080ccb5f9465e086199777859 Synopsis In languages like Go and Python, there is a feature called reflection. This essentially allows functions to iterate over arbitrary struct types to get or set its data, or simply get information about the type. Reflection is most commonly used for object serialization, and that is the main use for it in Nostalgia....

January 30, 2023 · 10 min · Gary Talent

MetalClaw

Synopsis In Nostalgia, stored representations of data tend to take the form of one to one mappings to serialized data structures. Nostalgia uses this approach for game saves, creature definitions, world layout, and a good deal more. Representing this data in JSON allows for easy debugging, as it is a human readable data serialization format, however that convenience comes at a cost to performance and size. This cost is negligible on modern PCs, but it is completely unsuitable for such limited hardware as the GBA....

June 25, 2022 · 7 min · Gary Talent