Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Creating Star Wars like text — Gideros Forum

Creating Star Wars like text

DikkesnoekDikkesnoek Member
edited February 2015 in General questions
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....

Regards,

Marc

Comments

  • DikkesnoekDikkesnoek Member
    edited February 2015
    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 Maintainer
    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...
    zip
    zip
    StarWars.zip
    236K
  • DikkesnoekDikkesnoek Member
    edited February 2015
    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,

    Marc

    Likes: hgy29

    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    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,

    Marc
  • hgy29hgy29 Maintainer
    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 Maintainer
    @Dikkesnoek,
    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!
    lua
    lua
    StarWarsEffect.lua
    1K
    lua
    lua
    main.lua
    2K

    Likes: pie

    +1 -1 (+1 / -0 )Share on Facebook
  • DikkesnoekDikkesnoek Member
    edited February 2015
    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,

    Marc
  • hgy29hgy29 Maintainer
    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 :)
  • @hgy29 really good contribution. Thanks for sharing and making the code so understandable. =D>
    @ar2rsawseen please add this code to tutorial section .

    Likes: hgy29

    +1 -1 (+1 / -0 )Share on Facebook
  • DikkesnoekDikkesnoek Member
    edited February 2015
    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.

    Regards,

    Marc
  • 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.

    Regards,

    Marc
  • hgy29hgy29 Maintainer
    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.
    lua
    lua
    StarWarsEffect.lua
    1K

    Likes: pie

    +1 -1 (+1 / -0 )Share on Facebook
  • I added my own version of star wars text to this alpha of my game `;)

    http://www.sinistersoft.com/RetroStar/gideros.html
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
Sign In or Register to comment.