Game Development Community

ISO Ideas...

by Ricky Taylor · in Torque Game Builder · 07/10/2005 (3:48 pm) · 23 replies

Ok, I could put this in suggestions, but I want it to be a discussion. :)

The easiest. best, and coincidentally only working way I can think to do ISO is the following....


The map would have its own 3d rendering code. So as the tiles are rendered as triangleStrips(?). (or Similar) (This allows for heights...)

Then objects are rendered x, y normal and depth (Z) = y * SomeCrazyVariableThatMakesThePlayerGoBehindStuff.


What do you think people?
Page «Previous 1 2
#1
07/10/2005 (4:50 pm)
www.garagegames.com/blogs/51924/8153

someone else whos already doing it
#2
07/11/2005 (2:48 pm)
Yessss.... I have seen that. But it doesn't *appear* that its going to be released to the T2D public. Please correct me... But otherwise I was going to use this tread to develop ideas and *eventually* something that can be dropped into T2D for people to use... Because I'm a nice person. :P
#3
07/20/2005 (12:35 pm)
Quote:SomeCrazyVariableThatMakesThePlayerGoBehindStuff.
If you can get that, you have isometric. That's the hard part. The problem is that there's no real depth variable. You can change the order, but you'd have to do it bubble-sort style. Has anyone tried that? I tried implementing that, and it didn't work so well.
#4
07/24/2005 (12:22 pm)
Hey ^_^,

Depth is easy... You switch glVertex2f with glVertex3f.

The simple solution is rendering tiles starting from 0.0 and going down (-0.01, -0.02* etc), so maps would use depth not height

*Use incredibly small numbers or your 2d Images will be distorted... ;)

You'd also have to make a crazy formula for the number of tiles on each row. Because just spinning a tilemap 45 degrees wont help.... It needs to be rendered top->bottom...

Any pros know what I'm talking about or have a better solution?

Any math wizzes could come up with a formula, or find an existing one?
#5
07/26/2005 (1:32 am)
Hm... I know this is going to sound negative, due to my bad communication skills... so:
I really like the idea of a 2d iso engine. If I imagine the things that could be done with the particle system, the iso engine and the network support, I'm grinning like a mad man.
Ok.. now... am I the only one who considers it funny, that we're talking about building a (fake) 3d engine ontop of a 2d engine which is trying really hard not to expose any of the 3d features of the 3d engine it's built on?
#6
07/26/2005 (9:49 am)
Lennart,

I'm laughing.
#7
07/26/2005 (2:02 pm)
Yeah, it's quite ironic, isn't it? ;)
#8
07/26/2005 (4:28 pm)
It's even funnier that old double buffer tech made it easier to do a simple back to front drawing routine that took care of a lot of easy drawing order stuff. Now this is much harder with new-fangled open GL based "2D" engine like T2D.
#9
07/26/2005 (6:46 pm)
That's why Melv said it would be better to do ISO stuff in TGE :)
#10
07/28/2005 (2:12 pm)
^_^ First things first... I am the first person to try something crazy :P.

Secondly:

Quote:It's even funnier that old double buffer tech made it easier to do a simple back to front drawing routine that took care of a lot of easy drawing order stuff. Now this is much harder with new-fangled open GL based "2D" engine like T2D.

- Im not certain about this but I beleive this is much how it works with the OGL pipeline (I'm not a 3D expert...)... It just distorts the textures also ( Quads ^_^ and of course all yeh 3D models) , keeping the Z values close means same output, less codeing for me :3.
- If I use simple 3D, instead of my own ordering code, I can fit things together easier (without re-writing the T2D rendering code), and it produces a good result. (Even If it uses an extra 1-2% cpu -_-)

Im gonna wait for SDK 1.1 I think, as I presume stuff is gonna look a lot different and at the least renamed. :D


:: More Ideas ::

Would it be a good idea to use Quads? So that you can have funny distorted land ^_^? If so you'd have to work out the average center depth for sprites ontop...
#11
10/29/2005 (11:54 pm)
@everybody

Which method is the best about the isometric game project up to mow ?
I am looking forward the method.

I wish that someone has solved the matter can tell me how to do it.

Thanks in advance.

~ HugeOne
#12
10/30/2005 (1:39 am)
Since each fxSceneObject2D has the ability to set it's draw order (via SceneGraph.setLayerDrawOrder(), this seems pretty trivial to write your own infrastructure to do this.

if you do it in torquescript maybe it wont work so well, but if you know C++ it should be pretty easy.

I personally dont know C++ that well, but here's how i'd do it in C# (which i can, using t2d.net)

Initial setup
1) Set all sprites in your isometric grid in the same layer.
2) setup your draw order, by pushing the sprites to the end of a double-linked list, starting with the front most iso grid and working your way back.
3) when that's done, feed the linked-list to the engine, top-down so everythign is setup in the right draw order (use setLayerDrawOrder(yourSprite,"BACK"))

when that is done, everything is in the right draw order.

movement
1) when something moves, find it's current position in your linked list,
2) find it's new home in your linked list (figuring out what grid it will move to is how you figure out it's new home)
3) determine the distance from the start position to the end position (steps 1 and 2) and move your sprite that distance in your linked list to put it in the new position.
4) then use the "FORWARD" or "BACKWARD" Torque command for setLayerDrawOrder() to move yourSprite by the distance determined in step 3.

seems pretty straight forward to me. object additions can be handled by putting the object in back of the list/grid as it's initial position and then performing the steps in my "movement" section above.

deletions are easy.. just the usual double-linked-list delete.

lookups are easy too, each object can also be referenced in a list for each grid. and each grid can be in a hashtable.
#13
10/30/2005 (10:35 am)
Im C# all over, but the compatibility sucks...

THANKS A BUNCH MICROSOFT!!!!

:-/ Mabey if I was writing for VISTA I'd use c#, but looks like the messy c++ for any games I make...

I can do DX programming in C++ so I should live. :)


ANYWAY!

I'd do it all c++ with no SceneObjects (As they suck LOTS of memory, and you may want big maps).
I'd started a class but I lost it somewhere. There is one available now as a resource.... This thread is useless.... :) Have fun.
#14
10/30/2005 (12:54 pm)
Why don't some of you guys get together and make an Iso Pack for T2d....

$49.95 :)
#15
10/30/2005 (4:25 pm)
I would totally buy it. I think the thing that would make T2D great is an isometric capability!
#16
10/30/2005 (10:54 pm)
Lol

It must have someone guys that will going to develop the pack in the next time, I think.
If only it is ok, I think I will buy it for my game. lol

And now ,if not , i can only to do it by ourself.
Fighting together ...
#17
10/31/2005 (11:17 am)
Instead of saying "write something!" and "i'd buy it!" why doesnt someone reply with a better algorithm than the one i described, so that when someone actually 'does it' they have some guidance on how it should be done most effectivly.
#18
11/02/2005 (2:56 pm)
I'd buy it! But i'd end up making it wouldn't I? x_x

I'd make a fully 3D powered ISO engine, using no additional CPU, but, I'm still waiting on T2D1.1....

===

Better algorithm? Make an ISO c++ class (overrides TileMap xD ).....

Then you make the tiles have a Z value. And render sprites in fake 3D, which is actually real 3D, with so minute changes that the images arent distored! (Read above)

Sounds crazy, but ill bet its the most optimized method you'll get!
#19
11/02/2005 (4:31 pm)
Ricky: ummm.. okay.. i'm not sure if you are actually explaining an algorithm, but I dont think there is a need to really do what you are thinking... (why not just use a 3d engine in that case)


What i WOULD like in t2d, is the ability to render 3d models. of course it would effectivly be a sprite, but a sprite that uses a 3d model as it's input graphic.

but anyway, not really needed.. good luck with iso guys...

if there is nothing better than Neo's stuff when i get to this point, i'll either use his stuff or write a C# implementation of iso
#20
11/02/2005 (5:34 pm)
Hehehe, seems there is quite an interest in iso stuff after all. I think what you are all forgetting (or perhaps not) is
that T2D is essentially open source to a select crowd, if you get my drift. And like open source if you complain about a
missing feature, the answer you'll usually get is: "So add it and give it back".

As for the stuff I did, it was a quick and dirty sojourn into T2D code to see how easy it would be
to tack on anything, iso tile rendering being an arbitrary choice; and to reiterate not a "this is how its done"
but like bruce said, "a finger pointing at the moon". Use it or lose it, but perhaps it might prove to
be useful.

I have been toying with the idea of creating an iso pack (frameworks are a pet love of mine), but
hesitate as it is usually a very game specific implementation. I have a couple of ideas about it
though and perhaps I just might take a stab at it if time and inclination permit.

As for the Z sorting problem it is easily solved as I hint at toward the end of my plan.

~neo
Page «Previous 1 2