cortex-command-community / Cortex-Command-Community-Project-Source

[ARCHIVED] Cortex Command - Open Source under GNU AGPL v3 (no game data included)
https://cortex-command-community.github.io/
GNU Affero General Public License v3.0
201 stars 41 forks source link

New system and rendering backend - SDL and OpenGL #211

Open HeliumAnt opened 4 years ago

HeliumAnt commented 4 years ago

Is your feature request related to a problem? Please describe. Allegro4 is ancient (>20y) and even the latest version isn't that much younger, which isn't great and creates the need for workarounds on all platforms and will likely hinder the development of the project in the future.

Describe the solution you'd like A new graphics backend is needed, I'd propose SDL2, since it's mature and brings with it hardware accelerated 2D graphics.

Describe alternatives you've considered Allegro5 would also work, but would require the same amount of work as converting to SDL. Both are fairly similar in terms of features, though SDL2 has better cross platform support.

HeliumAnt commented 3 years ago

~~Tracking progress here: https://docs.google.com/spreadsheets/d/1K1fChWvMiLkbTVfTnW0P8ofRF_rbJzqGI7NSH9hGfvE/edit#gid=0~~ Progress tracking moved to TODOs.org

HeliumAnt commented 3 years ago

Actually the SDL renderer interface is wayyy to basic for anything we do, so I'm writing a full opengl rendering engine now. SDL will still be used for input handling and context creation (which appears to be the gamdev industry standard way of doing cross platform games), since afaik it is the only library (between sfml, allegro5 and sdl2) that properly supports wayland and uses the evdev joystick interface.

HeliumAnt commented 3 years ago

New rendering backend will target modern GL (i.e. GL3(.3)) for now unless there is real need to support some older systems (judging from steam hardware survey this should cover >90% of players). Going further back (even gl2.x) would significantly limit our ability to expose shaders and significantly increase maintenance required due to having to deal with many of the less well documented gl extensions.