Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Draw Line with texture? — Gideros Forum

Draw Line with texture?

mertocanmertocan Member
edited February 2013 in General questions
Hello , i am working on my new game and in this game user will be drawing walls to protect world from the meteors. I am drawing walls with the drawline function. However, i need to use textures for walls. How can i do it?

Best Regards
Mert


Tagged:

Comments

  • BJGBJG Member
    edited February 2013
    Crumbs, that sounds harder than striped paint.
  • Well you can't set texture as line style, that's for sure. So either you'd have to use some interesting combination of colors and alpha to make it appealing.

    Or draw the Shape object around the drawn line, which can be hard on calculations.

    Or use a bitmap object of some simple image of I don't know rock, and put it every, for example, 5th or 10th pixel. And then when something collisions this object it gets removed.
  • mertocanmertocan Member
    edited February 2013
    Can i do it with mesh?

    I tought that all these lines are one object so i can put a texture on the objects at the same height and width. Is it possible?

    I tried to put Shape object around the drawn line but when i draw something , some spaces occurs on intersections. So , it is not working good.
  • talistalis Guru
    edited February 2013
    Out of Topic : :D
    I am %100 sure that this video is only alpha stage of game and you will change it but some ideas comes to my mind. Maybe you already thought about them so just neglect them please if you do so:D Some of these ideas can be even difficult or impossible to implement as i said these are just ideas of mine:D

    1-) the defense grid should have some cool down. I mean the player shouldn't able to draw defense grid continuously. (line)
    2-) after waiting some time without drawing the cool down will trigger (like a bar) and the user can start to make defense grid again.
    3-) there can be different kinds of defense lines like;
    -reflecting the asteroids
    -destroying the asteroids
    ....
    4-)there can be special powers for the player to be used only limited amount of times ;
    -emergency planetary defense : When activated there can be small satallites appear around the planet and for some amount of time destroy incoming asteroids.
    -fighter call : some fighters appear (small ships) and can start attacking asteroids for some time.
    -black hole bomb : some missile can be fired from the planet to some space and around that space the asteroids will be sucked inside.

    Let's come to story part:
    The fate of life on our planet has always depended upon the sun's destiny.
    In year 2240 our sun exhausted the supply of hydrogen in its core and switched to thermonuclear fusion of hydrogen in a shell surrounding the core. As a result of explosions in the core our sun start to rupture. Everything has been tried but nothing can change the fate of our planet. Scientists realize that there is no escape from destruction, it is the doomsday of the planet but not humans.
    You have to defend our planet till human colonies can escape...

    As i said these ideas just popped in my mind when i watched the video. Hope you will release the game soon and i can have some play test :D

    Likes: mertocan

    +1 -1 (+1 / -0 )Share on Facebook
  • Thanks for advice and really good ideas :)
    I thought about all of them but i have some differences than yours. For example,

    1-There will be different defense lines like
    -Iron Wall
    -Elastic Wall
    -Wooden Wall
    -Crystal Wall
    ....

    and also users will try to draw shapes around the world. I mean if users can draw a well proportioned circle , a protective objects will occur around the world :) Also as you said there will be cool down. Because, if users draw continuously , game will be getting slower as there are so many collision detections.

    I was thinking about the special power and one of them was the meteor repellent like missile. Users will be able to buy it with the game coins. Then will be able to upgrade it. However , i think this game will make me tired :)

    Sorry for bad English . I hope you understand me :)

    Mert
  • @mertocan if you use shape you can have no line style and a fill style of Shape.TEXTURE. This might solve your problem.

    Only thing I am not sure on how to do is to use the texture is such a way that the pattern will match up when drawing different lines (the texture starts from a different offset based on the position of the page specified).

    Paul
  • I did it like this





    How it looks?
  • As a solution looks cool, what method did you use in the end? :)
    As a graphic, I'd say it needs to be something more futuristic, as a some sort of a laser or field, something more electric maybe? :)
  • I have used different methods for this :D But it is like just putting a circle bitmap to the place where you touched. My friend will work on graphics. These graphics are just for trying. Later , they will change :)
Sign In or Register to comment.