Quick Links: Gideros Home | Download Gideros | Developer Guide
Creating Star Wars like text
  • Hello,

    Has anyone experience with making a moving text wich will
    disappear into the depth (see the attachement). A normal
    moving text by using fonts (setPosition) is quiet easy but
    going into another dimension....


    303 x 166 - 9K
  • Looks nice. Thanks. No idea how to implement HTML5 and CSS
    into my Lua project.
  • @Dikkensnoek as far as I know you can't embed html5 or css in lua. :) You could try to understand how the code works and try to replicate its "logic" in your lua project.
    I suppose it's something you can do with a textured Mesh.

    However try googling for "perspective" and "raycasting", maybe there is something to put you in the right direction. Good luck! :)
  • hgy29hgy29 +1 -1
    Hi @Dikkensnoek,

    @pie is right, you can achieve this using textured mesh and rendertarget. In fact, I found your goal an interesting challenge and took some time to try to achieve this myself. And I am pretty proud of the result (see attached project, and feel free to reuse part of it).
    However I had to hack/tweak a little to make it...
  • DikkesnoekDikkesnoek +1 -1 (+1 / -0 )
    Whooooaah. That is really amazing!!!! I did this in the first place
    with Windows Moviemaker. In that case you have to play a
    videofile (see my previous post). What I also did was to extract
    all the frames from the movie file and try to load it and play
    it with a MovieClip object. The whole app became very slow.

    Thanks a lot,


    Likes: hgy29

  • hgy29hgy29 +1 -1
    You are welcome :)
    BTW, the Mesh part is really ugly. Its a pity the Mesh doesn't support GL_QUAD... and Z coordinate would have been welcome too :P
  • I am studying the Mesh object at the moment. I've never used it before.
    It's not really clear how it works. Am I right that you create a triangle
    where the text will be cutted off? What is the best way to change the
    size and position of the text?

    Regards and thanks again,

  • hgy29hgy29 +1 -1
    The basic idea is to render the whole scrolling text to a texture (with RenderTarget) and map this texture on a trapeze shaped Mesh. But while building a trapeze shaped mesh should only require two triangles, texture was not rendered consistently accross those two triangles. I am still trying to understand why...
    Two achieve good effect, I had to divide my large trapeze in a stack of small ones from near to far field, and compute texture coordinates accordingly. Appart from working well, this technique also adds to ability to define an alpha gradient, making the texture smoothly fade out into deep space.

    To change size of the mesh, you can modify farlen (little/far edge of the trapeze), nearlen (long/front edge of the trapeze) and fardist ("height" of the trapeze).
  • hgy29hgy29 +1 -1 (+1 / -0 )
    I've reworked a bit my code so that it is little more tunable, and I added a better perspective effect. Now it looks like LucasArt's one!

    Likes: pie

  • Thanks again. This one is really superb. The example
    is interesting to place in the tutorial section on, for
    example the Gideros site. I will experiment with your
    examples. When I succeed will let you know.

    I was wondering, are you working on a game too, or
    have you released (a) game(s)?

    Have a nice weekend,

  • hgy29hgy29 +1 -1
    I've released my first game by the end of last year, and have a few other games in progress, but unfortunately no much time lately to work on them..

    Have a nice week end too :)
  • talistalis +1 -1 (+1 / -0 )
    @hgy29 really good contribution. Thanks for sharing and making the code so understandable. =D>
    @ar2rsawseen please add this code to tutorial section .

    Likes: hgy29

  • I am working on a funny shooter with parallax scrolling. Before the
    game starts it will show a Star Wars like text with some weird
    elements. Is there by the way a tutorial on the Mesh subject? I've
    seen the term Vertex before in creating collision stuff in the
    Physics Editor.

  • Hi again,

    Could it be possible that something in Gideros has been
    changed? For example Rendertarget. @hgy29, I can't get
    your code running anymore.


  • It seems that the latest Gideros version is a little bit buggy.
    The Player is also not usable. I am switching back to the
    2014.01 version.


  • hgy29hgy29 +1 -1 (+1 / -0 )
    Hi Marc,

    Indeed something has changed in Gideros, and its about Meshes.
    In my sample code I was doing something that I shouldn't: overriding a class constructor with different parameters. This broke when I added an arg to Mesh constructor.

    Below is a fixed file.
    BTW, New 3D features make it more easy to make such effects.

    Likes: pie

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Login with Facebook Sign In with OpenID

In this Discussion

Top Posters