Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

focus discuss; alpha-1.0+parrott #153

Closed
ruby0x1 opened this issue Nov 5, 2014 · 5 comments
Closed

focus discuss; alpha-1.0+parrott #153

ruby0x1 opened this issue Nov 5, 2014 · 5 comments
Assignees

Comments

@ruby0x1
Copy link
Member

ruby0x1 commented Nov 5, 2014

Please read these two posts in full before commenting below :

@DjPale
Copy link
Contributor

DjPale commented Nov 11, 2014

Ref. TextOptions and in general - Should we include blur, outline and shadow? This would allow for more flexible options for BitmapFonts at least - so we don't have to pre-render. Not quite sure how to solve this though - but I guess this can be discussed more in detail on a particular issue number if we want to support this. For #98, what is not clear to me is if we still focus only on BitmapFont or also considering TTF / glFonts or similar.

@ruby0x1
Copy link
Member Author

ruby0x1 commented Nov 11, 2014

For #42 you will find mention of other font support. BitmapFont is preferable in many cases for games as it allows a lot more expression for a lot less complexity. In the first versions at least focus will be ensuring that it is solid and useful for all kinds before moving onto more complexity getting into the core code, and even better, how to support these without having it be baked in, so multiple approaches will be possible.

Secondly, why would you want to blur text hah? That would easily just apply to the geometry as a shader, but with regards to outline and glow you will find that Signed Distance Field font shaders support a few small set of things like that - possible with low cost. The bitmap fonts in luxe will have SDF soon, so they will inherit this "for free" to some extent.

For most effects - at least for initial versions of luxe - this is the job of a module, not the core code as it's possible in many different ways, and many won't fit what somebody might want from it.

@DjPale
Copy link
Contributor

DjPale commented Nov 13, 2014

Ok, makes sense. Agree that it is good enough to focus on the BitmapFont for now.

@AndreiRudenko
Copy link
Contributor

Hello!
Is it possible to draw Bezier curves?
I want to port your game from love2d (Lua engine). I'm just starting to understand haxe.
I'm interested in 2D polygon mesh for drawing arbitrary textured shapes. as here http://love2d.org/wiki/Mesh
Thank you.
Andrey.

@ruby0x1
Copy link
Member Author

ruby0x1 commented Nov 21, 2014

Everything in luxe is essentially a "Mesh" as it is 100% hardware based. What you are probably looking to do is :

var options: luxe.options.GeometryOptions = {};
      options.batcher = Luxe.renderer.batcher; //required
      options.primitive_type etc

var mesh = new Geometry(options); 
      mesh.add( new Vertex( pos, color ) );
      mesh.vertices[0].uv0.set_uv(0,0);

mesh.transform.pos = etc 

Geometry
Geometry Options
you can also use Luxe.draw.* functions here to create pre-made geometry
Draw

Hope that helps. You can also ask questions at http://gitter.im/snowkit/public , as this thread is for a focus sheet :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants