TheNewAndy 2 days ago

If you just want to write C and are ok linking to stuff that is in other languages, then I used SDL2 for my game which I wrote in C and is on the app store. It was a very pleasant experience, and if I were doing an iOS thing again, I would likely do something similar.

I think I had one objective C file in there for calling a library function I needed, but otherwise I just wrote C code.

5
JKCalhoun 2 days ago

SDL2 is awesome. Just the right level of abstraction for me (not "all-in" like Unity, etc.).

radiator 1 day ago

Would it also be possible to write in both C and another (small, implementation written in C) higher level language? For example Lua or similar?

lpribis 20 hours ago

SDL2 + Lua is a pretty common combo. Lua is very easy to interface with and integrate.

beeflet 2 days ago

Just SDL2? Do you have access to OpenGL or some sound library as well? and if so what library are you using? How do you handle input and networking?

TheNewAndy 2 days ago

The game was 2d, and I just used the stuff in SDL_render.h for doing the graphics.

SDL2 has input stuff built in, so that is easy.

I didn't need networking for my game, so I didn't have it, but networking is not particularly difficult to do cross platform (I'm assuming iOS lets you just use the "normal" sockets API?)

I also used SDL2 for the sound stuff, which was mostly playing back prerecorded things, but also a little bit of stuff synthesized on the fly.

Asmod4n 1 day ago

SDL comes with a cross platform async socket API.

hyperbrainer 1 day ago

SDL does have a platform-agnostic render library for basic stuff, and you can integrate Metal into it pretty easily.

flohofwoe 2 days ago

You have an OpenGLES 3.0 C API on iOS but it's deprecated (still working fine though).

But SDL3's has its own 3D API now which (I assume) wraps Metal on iOS.

lupyro 1 day ago

Would you be open to answering a few more questions about this? My email is in my profile or I could reach out to you if you provided a way.

deadbabe 1 day ago

Any tutorial?