StOneDOes Posted October 10, 2017 Share Posted October 10, 2017 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. Quote Link to comment Share on other sites More sharing options...
FortifyThisMFker! Posted October 24, 2017 Share Posted October 24, 2017 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. 1 1 Quote Link to comment Share on other sites More sharing options...
StOneDOes Posted October 27, 2017 Author Share Posted October 27, 2017 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.