This is my first time posting in these forums and i apologize if this has been asked, but i didn't see it.
I am looking to start running a game for my friends, and I was hoping that some of you might have some good ideas for organizing story elements and encounters, and to avoid putting my adventure on rails. I really dislike they way Hoard of the Dragon Queen runs, so that would be an example of what i am trying to avoid
First, talk to your players about the kind of game you want to run. Seek their buy-in on the premise and format. Ask for their input in other areas. Work with them to establish the basics of the setting. This page-setting discussion is often referred to as
Session Zero and there are a lot of topics you can cover here. In my experience, the better and more thorough your Session Zero, the better the game will be.
Next, check out the front system in Dungeon World. This is a way to organize your thoughts on what opposes the player characters.
Here is a link to this free resource. (Read the whole GM section if you can.) Fronts are "a collection of linked dangers—threats to the characters specifically and to the people, places, and things the characters care about. It also includes one or more impending dooms, the horrible things that will happen without the characters’ intervention." Some dangers might be based on elements of your player characters' backgrounds. Others might be unrelated.
As well, make sure your players establish short- and long-term goals for their characters during Session Zero as well as reasons to work with and trust the other player characters. Put some of your dangers in direct opposition to those goals. Have others be related but tangential. Have them make moves toward fulfilling their impending doom when it is dramatically appropriate, show the results, and leave it to the players to respond.
Finally, kick off the campaign with action. I recommend a dungeon in which the players have established their characters as wanting to explore before the game ever begins. While they explore this dungeon and overcome the challenges within, ask questions of them to help flesh out their bonds with each other and to uncover ideas that you can use later in the campaign. Write this stuff down - it's gold. When they emerge from the crucible of the dungeon delve, battered, bruised, and bonded, they'll be ready to take on your world - one which they helped create and in which they are invested.
Good luck!