Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite #133

Open
geniiii opened this issue Feb 14, 2021 · 2 comments
Open

Rewrite #133

geniiii opened this issue Feb 14, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@geniiii
Copy link
Collaborator

geniiii commented Feb 14, 2021

It's about time for a rewrite. (in C11)

My work on 3DStris started out as a way to better learn C++ (as I'm sure many can tell). As a result, 3DStris has become an OOP mess with many Java-isms present, despite mixing many C libraries with C++ code.

Some code criticisms:

  • The String class is a C++ wrapper around a C99 library, when I should've probably just written my own library from scratch.
    • We also have both a StringView and String class, because our String class can only own an sds string
  • The GUI (Screen) system was a placeholder waiting for a future replacement, but I never got around to replacing it, as mentioned in GUI rewrite #54.
  • Memory allocation is a mess, and strings are constantly allocated on the heap, just to be freed next frame.
  • Crazy amount of dependencies, many of which are quite unnecessary.
  • CMake sucks.

Changes

  • Cross-platform support (only Win32 and 3DS at first)
    • The main use for the Win32 port will be easier debugging. Debugging on a real 3DS (and especially Citra) is a pain, so I'd like an easier and faster way to debug game logic.
    • Other ports will follow, but mostly as a "side-effect" of engine work
  • Handmade immediate mode GUI
  • Custom save and config format
  • Memory arenas replacing heap whenever possible
    • Might be a pain on the 3DS
  • As little external dependencies as possible, besides metaprogramming libraries like Metadesk

When it comes to code style changes, I'm not too sure. Naming conventions will most definitely change.

This issue will likely receive many edits while I work on other projects, and may not perfectly reflect the final rewrite.

@geniiii geniiii added the enhancement New feature or request label Feb 14, 2021
@geniiii geniiii self-assigned this Feb 14, 2021
@geniiii geniiii pinned this issue Feb 14, 2021
@Zachary-Rude
Copy link

uh, why hasn't this rewrite been released yet? it's been over 2 whole years, and yet, this rewrite still hasn't been released!

@geniiii
Copy link
Collaborator Author

geniiii commented Oct 31, 2023

uh, why hasn't this rewrite been released yet? it's been over 2 whole years, and yet, this rewrite still hasn't been released!

Because I've been busy with IRL stuff, higher priority projects and I've just been programming less in general. I still hope to get around to this eventually, though it does seem unlikely given the last 3 years.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants