123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|390|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> On Topic -> Isometric

Fri, 12 Jun 2009, 11:07
Afr0
What's the general algorithm for drawing tiles in an isometric map like a lot for The Sims?

-=-=-
Afr0 Games

Project Dollhouse on Github - Please fork!
Fri, 12 Jun 2009, 14:55
Jayenkai
IIRC, it's something like...

DrawX = (TileX*GridWidth)+(TileY*(GridWidth/2))
DrawY = (TileY*(GridHeight/2)) - (PhysicalHeight)

or minuses, or something to that effect.

Trial and error the thing, you should be able to figure it out..

-=-=-
''Load, Next List!''
Fri, 12 Jun 2009, 15:36
Afr0
Thanks!
Yeah, I'll trial and error for a bit.
At least I figured out how to get proper BMP data out of the SPR2 resources now!
Actually... come to think about it, I don't think it is BMP data. More like... raw data, with pixels of color drawn for each line.

Code:



Should be pretty self-explanatory!

EDIT: In light of the recent pirate discussions;

This code has not been reviewed or approved by neither EA nor Maxis at any point! The Sims and all it's trademarks, Maxis and Will Wright remains a property of EA.

-=-=-
Afr0 Games

Project Dollhouse on Github - Please fork!
Sat, 13 Jun 2009, 07:06
shroom_monk
I tried something in isometric a little while back (very quickly gave up - old computer = very slow). The formulae I used effectively also allowed for the camera view to be rotated, while still being isometric.

You store the 3D co-ords for everything, then assign an X and Y value in 2D to one unit of each 3D movement (X, Y and Z). So moving across on the 3D X axis would add a certain amount to X and Y, going up on the 3D Y axis would only affect the 2D Y axis, and adding to the 3D Z axis would add to the 2D X and take from the 2D Y.

By changing the amount it adds or subtracts, you can change the angle.

If that makes any sense, of course! If I find the source code, I'll post it.

-=-=-
A mushroom a day keeps the doctor away...

Keep It Simple, Shroom!
Sat, 13 Jun 2009, 16:28
mindstorm8191
I've tried isometric in a few games of my own. After all the work needed to get everything working and looking right, I almost don't recommend it to anyone. Its much easier to keep things in regular perspective. Only if you have a working game should you consider a new build in isometric view.

-=-=-
Vesuvius web game