Jump to content
  • Advertisement
Sign in to follow this  

How would you handle this?

This topic is 2065 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have an ideea for a game but I can't figure exactly how to make make the hard part.


The hard part is, The game is 2D,and it would have a terrain texture. That terrain texture will be cut, so it will appear like there are hills.But the problem is,I have to cut that texture and display it forever,because I want to make a sidescroller. (so the hills will be procedurally generated in realtime)


Cutting the texture wouldn't be such a problem,what worries me are the physics.If I were to somehow write a function to find the points at the edge of every hill and make a shape for collision detection,that might take just too much time,given the fact that the terrain has to be cut TOO,before doing that.


forgot to say,the game would be for android,so I don't have PC resources.



And how should I cut the texture? Should I just check if the height of each pixel is bigger than the height of the generated point's?

Edited by noatom

Share this post

Link to post
Share on other sites

I'd do a couple of google searches like:


procedurally generated side scroller

procedurally generated side scroller tutorial


and get to reading.


And instead of generating the texture and finding where you should "split" the texture. It might be faster to reverse that. Generate a collision map, and figure out how to fit the texture to your collision map.


- Eck

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!