#### Archived

This topic is now archived and is closed to further replies.

# Your oppinion on my isometric tile engine

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

## Recommended Posts

Hello! Recently I have been working on a tile engine, from the isometric perspective. I am a little iffy on my methods of doing so. I create a 2d array for my map, which stores texture information for each tile. Then I tile them on a 4x4 tile. Then, to get my isometric look, I rotated the map 45 degrees on the y axis, and then about 10 degrees on the x axis, to get the angle. I have 2 questions: 1.) Will this way work for displaying isometric tiles in a way that looks like 3d? 2.) If I create my tiles 4 units by 4 units, what size should my textures be for the tiles? To get a better look at what I have done, you can download it at www.geocities.com/Silent_Storm_Inc/projects.html . Just scroll down to the download file of cmoEngine. Also, I am still looking for one or two programmers to help me on this project.

##### Share on other sites
300-380fps
gf4 ti 4200 128mb
amd ath.. xp 1800+
512mb ram

Edit i dont do isromic i do terrain so i wouldnt know.

[edited by - craphead on July 3, 2003 9:48:27 PM]

##### Share on other sites
Oddly enough Ive been trying to create an isometric/tilebased 3D engine using the same method you used (Which I believe I learned from a tutorial on this site)

It seems like a good method (with potential) but Ive already come across a few problems.

I was using a 15x15 2 dimensional array to map my quads and texture them. The method I was using to automate the creation of the board had a few problems with it.

Here lemme post some source code so I can try to explain:

int drawboard(GLvoid)
{
int tile;
for (int z = 0; z < MAP_SIZEZ; z++)
{
for (int x = 0; x < MAP_SIZEX; x++)
{

tile = map[z][x];

glBindTexture(GL_TEXTURE_2D, texture[tile]);

glNormal3f(0.0f, 1.0f, 0.0f);
glTexCoord2f(0.0f, 0.0f); glVertex3f(float(x), 0.0f, float(z));
glTexCoord2f(1.0f, 0.0f); glVertex3f(float(x + 1), 0.0f, float(z));
glTexCoord2f(1.0f, 1.0f); glVertex3f(float(x + 1),0.0f, float(z + 1));
glTexCoord2f(0.0f, 1.0f); glVertex3f(float(x), 0.0f, float(z + 1));
glEnd();
}
}
return (1);
}

The first problem I encountered with this function was the fact that it creates the game board 15 units to the right and 15 units into the screen.

Normally nothing would be wrong with this, but I wanted the map to be centered instead of 15 units to the right and 15 units into the map (for camera purposes and plus I think its way more efficient to have your map centered or at least that was what I was taught)

So to change this I decided to create a 30x30 map but I had to make a little bit of a change to my code:

int drawboard(GLvoid)
{
int tile;
for (int z = z - 15; z < MAP_SIZEZ; z++)
{
for (int x = x - 15; x < MAP_SIZEX; x++)
{

tile = map[z + 15][x + 15];

glBindTexture(GL_TEXTURE_2D, texture[tile]);

glNormal3f(0.0f, 1.0f, 0.0f);
glTexCoord2f(0.0f, 0.0f); glVertex3f(float(x), 0.0f, float(z));
glTexCoord2f(1.0f, 0.0f); glVertex3f(float(x + 1), 0.0f, float(z));
glTexCoord2f(1.0f, 1.0f); glVertex3f(float(x + 1),0.0f, float(z + 1));
glTexCoord2f(0.0f, 1.0f); glVertex3f(float(x), 0.0f, float(z + 1));
glEnd();
}
}
return (1);
}

See what I did?

Well that solved that problem, but I also found another problem with this method.

The 2d array method only allows you to create flat maps... if your trying to achieve a 3D look, it would be alot better if you could add a third dimension (height or the y axis) to the maps. However doing this has already baffled me.

I think its a good method but there is a little bit of work involved when it comes to making it suit your needs. (especially when you want the 3d look)

If you really want to use it, I say go for it.

Good luck

##### Share on other sites
I understand what you are saying. I believe that if you have your isometric map setup correctly, you should have no problem attaining the 3d look. You just need the right textures. Starcraft, for example, used a flat quad, with *smart* texturing, that made it look 3d, when it really wasn''t. This is the effect that I am aiming for. Also, I have read in tutorials that it is good to have multiple layers, so that you can create blending effects, and add simple sprites to walls, or to the ground, without having completely new textures. This is currently what I use. Maybe in a later state in my engine, I can allaborate, and create some textures of my own.

Thanks for the input. Keep it coming.

##### Share on other sites
290-320 fps

GeForce 4 Ti4600
Pentium III 700Mhz
567MB RAM

"C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"

##### Share on other sites
Looks pretty good, got around 200 fps. But I wouldn't call it isometric, seems to me to be ordinary 3D. Isometric is when the z axis doesn't get smaller on the screen when going into the distance, like those math book cubes.

isometric to me:
http://www.quickhoney.com/indexday.html

=)

[edited by - Herr_O on July 4, 2003 2:00:45 PM]

##### Share on other sites
Ok, I took that last post into consideration, and changed pretty much everything. You can see the new updated version at my website:

www.geocities.com/Silent_Storm_Inc/projects.html

I think this is the effect I should be shooting for. Also, if anyone has any questions on how I did this, feel free to ask.

Thank you.

##### Share on other sites
*bump*

I see so many questions about isometric rendering... does anybody have any questions?

Questions?

##### Share on other sites
Ah, that's more like it, now just add some content and stuff

How do you plan to do walls and collision?

-----------------------------
Sometimes a Guru meditation must be followed by a Vulcan neck grip.

[edited by - Herr_O on July 5, 2003 4:38:45 AM]

1. 1
2. 2
3. 3
Rutin
14
4. 4
5. 5

• 10
• 11
• 9
• 14
• 10
• ### Forum Statistics

• Total Topics
632652
• Total Posts
3007661
• ### Who's Online (See full list)

There are no registered users currently online

×