Are the example programs that came with older versions of Codea archived anywhere? I’d particularly like to look again at the one that was available pre 2.1 that drew hundreds of mesh objects. If someone could post it again, or point me to where it is, that would be great.
on the wiki page
But only some of them have actual links through to the code. There doesn’t seem to be a link for “Hello Mesh”
I’d like to have a look at “spritely” too
spritely probably isn’t a good example, because it stores the images very inefficiently
if you want the mesh code so you can figure out how to draw them efficiently, just ask, there are quite a few good techniques
So far in my own code, each object has its own mesh. But if I remember correctly, the hello mesh example added a bunch of rectangles, one for each of the gems, to a single mesh. Then did it animate them with setrect?
Have a look at this recent thread
drawing one mesh for each object is not the best way. You can, as long as you don’t draw large amounts of items.
Using one single mesh and being allowed of one texture for mesh, you’ll need to learn how to use sprite sheets. Which is something I’m currently dealing with atm, and it is not that hard as it seems.
@Ignatz yes, the code in the thread that you linked to does something similar to the old “hello mesh” example. A bullet hell shooter would definitely be possible!
Actually, I was also interested in the spiral pattern that the gems were animated in, in the old “hello mesh”. If the author doesn’t mind, it would be nice if someone could post it again.
@Ignatz thanks for posting the examples page on the wiki. I didn’t realise that for some of the code it has fully commented versions of the examples. I’m going through the Physics Lab one now. Perhaps these fully-commented versions from the wiki are what should be shipped with Codea? Especially for beginners, they’re a lot easier to understand than the largely comment-less ones that ship with the program.
@yojimbo2000 - I don’t recommend the physics lab because it has a big chunk of code that is totally unnecessary in most cases, and I wasted hours trying to figure it out.
I would look for simpler examples. I think I put one on the wiki page under the link to step by step projects. If not, there are plenty of other examples, and my Codea ebook covers physics too, keeping it simple.