The Daily Click ::. Forums ::. Non-Klik Coding Help ::. isometric like projecting
 

Post Reply  Post Oekaki 
 

Posted By Message

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
6th January, 2008 at 21:18:05 -

id like some math in order to project a traditional x,y graph into a 2:1 isometric-like grid like below.
anybody know of some simple ways to do this. some math would be awesome
Image

Image Edited by the Author.

Image Edited by the Author.

 
n/a

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
6th January, 2008 at 21:29:06 -

Actually, true isometric is some weird angle that comes close to (2 horizontal, 1 vertical), but isn't quite that.

Anyway, I'm not sure if image manipulation like that is even possible, you will probably need isometric versions of your graphics instead.

 
Old member (~2004-2007).

Ski

TDC is my stress ball

Registered
  13/03/2005
Points
  10130

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!KlikCast HelperVIP MemberWii OwnerStrawberryPicture Me This Round 28 Winner!PS3 OwnerI am an April Fool
Candy Cane
6th January, 2008 at 21:32:40 -

The lines always 2 pixels across by one up, its real easy:

Image

Some stairs I made

Image

Image Edited by the Author.

 
n/a

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
6th January, 2008 at 21:40:05 -

oh i know. im not talking image manipulation. the angle is like 35.??? degrees. not sure.
im talking simple math and coordinates.

_1 2 3 4 5
1_|_|_|_|_|
2_|_|_|_|_|
3_|_|_|_|_|
4_|_|_|_|_|
5_|_|_|_|_|

there has to be some way to project a standard coordinate system onto a system like an isometric one. ive been messing around with some stuff but none of it works right.

i will be using isometric pixel art i just need a mathematical way to place them onto an isometric like grid from say, an array. which is x, y.

 
n/a

Ski

TDC is my stress ball

Registered
  13/03/2005
Points
  10130

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!KlikCast HelperVIP MemberWii OwnerStrawberryPicture Me This Round 28 Winner!PS3 OwnerI am an April Fool
Candy Cane
6th January, 2008 at 21:43:22 -

o_O

http://en.wikipedia.org/wiki/Isometric_projection

 
n/a

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
6th January, 2008 at 22:02:44 -

yes mashedpotatoe. thats true isometric or axonometric. im not interested in that. i dont want to mess with the trig and matrice multiplication. i have some math that draws it now but it draws from the wrong side. im still working on it but i still may need some help.

 
n/a

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
7th January, 2008 at 00:02:28 -

Wholly crap that staircase is awesome.

 
Craps, I'm an old man!

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
7th January, 2008 at 03:35:22 -

very beautiful they are indeed.

well i got it working.
heres a pic! just simple sh*t nothing special.

Image

 
n/a

Ski

TDC is my stress ball

Registered
  13/03/2005
Points
  10130

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!KlikCast HelperVIP MemberWii OwnerStrawberryPicture Me This Round 28 Winner!PS3 OwnerI am an April Fool
Candy Cane
7th January, 2008 at 06:28:29 -

It has a blue elephant, and in my mind that's all that matters.

 
n/a

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
7th January, 2008 at 07:21:53 -

ftw

this is actually turning into quite an engine .
and theres always room for games about elephants.

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
7th January, 2008 at 11:07:52 -

Image


Would it not be possible to simply place objects normally without having to convert from a 1/1 grid to an isometric grid?

like ive tried to draw^

The orange being the array coordinates and the blue being the game's background?

Image Edited by the Author.

Image Edited by the Author.

 
.

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
7th January, 2008 at 17:13:46 -

You can, but it's a bitch to do.

 
Old member (~2004-2007).

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
7th January, 2008 at 17:53:31 -

well heres a screeny of how it draws it and how the coordinate system works for the isometric grid.

if anyone's interested and understands c++ ill post my source and an .exe

Image

 
n/a

Tim

I'm on here way too much

Registered
  25/08/2006
Points
  132

You've Been Circy'd!Clickzine StaffSilverNova MemberVIP MemberTurtle Power!Evil klikerWii OwnerHero of TimeGhostbuster!Pokemon Ball!
7th January, 2008 at 19:15:46 -

This sounds a little harder than 2X = Y then I saw something on this once actually... I'll search the depths of the internet a sec, brb

 
http://www.SilverNova.co.uk


Ski

TDC is my stress ball

Registered
  13/03/2005
Points
  10130

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!KlikCast HelperVIP MemberWii OwnerStrawberryPicture Me This Round 28 Winner!PS3 OwnerI am an April Fool
Candy Cane
9th January, 2008 at 12:35:33 -

*bbl, perhaps.

 
n/a

Tim

I'm on here way too much

Registered
  25/08/2006
Points
  132

You've Been Circy'd!Clickzine StaffSilverNova MemberVIP MemberTurtle Power!Evil klikerWii OwnerHero of TimeGhostbuster!Pokemon Ball!
9th January, 2008 at 13:02:53 -

Oh yeah, I couldn't find it ;_; I thought it was at pixeljoint but oh well

Image Edited by the Author.

 
http://www.SilverNova.co.uk


Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
9th January, 2008 at 13:16:40 -

well i figured out a way anywho. working on an engine debugging it. trying to implement 3dimensions.
the current method i have is different then the pic a few posts back suggests. it draws from the back farthest from the screen towards the screen but the coordinates for the grid are opposite. i got it to where x and y come out of the screen instead of going into it. i'm amazed at how simple it actually is lol.

using a nested loop to run through each x and y



loop y from 1 to (however high the array is) by +1
loop x from 1 to (however wide the array is) by +1

draw the sprite at ( positionconstant + tilestretchconstant * (y - x), positionconstant + tilestretchconstant * (x + y) / 2 )

end loop
end loop

heres the c++ for it. the above was as easy as i could describe it in more plin english.


for(int y = 1; y <= playHeight; y++)
{
for(int x = 1; x <= playWidth; x++)
{
draw_sprite(buffer, iso, playX + tileStretch*(y - x), playY + tileStretch*(x + y) / 2);
}
}


thats the lines that draws the the basic land from a normal x, y array and projects them in an isometric like pattern on the screen. theres a lot more for movement, collisions, objects.

edit - and i got it to work in tgf but using the fastloops fail misrebly. after the size of the array gets bigger than 24x24 it starts to not draw some it. and using counters is slow as hell which would make a game using this method in tgf have long ass load times . i dont have mmf or tgf2 or mmf2 so it could work very well under those. but this is so far turning out to be a fantastic engine for isometric style games.

Image Edited by the Author.

 
n/a

Retainer



Registered
  02/06/2005
Points
  218
28th March, 2008 at 05:24:45 -

I would love to see source and .exe! What graphics are you using? SDL? DirectX? GL?

 
Alien Invasion. Going forward!
http://www.create-games.com/project.asp?id=1092

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
28th March, 2008 at 05:35:41 -

allegro.

download is here. not open source yet. still tinkering with it.

http://create-games.com/download.asp?id=7012

 
n/a

Retainer



Registered
  02/06/2005
Points
  218
28th March, 2008 at 05:56:53 -

Wow, it's the dogs bollocks.
You really inspired me to do the next ISO project in C++.

 
Alien Invasion. Going forward!
http://www.create-games.com/project.asp?id=1092

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
28th March, 2008 at 06:07:27 -

lol. i saw your project awhile back and i was blown away. mine is still very simple, but i hope to just keep fiddling with it until i get something i want. i've recoded it a few times already. just optimizing the mapreading and rendering of the isometric plane. i havent really made any improvements on actual turning it into a proper engine yet.

best of luck to ya.

 
n/a

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
13th April, 2008 at 21:03:01 -

i've actually already used the directx sdk, SDL, allegro, and allegroGL. but allegro is just the one i use predominantly. too much school work to really learn and use it all.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click