Jump to content

Footpath Suggestions


StOneDOes
 Share

Recommended Posts

Hi guys,

 

What sort of technique would you recommend in order for building a footpath in a game like rollercoaster tycoon? I would like to be able to click with the mouse and place a footpath tile. Would decals be the right way to go here? Would they be efficient enough, since there could be (hypothetically) somewhat hundreds of tiles on screen at a time?

 

Thank you.

Link to comment
Share on other sites

  • 2 weeks later...

I've done lots of this tile editing work in 2d games. But in those you just had a array of x and y, and a bunch of textures that updated depending on the texture beside it as you changed the arrays interger. Usually a tile sheet, like a sprite sheet, so it was easier to keep tack and figure out the math when you had to change textures when drawing corners or odd shapes.

the idea here is very different in 3d because the land could have hills or spikes. Id look into the Source engine approach where you have a multi-layered texture and manipulate the alpha on the highest layer at vertices.

But doing this on a flat plain with sprites could be done. I Don't know LUA much, but in any other c language you'd use a for loop mutli-array that initializes a width and height setting each to an initial value of zero, which would be your nothing (alpha) texture. Then when the player clicked on that tile you would set the value to something else, which would tell the draw function to draw it a different way. then you add the math to effect the surrounding tiles and change their values to connect with other tiles to draw the right connecting textures.




 

 

  • Like 1
  • Upvote 1
Link to comment
Share on other sites

Thanks mate, sounds good to me. That's what I was thinking in terms of having a multidimensional array - at this stage I believe I'm only going to be using a flat terrain, which I may change later. Perhaps I'll try something more advanced in a further version of the game where footpaths can possible be more so painted on, and use more complex terrain as well. Maybe that spline tools could be very useful for me one day.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...