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

SDL Port? #25

Open
MikeDX opened this issue Aug 26, 2016 · 5 comments
Open

SDL Port? #25

MikeDX opened this issue Aug 26, 2016 · 5 comments

Comments

@MikeDX
Copy link

MikeDX commented Aug 26, 2016

Have there been any discussions to a potential SDL port? I am not quite familiar with all the inner workings of MEKA yet (although I was an avid user back in the early 00s when I was in "the scene"), so I don't know what MEKA relies on in terms of the Allegro libs.

Whilst I like Allegro - it was my lib of choice for years, SDL is much more widely supported on many platforms, the most exciting of which being html/javascript, so we could see MEKA running in a browser, and I think that would be pretty awesome. I've got quite a bit of experience in that, so that's something I could assist with.

I'll take a look at the code whilst waiting for a reply

@maxim-zhao
Copy link
Collaborator

I had a brief look some time ago and it's going to be quite painful, Meka relies on Allegro functionality beyond rendering video and audio, for example config and resource loading and drawing primitives. The imgui port may well reduce some of this, though.

@ocornut
Copy link
Owner

ocornut commented Aug 26, 2016

I think we should aim for that. Allegro is a crumbling mess.
Part of my plan was to replace the gui with a skinned ImGui which would have the advantage of getting rid of pretty much every Allegro draw primitives everywhere in the code for tools/ui. From there the entirely of rendering would be quite portable.

We don't use Allegro for config, we don't even use it for "data/package" file anymore, the files are standalone png, etc. stb_image.h can load them very well. It would be quite easy after the GUI is replaced.

If you want to help that'd be great :)

@MikeDX
Copy link
Author

MikeDX commented Aug 26, 2016

I wonder if we could start by including SDL (1 or 2, doesn't really matter which) just to render the display buffer, and the gradually move over the inputs and audio calls. There doesn't seem to be an "easy" way to change over all in one go as everything is a bit tangled in with the allegro defines and routines.

@ARoxdale
Copy link

ARoxdale commented May 21, 2021

We could try moving all the allegro calls behind a quasi-platform interface. That might make it easier to eventually crate alternative ports.
Allegro calls are fairly scattered throughout the code, but as an initial step they could be moved behind an API layer, so they are all in one place.

@ocornut
Copy link
Owner

ocornut commented May 21, 2021

My plan what to rewrite the UI and most of the rendering using Dear ImGui, make it look fairly similar and then 90% of the Allegro calls will be done and UI will be easier to work with and improve. From there it'll be very easier to switch to something like SDL.

bsittler added a commit to bsittler/meka that referenced this issue Feb 7, 2023
This allows 512KB games to work in "Sega" mapping mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants