- changed title to Proposal: Migrate to SDL2
Proposal: Migrate to SDL2
Hi,
I have made efforts to migrate ja2-straciattella to SDL2 here: https://bitbucket.org/selaux/ja2-stracciatella/branch/sdl2. It's not done yet but most of it works.
Rationale
- SDL 1.2 is outdated
- SDL2 brings an accellerated 2D render API (which we would then have to use)
- SDL2 has better fullscreen support (scaling!)
- SDL2 allows compilation for Android and iOS
Current Status
- Builds with SDL2
- Rendering works
- Audio works
- Mouse works
- Gameplay works (minus undiscovered bugs)
Issues
- Keyboard works only partially
- Graphical corruption when scrolling upwards on tactical map
- Mouse moves outside of fullscreen
- Not using dirtyRectangles anymore but doing a full screen refresh every time (not sure if that is an issue)
Moving forward
Please feel free to test this branch and tell me your oppinions about the migration and if you want squish the bugs listed above.
Comments (5)
-
reporter -
reporter - edited description
-
re wheel: sdl 1.3 introduced the SDL_MOUSEWHEEL event, but I didn't check if you're using it yet.
Dirty rects are a performance gain (noticeable on mobile) and it's probably simpler to fix that than to implement an opengl renderer.
-
reporter Seems like the wheel thing was just a false alarm. I already implemented the SDL_MOUSEWHEEL event and it seems to work fine. I just thought you could change stances with the mouse wheel, but works when scrolling through financials.
-
reporter - edited description
- Log in to comment