The Daily Click ::. Forums ::. Klik Coding Help ::. 3D isometric to 2D mmf coordinates conversion.
 

Post Reply  Post Oekaki 
 

Posted By Message

RedHades



Registered
  25/05/2003
Points
  108

Has Donated, Thank You!
4th March, 2006 at 01:04:09 -

Hello TDC!

I've made this little demo that converts 3D coordinates into MMF's 2D coordinate for a smooth isometric movement.
I though some of you would like it since isometrics are always a challenge.

Have a look:
http://www3.sympatico.ca/pysavard/MMF/IsoWorld.cca

One problem I have though is that the movement is a bit shaky. If someone has a solution to make it move more smoothly, I would really appreciate.

I normally post that kind of stuff over at CT forum, but I though I give it a go in here.

 
<0> ReDhAdEs <0>

Robbert



Registered
  19/06/2003
Points
  420
4th March, 2006 at 10:55:48 -

YOu don't need the Isometric Extension for that young man.

 
Hey mates, I'm Iglo yeah =P!

RedHades



Registered
  25/05/2003
Points
  108

Has Donated, Thank You!
4th March, 2006 at 17:15:29 -

Oh right, I forgot to remove it.
Fixed.

 
<0> ReDhAdEs <0>

Robbert



Registered
  19/06/2003
Points
  420
4th March, 2006 at 17:57:36 -

Ah well...

I don't think it is too great.

The movement is indeed shaky, while isometric movement is really simple. It's just 1 up , 2 to the side (x) with every step you take. Always that ratio.

I have an (not yet finished) Isometric Engine too. It does also not use the Isometric Object, but it can do more. It can detect over which isometric coordinate the mouse is. It can translate screen to isometric coordinates and vice versa. It can rotate the playfield in 4 directions. It can load scenery from a file and even has z-values (heights of objects). But it's not done yet. I want the engine to be able to create mountains. The flat environments are just so boring. That's why I did not release it yet. I think I will when it's done but I'm taking things easy.

And this: I don't get the point of this?

 
Hey mates, I'm Iglo yeah =P!

RedHades



Registered
  25/05/2003
Points
  108

Has Donated, Thank You!
7th March, 2006 at 03:20:39 -

Robbert,

The way you suggest is good if you are going to have a character that moves in only four or eight directions along the ground plane.
My goal is to give objects the possibly to translate in smooth 360 directions, and some others to fly upwards and downwards.
This is why I want to calculate my movements in 3D coordinates first, and then convert those movements into the usual 1:2 isometric layout.

I'm also working out my own 3D collision routine that will work with a 3D array of cubes. I intend to eventually add collision detection with other types of blocks, slopes and cylinders. I might even make a height map to produce bumps on the ground.

Thanks for the feedback. I'm glad to see we both have similar goals and challenges.

Image Edited by the Author.

 
<0> ReDhAdEs <0>

Robbert



Registered
  19/06/2003
Points
  420
7th March, 2006 at 16:44:36 -

ah i see. the 360 movement will not be easy. but i can't remember to have seen it in many isometric games? i mean, isnt isometric always about 4 or 8 directions and where the object changes from direction, you see a "turn" animation? well, that's my idea. I wouldn't know why i would use 360 degrees. maybe you can expain what for?

And i am also curious about your way of how to do the height map... I mean I can make a height map in an INI file or something like this:

0-0-0-0
0-3-6-3
0-3-6-3
0-3-6-0

which is a 4x4 map just to illustrate the idea The numbers are the height value. But I guess it is really hard to visualise this, wouldn't it? you'll need loads of active objects for a mountain that is 4x4 tiles of 6 high. That is 4x4x6 tiles for a really small square of the map...

and second to make the mountain look smooth. challenging

 
Hey mates, I'm Iglo yeah =P!

RedHades



Registered
  25/05/2003
Points
  108

Has Donated, Thank You!
8th March, 2006 at 00:26:44 -

Yes, doing the heights with an INI is a good simplified idea. It also makes it very easy to edit the elevation of cell in the height grid. The way that you represent your elevations with organized numbers is a lot like how values are stored in a 2D array; which brings the reason why I want to try and do it with a 3D array.

I want the possibility to have tunnels going through my mountains, so that the player can climb over a mountain or pass under it. Making bridges should also be possible. Also, using a 3D array with each cell representing a block of space, it lets me insert a value into those cells. I can refer to this value for knowing if the cell is empty space or if it’s filled, and of what kind of content it’s filled with.

The biggest issue with a 3D array is how to easily edit the content. I would probably need to make a map editor to build the environments, save them to files and load them during the game. It’s also true that the environments are going to be very blocky and “cubish”. That’s why I want to add some slopes and cylinders into the mix.

But blocky collisions don’t really mean bad looking:
http://www3.sympatico.ca/pysavard/Forums/GrassRender.jpg

I don’t think that I will need lots of objects to display the environment, since it would be made of data and math. I could have just one big detailed background object (like that last link), and some actives to represent things that the characters can move behind or under.

Thanks again for your input. You're making me think harder about my project.

 
<0> ReDhAdEs <0>

Robbert



Registered
  19/06/2003
Points
  420
8th March, 2006 at 11:56:59 -

Hmm the 3d array thing isnt a bad idea I guess. I have never worked with MMF arrays so far, but it is clear that it can do more than the ini-file that i came up with, because the ini-method lacks tunneling (never thought of that ).

The grassrender looks really good. Did you make it yourself?

Anyway, good luck with the engine. It sounds like you are really eager (is that the right word?) to get this done. It is not easy you know I must say it's good to see that I am not the only one thinking of how to do an isometric engine for a game. We can help each other out with ideas if any of us get stuck


 
Hey mates, I'm Iglo yeah =P!

Robbert



Registered
  19/06/2003
Points
  420
8th March, 2006 at 12:27:32 -

http://home.wanadoo.nl/tonbreij/Isometrische%20Engine.jpg

Image Edited by the Author.

 
Hey mates, I'm Iglo yeah =P!

Robbert



Registered
  19/06/2003
Points
  420
8th March, 2006 at 12:29:14 -

This is my engine so far. Please remember that the "smooth" mountain tiles that you see are only made for myself to get an impression of how it will or can look in the future. It is thus not part of the engine.

 
Hey mates, I'm Iglo yeah =P!

RedHades



Registered
  25/05/2003
Points
  108

Has Donated, Thank You!
8th March, 2006 at 14:41:20 -

Sweet, nice jobe on the slop tiles. Too bad they are not functioning yet.
That remind me of marble madness. I would be very cool if you can pull something that works just as well.

On my part, I'll have to make the grid based intersection work in 2D first. So when all the math works in 2D, then I'll try to do it with 3D math.

I'm still having trouble thinking about how i'll be doing the layer sorting.

 
<0> ReDhAdEs <0>

Robbert



Registered
  19/06/2003
Points
  420
8th March, 2006 at 22:41:53 -

you'll need the layer object for that I think. With the isometric grid object there comes 2 demos, one shows the iso grid with the layer object combined. I think it uses the D-value of an object. You'll have to give every coordinate a d-value i think. 0,0 is 0... 0,1 and 1,0 are 1... 2,0 and 1,1 and 0,2 are 2. But I don't know. I have thought a long time about it too, what is best, but this is also a feature that is not yet implemented into the file

I don't know Marble Madness. heard of it though. But I think I'll design this engine to be like the engine of Rollercoaster Tycoon. Or else a RTS. Tycoongames and strategy games are just the best of all genres that can be played years after the release. (look at red alert and rollercoaster tycoon)

 
Hey mates, I'm Iglo yeah =P!

Robbert



Registered
  19/06/2003
Points
  420
12th March, 2006 at 10:22:39 -

One question. I inserted the Array object. It seems really handy. But when you save it, what kind of filetype must is be?

 
Hey mates, I'm Iglo yeah =P!

DanielRehn



Registered
  18/09/2002
Points
  139
13th March, 2006 at 00:56:10 -

Whatever you like (.arr if you wanna go standard)

 
n/a

Robbert



Registered
  19/06/2003
Points
  420
13th March, 2006 at 16:04:54 -

Thanks

 
Hey mates, I'm Iglo yeah =P!
   

Post Reply



 



Advertisement

Worth A Click