What are the drawing capabilities coming in 1.2?

It’s slow if you change the text every frame, since it requires generating a new texture every time the text is changed. For text that is set once and doesn’t change, it is just as fast.

Edit: OpenGL doesn’t have an internal TTF drawing engine, it is too low level for that. We would have to interpret the vector outlines with freetype2 and translate them into pixels to add proper TTF support.

I see. I think textMode() as you said would be nice if Codea intends to support both methods. Well, thank you for the explanation, Simeon. :slight_smile:

@bee - If they downloaded Codea, they have internet, and access to the Codea home page, which links to this forum. I can’t imagine someone getting past spending 8 bucks for the Codea app, then giving up because there’s no low-level polygon drawing - so far, the only person I’ve seen posting here asking for it is you. If you think it’s important - make it!

@andrew - I don’t know! non-filled is easy enough; regular polygons are simple trig and line drawings. I found an interesting page on Bezier curves (bookmarked at home, alas, or I’d link it here) - and yes, my fonts (mine; the Hershey fonts, I just ported them) do curves with line segments, of course. Filled is a puzzle to be sure. And maybe that’s something the Codea devs need to add for us.

Filled polygons would be awesome.

I’d also like gradient fills.

But I agree with your main point. Give us primitive operations and anything else can be built up in open code. I learned to code when I was 10 by starting with some sample code on the Apple ][ and working out what it did and how to change it from a graphical demo to a video game. Open code, rather than increasingly powerful primitives, is key.

It strikes me that if we have filled triangles, we can build anything. I keep trying to figure out how to work backwards from a rectangle, no luck.

re. Fonts: My 2 cents is (1) a simple, fast bitmapped font gets you 90% of the way there. Past that, I’d look at exposing the whole font API for those who must dig into it.

Just had an odd idea; this is in reference to fullscreen, and print() and so on. What if, rather than a window at the side, the console output and paramater sliders were on a partially-transparent slide-down, like notifications are? So a drag, perhaps on a handle, would let you move them on/off the screen? I’m thinking like the old Quake console. Just a thought; I’d still want to be able to programmatically go full screen and so on. I’m just contemplating, once image manipulation is there, doing something like that - Write the font drawing to an off-screen image, then blit those on-screen to do scrolling text. Maybe I’ll do a demo (slower, of course, since it’s going to have to redraw all of the text every frame…)

@Bortels:

I can’t imagine someone getting past spending 8 bucks for the Codea app, then giving up because there’s no low-level polygon drawing

You won’t be able to imagine it if you keep thinking other people as smart as you are. :slight_smile:

so far, the only person I’ve seen posting here asking for it is you

Perhaps they had given up then left before asking?

If you think it’s important - make it!

I need filled polygon. I also want filled text. I don’t know how to make them using current Codea’s features. Do you? If you do, please share your code. TIA.

Heh - I don’t think most people are as smart as I am. But I also don’t think that most people spend 8 bucks on an app for self-hosting lua code on the ipad, and I’ll bet good money those people are very smart - and I know for a fact that there are lots of people posting here smarter than I am. Especially kids - their brains aren’t old and ossified like mine is.

I can give you a filled polygon, assuming you want 4 sides (or more). What I can’t do is a triangle.

You can get filled text, at least with the Hershey fonts, by messing about with strokeWidth. Go grab the latest Hershey Fonts stuff I posted and mess with the sliders.

I started programming on the Atari 400, long ago - and it didn’t have filled polygons, or polygons at all really, either. It did have a font. One size. But - we made some really cool stuff then. The limitations of the platform are not limitations for a programmer - they are challenges.

@Bortels If your surrounded with relatives and coworkers that are above average you can come to view yourself as average or less.

Go to the public political online forums in any nation to see where the standard mean is, party affiliation doesn’t matter. Whatever the other side may be they have the same range of people (they’re just all wrong).

Most can make something complicated, it takes effort to make things simple.

@all

I’d like to mention at this point that it is probally rare to find any of us unsatified with our initial purchase. So, while we may be agressive via verbosity or tone we still really like what we have.

@Bortels: You are smart. The problem is, most people aren’t as smart as you are, at least not in programming and mathematics. Yes, kids too. Some other people may don’t want to bother writing their own fonts after purchasing an $8 app because they consider it as basic feature. Or maybe they have their own need with the missing features but don’t have enough time to implement it by themselves. Or maybe they don’t want challenges, maybe they just want to have fun coding. Or many other possibilities. Not everybody want to spend their leisure time with Codea. Count me in on the last group. :slight_smile: I have enough challenges already in my daily jobs, I don’t want more. With Codea, I just want to have some fun i.e. making little fun games for my kids, or just simply playing around with the examples or other people codes, nothing serious. Am I wrong?

I use your font. It’s nice. But it draws the char using lines which means it only has one color. What I want is a font that its stroke could have different color from its fill. The same requirement for the polygons. I have posted somewhere in this forum what kind of game I want to make. Current Codea’s features can’t fulfil the requirements e.g. custom sounds (from iTunes?), vector fonts (TTF?), custom images (from Photo?), polygons, etc. Unlike you, instead of making them by myself, I choose to wait and just enjoy what is available now. Because I have many other things to do than just playing around with Codea.

@Ipda41001: Codea is very good, even on the first version. I like it. I was amazed we could do such things on an iPad. However, it doesn’t mean Codea can’t be better. This all requests and demands are nothing more than just to make Codea better and better. :slight_smile:

I see that clip and noclip are in 1.2.5 (strange numbering system here …). Could we have a sneak preview of the documentation? I have an improvement to my “balls and sticks” code that would benefit from being able to clip and I’d like to know if I should wait for 1.2.5 or do things the Hard Way.

It was ready to go as 1.2.1 with bug fixes, but we ended up adding a bunch of new features before submitting so the version went up to 1.2.5.

The API for clip is:

clip( x, y, width, height )

-- All drawing after this call is constrained to the rect defined by x,y,w,h
-- (x,y is the lower left corner)

noClip()

-- All drawing can occur anywhere now

Okay, so it’s a rectangular clip. That’s good enough for me.

What I want to be able to do is to adjust the balls-and-sticks code to be able to cope with the fact that it’s possible to specify a figure in which there is no right order in which to draw the elements: edge 1 is on top of edge 2 which is on top of edge 3 and that is on top of edge 1. My solution to this in another context was to draw the lines in some order and then go back and look at the intersections (in view-space) and redraw the upper one near the intersection. Either I need to work out the exact piece of the line to redraw, or I can draw the entire line but clipped so that it is only rendered near the intersection. I’d rather do the latter and with that syntax then it looks as though I can. So I’ll wait for 1.2.5.