@Bri_G @UberGoober @West
Codea 4 will use Lua, and will provide many of the same conventions (setup(), draw(), touched(touch) etc). However in terms of API the underlying engine is a complete re-write, and so some legacy API is no longer necessary or relevant
Stuff like mesh
will be gone, although equivalent functionality will be possible. Old-style Codea GLSL shaders (Shader Lab) will no longer be supported, as we are no longer using OpenGL
2D graphics rendering will get an overhaul with better vector drawing, paths, lines, gradients, etc. Better anti-aliasing and and more consistent rendering
3D graphics rendering will be brought out of Craft
and be made a first-class process within the API. There will be the concept of “scenes” (3D files that you can edit visually, attach code in-line, refer to them from your regular Codea Lua files, etc). But 3D graphics will also support “immediate” mode drawing just like sprites and other primitives, so you could drop them in your draw()
call instead of having to use a scene
The voxel API from Craft may be dropped rather than ported (at least initially), as it is a fairly niche feature. Though we really like it
There’s a couple of paths we are exploring:
- Replace Codea 3 with Codea 4 on the App Store. Provide some wrappers that mimic the old 3.x behaviour when you run old projects (e.g., a mesh() wrapper).
- Release Codea 4 as a new app and maintain Codea 3.x for a little while
- Replace Codea 3 with Codea 4 on the App Store but include both the old (OpenGL) and new (Metal) runtimes. Old projects open in “legacy” mode and can be updated over time, new projects use the new API only. Legacy projects will not be supported on macOS (as there is no OpenGL support)
I like (2) because it’s the cleanest option available, it allows us to trim the code and keep things separate. (3) isn’t too bad as we could keep legacy support for a little while before dropping it, but it’s more effort. (1) is probably going to have issues we don’t foresee when trying to mimic old behaviour with an API wrapper
(Edit: also while (3) is a nice option, the code bloat translates to a larger app, slower load time, and larger surface area for bugs)