Isometric Test

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Isometric Test

Post by LuX » April 24th, 2012, 6:18 pm

Hmm....

Need.....


Coffeeeee.........

----

So I was trying to make this Isometric type of project where you have a "Selector" Following your cursor, and if you click, it draws a grass tile on its location.

Tried 2d arrays and shit so most of it prolly makes no sense : )

I got stuck at the drawing part completely. I tried something like on left mouse click array[something][something] will become true, and in the tile draw it will draw all tiles that are true in the array, and now my brain hurts.

----

Anyone with the time, check it out and point me back on the road.
I even labeled all the stuff so you can scroll through it like a wikipedia.

-LuX
Last edited by LuX on April 25th, 2012, 5:57 pm, edited 2 times in total.
ʕ •ᴥ•ʔ

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Isometric Test

Post by LuX » April 25th, 2012, 5:33 am

Alright now I got most of it fixed : )
But I still get this one as an error:

Code: Select all

for (int indX = (x / 52); indX < 15; indX ++;)
{
	for (int indY = (y / 26); indY < 23; indY ++;)
	{
	    if ( TileGVisible[indX][indY] )
	    {
	    GrassTile(x, y);
	    }
	}
}
This should make more sense:

Code: Select all

for (int indX = 1; indX < 15; indX ++;)
{
	for (int indY = 1; indY < 23; indY ++;)
	{
	    if ( TileGVisible[indX][indY] )
	    {
	    GrassTile((indX*52), (indY*26));
	    }
	}
}
Error:

Code: Select all

1>------ Build started: Project: Chili DirectX Framework, Configuration: Debug Win32 ------
1>  Game.cpp
1>c:\users\lukas.pomon-pc\desktop\lux isometric tile test\assets\game.cpp(2478): error C2059: syntax error : ';'
1>c:\users\lukas.pomon-pc\desktop\lux isometric tile test\assets\game.cpp(2480): error C2059: syntax error : ';'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Obviously syntax error, but where did I miss ;?

Edit: Now that I look at it, sense, it makes none, but still where is there possibly a syntax error on that one?
Last edited by LuX on April 25th, 2012, 5:49 am, edited 1 time in total.
ʕ •ᴥ•ʔ

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Isometric Test

Post by chili » April 25th, 2012, 5:42 am

I'll take a look at it after work bro. ;)
Chili

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Isometric Test

Post by chili » April 25th, 2012, 10:54 am

Code: Select all

for (int indX = (x / 52); indX < 15; indX ++;)
{
   for (int indY = (y / 26); indY < 23; indY ++;)
Lose the ';' after 'indX ++' and 'indY ++' Bro. :lol:

Also, why in the world did you do '#include "mouse.cpp"'??? :?

Edit: You forgot to delete the .sdf file from your solution root folder bro. Next time you post, delete that file because it takes up like 95% of the folder space.
Chili

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Isometric Test

Post by LuX » April 25th, 2012, 5:54 pm

Oh right! Thanks!

Currently reworking the script, didn't work out like I planned.
Now calculating the position so that I divide the ground into two separate "platforms" to make the calculation a bit easier.

:lol: I just scanned the numbers from 0-9 that will display the selectors position on the screen, looks like I was using labels!

-LuX
ʕ •ᴥ•ʔ

Post Reply