|
||||||||||||||||||
Add Forum to Favorites | Send Topic To a Friend | View Forum FAQ | Track this topic |
Last Thread Next Thread ![]() |
| Tiling in OpenGL |
|
![]() grayaii Member since: 5/12/2005 From: Brighton, MA, United States |
||||
|
|
||||
| Cool article. I'm coming from a DirectX background and I've already completed my first tile based game (www.graycoresoftware.com) and I'm pretty much done with my second version, but I'm contemplating switching to OpenGL. The concepts are pretty much the same, but I have a newbie question: What happens if I have all my tiles in one giant bitmap file? Is it easy enough to load that giant bitmap into memory and then create all the multitude of 32x32 textures during init? I assume it's pretty easy to do, but so far my initial googling abilities haven't found anything that I could use. -Zander- www.graycoresoftware.com GrayCoreSoftware.com |
||||
|
||||
![]() Darragh Member since: 3/1/2005 From: Wexford, Ireland |
||||
|
|
||||
Quote: Yeah it's simple enough to do. You just need to fiddle around with the texture coordinates a bit so you are only using part of the texture (coressponding to one tile) and not the whole lot. If you're using LOTS of different tile textures though things might get a bit tricky since you might need more than 1 texture, but I wouldn't worry about that for now. www.darraghcoy.com - projects |
||||
|
||||
![]() grayaii Member since: 5/12/2005 From: Brighton, MA, United States |
||||
|
|
||||
| You're right. It's not that hard to do at all! I have working code in c# that's doing it right now. I probably won't post it until I polish it off, but in the mean time I found this website that was as useful as this article is (IMHO): http://www.meandmark.com/tilingpart4.html As I get my feet more and more wet with OpenGL, I'm beginning to like it more than DirectX (At least *managed* DirectX that is... mostly because the default installer for DirectX 9.0 and above do *not* install the managed files unless you pass in some commandline args... and for 10MB RPG game, I don't want the user to re-download a 40MB+ DirectX 9.0c installer just so that you can get the managed files installed, even if they already installed 9.0c in the past). The differences between OpenGL and DirectX is a religious war that I don't want to get into, but so far switching from DirectX to OpenGL has been a good experience. It's probably too late in my release cycle to stop using DirectX, but I think for my next game I'll exclusively use OpenGL. |
||||
|
||||
All times are ET (US)![]() |
Last Thread Next Thread ![]() |
|