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

Post Reply  Post Oekaki 
 

Posted By Message

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