# Programmatic 2D maps

**URL:** <https://forum.kirupa.com/t/programmatic-2d-maps/271283>\
**Category:** programming\
**Created:** [September 20, 2008, 8:53pm UTC](https://forum.kirupa.com/t/programmatic-2d-maps/271283 "2008-09-20T20:53:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sceneshift](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@sceneshift](https://forum.kirupa.com/u/sceneshift)\
**Post date:** [September 20, 2008, 8:53pm UTC](https://forum.kirupa.com/t/programmatic-2d-maps/271283/1 "2008-09-20T20:53:23Z")

</div>

Hey guys,

I am creating a 2D platform game which uses a variety of different ‘platform’ / ‘tile’ types. I am drawing each time programmatically using copyPixels but I’ve come to a bit of problem when creating tiles that arn’t simple squares (or rects.) Lets say I wanted to create a sloping tile, or perhaps even a curved tile. How would I go about doing this? Taking into consideration collisions, I have absolutely no idea how I would create a sloped tile.

I have absolutely no idea how I go about rendering the map using copyPixels to creating a set of collidable tiles / coordinates for my player. Any help would be appreciated!

Thanks.
