96

Update on this: https://devrant.com/rants/1641198/...

I was a little tired but made updated and currently getting a more natural looking tree.

Comments
  • 5
    Wow that looks sick. I assume there are tutorials to do this online, but I kinda want to do this now.
  • 2
    Enlighten me with a tutorial, senpai
  • 7
    Do you mind turning that into a wallpaper for me?
  • 0
    📌
  • 2
    Looks more realistic than most trees in games, well done!
  • 0
    What tutorials did you start with for this, out of curiosity?
  • 2
    @ewpratten i will make a wallpaper and pin it here. Have to continue with it later, will make one before i break the code 😂
  • 6
    Regarding tutorial. I researched into factorials and how fractal trees look. Concept was making a constructor that draws a line given two points (i chose center bottom and center bottom - 100px) and then finds the end point of the line and make 2 new instances passing the new starting point being the end of where the prev ended and rotating aroudn PI to get random degrees between about 40 -60 degress and then just make a method to render a certain ammount to canvas

    In the end its very resource hungry so loads of fixing buuut i will re write it on its own using a library (need to research which will be best) and then post the code for you all to olay around with.

    *some library names will be apreciated for canvas engines*
  • 2
    This is a concept i want to finish this week. Rendef in a 3D space and then procedurally generate trees on a procedurally generated land (here i will research and look into Perlin noise by Ken perlin) to get a organic and natural looking plane made for games or just good visuals :)
  • 0
    Awesome job man!
  • 1
    @TrojanMorse for more ways to generate fractals check out iterated function system fractals :)
    Also, this is pretty neat, nice.
  • 0
    I'm a simple person.

    I see a beautiful tree, I ++

    Then I see the disgusting cesspit of JS, and I --
  • 0
    Keeping track of the branches becomes a hastle :( buuut nothing a whole weekend and no sleep cant fix (curls into a ball)
  • 2
    @ewpratten Wallpaper generated for you and for who ever wants, off to code and thanks for the positive feedback @all,

    https://imgur.com/a/CT14nq3
  • 1
    @Midnigh-shcode What cesspit? He's logging arrays of branches in the console. I don't even see any js.
  • 1
    @devios1

    it's running in the browser.

    logs into browser's console.

    what else than the disgusting cesspit of JS can it be?

    ...it's not a comment about his code.

    any JS code is a disgusting cesspit of JS.
  • 0
    Wonder what domain names you can score from this?
  • 0
    @Midnigh-shcode this was for debugging and its unfortunate it os rendered like this but essentially ill be using more native labgues to render this so then you can sleep easy while i dig a hole trying the above 😌 haha
  • 1
    Just a thought, but the lines are perfectly straight. Maybe a bit imperfection would look cool.

    Anyway, really cool:)
  • 6
    Share a GitHub/lab link. I am interested in the code.
  • 0
    Or share a codepen/jsfiddle link?
  • 1
    @TrojanMorse @ewpratten yeah, that‘d be interesting.
  • 1
    @Midnigh-shcode That's ridiculous. You can write good code in any language. Judging code from the language it's written in is like judging a person by the language they speak.
  • 1
    @just8littleBit will be looking to get something im version control from tomorrow as i need to finish the port to the library but it will probably be on bitBucket, havent used github in a while.
  • 1
    @devios1 u krekt, jugin ppl acrdink tu lengig dey spik defntly stooopid
  • 0
    🔖
Add Comment