mirror of
https://github.com/NeoFlock/neonucleus.git
synced 2025-11-14 14:34:26 +01:00
2.5 KiB
2.5 KiB
Code quality stuff
- Use the same namespacing style everywhere, that being
nn_<class>_<method>for functions related to "classes",nn_<function>for static functions,nn_<type>_tfor types. - Get rid of
nn_address - Make a lot more stuff const
- Rework to API to be much more future-proof to reduce potential breaking changes.
Parity with Vanilla OC (only the stuff that makes sense for an emulator)
hologramcomponentcomputercomponentdatacomponent (with error correction codes and maybe synthesizing audio)redstonecomponentinternetcomponent
Bugfixes
- Do a huge audit at some point
nn_unicode_charWidthappears to be bugged, look into that.- validate against moving
a/bintoaor movingaintoa/bin the filesystem component.
The extra components
oledcomponent (OLED screen, a store of draw commands and resolution from NN's perspective)ipucomponent, an Image Processing Unit. Can bind witholeds, and issues said draw commandsvt, a virtual terminal with ANSI-like escapes. (and a function to get its resolution)- (maybe)
qpucomponent, a Quantum Processing Unit for quantum computing radio_controllerandradio_towercomponents, for radio telecommunications- (maybe)
clockcomponent for arbitrary precision time-keeping ledcomponent for LED matrixes and/or LED lightsspeakercomponent, allows playing audio by asking for binary samples and pushing a signal when it needs moremicrophonecomponent, allows reading audio from nearby sourcestape_drivecomponent, compatible with Computronics, except maybe with proper seek times and support for multiple tapescd_readerandcd_writercomponents, to work with CDsserialcomponent, for serial communications with other devices (USB?)
Internal changes
- use more arenas!!!!!!!
- make sure OOMs are recoverable
- rework some interfaces to use pre-allocated or stack-allocated memory more
- use dynamic arrays for signals (and maybe components), but still keep the maximums to prevent memory hogging
- setup an extensive testing system to find bugs easier
- optimize the codebase by using globals instead of universe userdata
- use compiler hints to let the optimizer make the code even faster
- (maybe) rework a bunch of internal structures to use tagged unions over vtables (such as components). This may make certain APIs unnecessary or slightly different. This can improve performance at the cost of making the codebase more complex