Codea Craft - Official Thread

This looks absolutely fantastic. An absolutely phenomenal feature set which really plays to Codea’s strengths I feel. It’s as if Unity has arrived on the iPad!

I think an IAP upgrade would be very fair.

Glancing through the feature list, I have a quick question, does it come with support for working out which 3D object has been touched? Is this what is meant by “raycasting” in the “camera” section (similar to Camera.ScreenPointToRay in Unity or SCNView.hitTest in SceneKit)? Although @Ignatz and @UberGoober managed to implement mapping of 2d touches onto the 3d scene, it was something of a marathon effort from them to get this working.

@featherfx Unfortunately ad and survey grinding (earning points by watching them) might be against most ad providers’ terms of service.

@yojimbo2000 Yes, Codea Craft is inspired by Unity, just as the original Codea feature set is inspired by Processing. At the moment you can use the physics system to do picking (on physics shapes rather than polygons directly). If you use a MeshShape with your rigid bodies then it will allow for picking polygons directly.

Here’s an example:

function setup()
  require 'codeacraft':export()
  world = World()
  physics = world.physics
end

function draw()

  world:update(DeltaTime)

  camera = world.camera:get(Camera)
  local origin, direction = camera:screenToRay(CurrentTouch.x, CurrentTouch.y)
  hit = physics:raycast(origin, direction, 100)
  if hit then
    -- hit contains: entity, rigidbody, point, normal and fraction
  end

  world:draw()
end

I currently have this working as well as physics:sphereCast(), which I’ve used to implement a capsule shaped character controller (which works with the voxel system as well).

@John that’s fantastic, I can’t wait.

I’ve had a blast working with 3D in Codea so far, but an awful lot of dev time gets taken up with implementing features like these. Although I’ve learned a tremendous amount getting stuff like this working, Codea Craft’s C++ implementations will presumably be much more performant than the Lua-based ones we’ve been using. Most importantly though, Codea Craft will free us up to focus on what really matters, creating awesome experiences and games.

I have another question while we’re on the topic of taking inspiration from Unity: what level of 3D assets are you planning on bundling with it? My suggestion would be to hire a 3D artist (or license their work) to create genre-themed asset packs, which you could offer as additional IAP. E.g. A dungeon set would have dungeon fittings, treasure chests, skinned orc/ goblin/ dragon fbx models etc all the assets you’d need to create a great dungeon-crawler. It’d be similar to the Unity asset store.

I think this is one of the most attractive parts in the Unity ecosystem, as it’s a point where lots of indie devs struggle, in not having the time/ 3D skills to create and animate 3D assets. Even if you do buy assets online (or download free ones), getting them into your program and displaying correctly can still be really tough (especially if there are complex materials or skinned animations involved. Getting skinned animations out of a 3D authoring tool to display correctly in Apple’s SceneKit is a major, major headache).

I’d definitely drop $8 for a set of themed assets, if I knew I could drop an animated elf/ skeleton and have him/ her/ it run around in my code at the push of a button.

In fact, that’d be my recommendation for the pricing model. Make Codea itself and Codea Craft cheap, or free even, but offer themed asset packs at $3-10 / pop. Space-themed assets, dungeon- themed, cute-platformer themed etc.

You could do this for 2D assets too.

The 2D assets that ship with Codea are rather lacklustre (and are the same as the ones in Pythonista, and other IDEs. In fact, the Pythonista ones are better, because the Codea ones seem to have frames of the animation missing, so we can’t even make the dude with the bubble helmet walk properly in Codea).

I think the really big pay off for this approach would be that it would make Codea sample code look way better than it often does currently. People would look at the App Store description of Codea or come to the forum and see incredible animated graphics, instead of the same dude with the bubble helmet that’s in every other IDE, not even doing a walk cycle.

Suggestion for Codea Craft:

Project Uploading

As in GitHub allow from Codea itself uploading games to ex. ** codea.io/files/TokOut/qidNe.txt ** , were Packages Project Meshes will be automatically uploaded with, and from another device for example give the random ID “qidNe”, so people can install codes with packages already built in

Codea Server
To make multiplayer games, Codea Users will receive a part of the Server running, something like

function register(n)
    online.column({
        name = n,
        registeredTime = os.time()
    })
end

If Codea get Servers the popularity will definitely grow by 10,000 people (maybe)

json.encode
Json encode can currently save only pairs (tables and classes).

→ Add JSON for images. Cause I am Sure that you want to save image() global

Character Controller Example progress:
https://youtu.be/93wu6RV2MF8

@yojimbo2000 Paid asset packs is an intriguing concept. I’ve been looking at the new assets released by kenney.nl since we included his assets and we could potentially include a significantly larger catalogue (especially since mobile download limits have been increased by Apple).

Currently I’m looking at including these 3D asset packs for free at a bare minimum for the first release:
Nature Pack (as seen in roller demo)
Blocky Characters Pack
Watercraft Pack
Modular Buildings Pack
Weapons Pack
Minigolf Pack
A 3D primitives and prototyping pack (generic useful shapes).

@simeon Is actually a very talented 3D artist so he might be able to chip in some cool models. We are already considering including the assets from Wheeler’s Treasure (our first iOS game).

For both 2D and 3D I’ve already aquired a license for this:
https://www.youtube.com/watch?v=P3zizwd2rXA

Which will be used for particle effects in both 2D and 3D.

Wow, looks like you’re pulling out all the stops! Particle effects too.

I think it would be amazing to have an actual asset store! Just like gamemaker or unity3d. Would this be against apple’s rules?

I would LOVE to be in the BETA TEST. Also great work so far on Codea craft, i think a IAP would be the best.

Another question, if I may. Will you be supporting cubic textures? I find these to be the easiest way to implement skyboxes (as well as reflective surfaces). If so, will it be possible to load cubic textures into GLES shaders via Codea’s shader API?

Please add this assets

http://kenney.nl/assets/3d-road-tiles
http://kenney.nl/assets/isometric-blocks
http://kenney.nl/assets/boardgame-pack

@yojimbo2000 Yes cubemaps will be supported by the new rendering engine. I may also back-port those to the existing shader API.

@TokOut - The first 2 will most likely be added. I’m not sure I like the look of the 3rd one however.

Hi @TokOut I’m not sure I understand what you mean by all 3D assets? I’m planning on including any that I find suitable (quality and usefulness). Unfortunately not all Kenney.nl packs can be added due to bloating Codea’s app package size, so I prefer to be a bit picky.

Please do not make multiple posts in a row, but instead just edit your original and add the new ones after typing Edit: so we know that you changed your comment. I’ve merged your comments for you to give you an example.

Edit: To answer your other question, you can make your own objects in a 3D package such as Blender, Maya or 3DS Max, or you can use code to make a mesh as well.

Ok, do not import the 3rd one, why don’t you want to use all 3D Assets?
And also question:

So as said these are 3D .obj models. Can you load your own objects? And how to create them? Will be meshes avaibel for these objects?

Edit: (Merged posts - @John)
P.S. You have maybe overseen this package:

http://kenney.nl/assets/medieval-town-base

And these would be cool, too: (Just showing you, no need to add)

UserData

Font

Edit:

WTF Lol: http://www.turbosquid.com/3d-models/free-british-colonial-complex-3d-model/691507

Thx,

EDIT

Can I be in beta list with a question mark?

@John - just shut up and take my money already :slight_smile:

+1 for @YoJimbo2000’s idea of an asset store. If Apple do get a little finicky about it you could always implement it as part of the Codea website and then have people log-in via the app to get the latest assets - although I’m sure downloadable asset packs for graphics / sound would be ok (code examples probably not).

As for the new Kenny assets +1 for the 3D road tiles pack - that’ll make it easy(er) to re-create the old Bull Frog classic “Populus” or EA’s Racing Destruction Set in Codea :slight_smile:

I CAN’T WAAAAAAAAAAIT!!!
I’m curious about the materials and lighting. Will object materials have settings like reflectivity and transparency? And will there be different light sources, such as point, area, and spotlights?

@Dwins This is something I’m currently working on. The plan is to fully support multiple lights (spot, point and directional) along with various material properties (ambient, diffuse, opacity, specular, environment, normal maps, emissive, etc…).

@John

How is one given access to a closed beta? I am a student at a university and codea has been the best tool I have ever used to learn programming. The community members included.

If I could help give back by testing out the new features I would love to do that. However, I’m still wouldn’t call myself a seasoned programmer, but I feel very comfortable in Lua.

@John @Dwins super cool! Can’t wait to play with Codea Craft :slight_smile:

This is the first time I have ever posted a comment, so forgive in advance me if I make a mistake. I am a pretty good programmer, but the thing that sort of bugged me is how Codea can only post it on the App Store (at least, with ease), and since you said you got the inspiration from Unity, will you make it compatible with more platforms?