It looks like you're new here. If you want to get involved, click one of these buttons!
Hi everyone
It's been a while since I did any kind of official update on Codea 4, and I've mentioned it on Twitter as well as in various threads when its come up. So I thought I may as well make an official thread to talk about it. I've started writing an introduction / migration guide to explain all the differences with the feature set, engine technology and any API changes that break backwards compatibility
Obviously Codea 4 isn't out yet and won't be out for a while but I really want to get at least a beta out to testers very soon. This is the biggest and more fundamental change to the engine that we've ever done and has taken years of our time. I want it to be as well received by the community as possible, but obviously that requires time and feedback from testers and users. Some of the changes might surprise or even annoy some of you, but I do believe its a big step forward
List of changes and migration guide:
https://johntm.github.io/Codea4-Docs/manual/codea_3x.html
Comments
I look forward to seeing the beta as soon as possible.
No voxel systems, no craft.noise. Were they abandoned, or deeply integrated?
In addition, is Codea 4 released as a new, standalone app, or as an update to the current Codea?
@binaryblues
The documentation is a work in progress so some stuff hasn't got a mention yet.
craft.noise can be put back in fairly easily. The entire voxel system is pretty complicated but I want to give it the same treatment as everything else (more streamlined and tightly integrated). It just hasn't been done yet.
This release is an opportunity to rework systems, so I'd been keen to hear if there's specific ways voxels can be improved. I think my mistake the first time around was underdocumenting it but also it being such a big complex system in the first place. I almost just want to have voxel volumes that are really flexible without requiring a lot of setup
It's nice to hear that voxel systems can be maintained, and I think it has a lot of potential and is well worth the time it takes to maintain it (for developers) , it is also well worth the time spent in-depth learning (for users) .
But it was also complex enough that it took me a while to understand its basic use. Regarding the system documentation, I've been going through the Codea4 documentation, and it feels like a big deal.
Do you need the assistance of the community? I'm talking about documentation assistance. I'm sure there are plenty of people who would be happy to help, including me, if necessary.
Waiting in anticipation. Thanks again for the thread
Edit: could be useful up front to let users know if there are any limitations on what kit can support it and any limitations - like introduction of metal etc.
@binaryblues
The documentation is hosted on github and is automatically regenerated from source when new commits are pushed. So any approved pull requests will automatically update it. In case you are interested we're using https://www.sphinx-doc.org/en/master/ for our new documentation
@Bri_G
I'll be sure to add a section that will make note of any features that are missing and still in the works. From off the top of my head the following are currently missing:
On the bright side the new internal engine structure is very modular and makes it very quick to add new features / integrations
Some new features that have been added that I haven't really talked about:
There's also the scene editor, which is still a work in progress
Added support for skinned mesh animation import (exposed via
mesh.animations
Can’t wait to try it out, seems like it will be straight forward for 2D ~but I wonder about shaders, will raw glsl code still work?~ oh never mind you already answered this and the answer is yes can still use glsl
@skar Yes, we have a shader cross-compiler from GLSL to MSL. No doubt we'll run into bugs here and there since the process isn't 100% reliable. But at least we get compute shaders!
It looks amazing!
Keep up the good work
@Simeon @John not to put a damper on things but I didn’t notice any docs regarding breakpoints and debugging. There was previously a mention of the possibility and desire to add better support for debugging so I hope it hasn’t been totally forgotten. I got stuck on a bug that was really difficult to figure out using print statements.
@tnlogy The move_and_slide() function for their KinematicBody class looks interesting. Not exactly sure how to implement it (Some kind of one way collision processing I presume). At the very least we'll have kinematic bodies that can be moved manually, will have to look into this kind of thing though. As for image processing I've found that compute shaders work pretty well and I have made some image filter classes using them
@skar I'm still looking into proper lua debugging. I've actually got some stuff working with a socket-based remote debugger, but I need to build a front end to both control and display the results. I wanted to prototype one using Codea itself but you end up with a paradox (lua is frozen while being debugged). I also tried multiple multithreaded instances running in parallel but that comes with a host of issues. So I think either a web-based javascript debugger or a native swift-ui one will probably have to do. Still needs more work. Either way the debugger will exist inside and be possible to remotely access, but might require some hacking before an official debugger interface is built.
Ok, guess I will stick to shaders for processing
What is the main goal of Codea 4, the reason why you want to change the version from 3 to 4?
@moechofe2
There are quite a few reasons. The current runtime is around 10 years old now and many of the technical decisions over the years have made maintaining it much more difficult than it should be and have made it all but impossible to support certain features
Goals for Codea 4
* Changing render API from OpenGL ES to Metal (future proofing)
* Moving closer to a pure C++ backend (future cross-platform support)
* Merging redundant or duplicated craft features (mesh/model, texture/image, shader/material, etc)
* Streamlining various API calling conventions
* Improving Lua bindings (making new features easier to add in future)
* Compute shader support (impossible with OpenGL ES on iOS)
* Editor support and scene serialisation
* Reduction of technical debt, spaghetti code and making overall engine design more modular
@John,
Built in 3D movement commands would be nice (e.g. Entity.move.forward or Entity.move(vec3(x,y,z)) where x,y,z are movement relative to the entity rather than x,y,z coordinates in the 3D scene).
Thanks! :-)
@SugarRay Could have something like
myEntity:translate(x, y, z, LOCAL|GLOBAL)
which gives you both optionsJust a note as well in Codea 4 you can add new functions to existing built-in types.
So if you wanted to you could do this:
And now you can use this function on any entity
@John: Great!
The only hold up right now is getting the editor ready. Also considering if it needs to be a separate app (even if just for the beta) so that you can easily keep running 3.x projects without having to switch builds
Nice
if it’s a separate app then keep it separate so we don’t have to migrate twice
This sounds like great news. I was metal-openGL concerned. Also shows that the people behind Codea keep working on it.
I would imagine the ETA for Codea 4 to be out is a year away? (so May 2023?).
I would in particular welcome a very robust export to Xcode to recompile as I am seeing a lot of issues in Codea 3 regarding that, and I can't see how you publish on the store an App without recompiling it.
a couple more things i wonder about, not trying to delay any development but we can’t pause sounds, will there be any improvements on the sounds system?
any plans to add video playback support? it would be ideal to be able to play videos in containable boxes as well as full screen
there were some posts about controller (external device) support, and @jfperusse gave us an easy way to use objc to add support but will it be built in to codea 4?
I'm really looking forward to Codea 4, it really looks amazing!
It would be great if it could be its own separate app (or if you could somehow keep the Codea 3 runtime as an option). Otherwise, it might be a little intimidating to update as projects could break - especially if it is still in beta and going back to the AppStore version might be difficult or require to migrate back to the old API. I don't know, though, how easily we can transfer projects and e.g. the documents-folder from one app to another.
I agree with @skar on the sound system. As far as I know, 'pan' doesn't work for sounds that are already playing and it's not really transparent how many sounds can be played at the same time. Sometimes, if there are only a few sounds playing, new ones are simply ignored. It would be great if that could be improved some time in the future.
Anyway, this really looks to be the biggest step forward for Codea and I can't wait to give it a try!
@Elias if it remains a single app then 3.x projects will still be supported
@skar
Sound system is improved with support for pausing, fading, seeking with potential for buses, ducking, filters etc… there’s also a waveform generator so you can make procedural sounds
I’ve got a visual debugger interface working in Codea 4. Technically it could work in Codea 3.x as well but be slow due to lack of support for OP_HALT which requires a regression to Lua 5.3 at the moment
Oh, if that's the case then a single app might allow for easier migration as all assets and projects are already there. But both approaches seem sensible to me.
Sneak peak into some of the progress on Codea 4.x
Beta is coming along and will be putting it out there soon hopefully
I've started work on a tutorial series for Codea 4 as well:
https://github.com/JohnTM/Codea4-Docs/tree/main/docs/source/code/Examples/How to Codea
Only 1 suggestion, not going into some of the Lua text facilities, but a simple example of concatenation of text to text and text to variable (in the text example) would be useful.
Thanks, will keep looking through these and post any ideas I have.
@Bri_G Yes there is more planned, I've only just started sketching out what I want to have. There are a lot of potential topics and concepts to cover
Not sure what you mean by text concatenation, are you referring to the Dialogue project?
~~~
Foo = 21
print("Foo is equal to : "..Foo)
~~~
Showing the ability to build strings and incorporate values. Added to Hello.lua .
p.s. apologies if the code formatting doesn't work, wrote this on my Android phone.