-
Square Isogrid?!
Hi all,
Probably a 'duh' question, but am building an app using the isogrid object and note it creates a grid that is 'diamond shaped' by default.
Like most games I want to convert this to being a 'square' isometric grid - ie with flat tops and sides.
What's the easiest way to do this? I could create a double sized grid and hide the mouse whenever it exceeds certain x and y top and bottom values, but feels a little inefficient...
-
Re: Square Isogrid?!
Do you mean a normal grid like a chessboard?
Then theres the game board object, or the pathfinding object depending on what game you want to make.
If you mean hexagonal then use the wargame object.
-
Re: Square Isogrid?!
sorry, not being clear - am meaning normal isometric.
When you create an isometric grid using the plugin, the grid it creates starts at top left (0,0) and moves 45 degrees diagonally down the page as its edge. If you recall games like transport tycoon, they used isometric layouts, but the playing area was flat at the edges (ie 90 degrees, rather than 45 degrees for the boundaries) - a square grid, with isometric cells. Currently the object seems to only create a diamond shaped grid of isometric cells?
-
Re: Square Isogrid?!
Create the grid bigger than the frame and reposition its starting coordinates outside it?
-
Re: Square Isogrid?!
I have started working with the isoObject. My understanding is that isometric view is angled so as to define perspective. If your grid is square then it will look like a top-down game.
>> create an isometric grid using the plugin, the grid it creates starts at top left (0,0) and moves 45 degrees diagonally
I wonder if I am missing this plugin?
Are you talking about 'Iso Grid 2'? The most common angle I have encountered is on a 2:1 ratio - not 45. I would like to know if there is a grid generator for MMF.
-
Re: Square Isogrid?!
alpha doesn't mean that the grid cells are square, only that they are arranged in a square pattern.
-
Re: Square Isogrid?!
-
Re: Square Isogrid?!
You get very little perspective at 45.
No comments on the grid-creator?
-
Re: Square Isogrid?!
Sounds like you want a 'staggered isometric' grid.
I made an extension for this myself but never released it, this is the 3rd person that seems to want an extension to do this, maybe I'll release it hmmm.
But a workaround is to stick to the isogrid object, but offset th grid so it starts off frame. Its a bit messy and your coordinates will be off since 0,0 will be on out of bounds grid coordinate, but it will work.
-
Re: Square Isogrid?!
The original post asked about a 'grid with flat tops'
http://www.buddhamind.info/mmf/AK_45_options.png
Are we talking about option 'B'?
-
Re: Square Isogrid?!
The angle is irrelevant here. The problem is with the coordinate system.
http://usera.ImageCave.com/adamhawker/isogrids.png
(the image has been resized automatically - right click, and select "open image" to view full size).
The grey rectangle represents the part of the map that the player will be able to see (obviously a computer screen is rectangular, and the OP is saying he doesn't want any blank space visible around the map).
If you're loading your map data from an array, a large portion of that array will be empty - as you can see from all those white squares.
Using a different coordinate system results in fewer blank spaces, and a smaller array.
However, I would not recommend this method, as it's a pain to do the maths for things like detecting which cell the mouse is overlapping.
-
Re: Square Isogrid?!
Nothing from alphabeta279 but this seems 'normal' enough.
I am working on such a thing (hence my inserts here) and just over-drew the grid.
I have a scrolling window and used your first img where the grey area represents the full area - 2000x2000
It works fine. I hadn't thought that IsoGrid's array would be significantly bigger. I have had one 'wonk' where at the start of the level the car (player) is very slow in the top-left area. Once it is out speed is fine. It is intermittent so I just figured it was me with too many apps open - or something local.
Any thoughts of resource consumption with the bigger array?
-
Re: Square Isogrid?!
Hi all, Muddymole is spot on and his diagram describes perfectly - to the best of my knowledge the isogrid only allows the rotated grid option, not the 'staggered grid'.
On top of the array size inefficiencies there are also implications for the code required - eg if I wanted to map the mouse to a square grid covering a certain region of the screen, then snap the cursor to the nearest cell, then if my grid size is as per his 'staggered grid' example it'll just work.
If however it is like the Rotated grid I need to manually create events like 'snap to grid if x columns is < 3 and y < 4', so it does become quite inefficient.