GPWiki.org
GPWiki.org
It is currently Thu May 23, 2013 7:47 pm

All times are UTC




Post new topic Reply to topic  [ 80 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: Fri Sep 30, 2011 9:21 pm 
Bibliotherapist
User avatar

Joined: Wed Nov 03, 2004 1:28 pm
Posts: 6717
Location: Oxford, Englandshire
It seemed natural to me as Battletech maps use that orientation.

http://www.scrapyardarmory.com/wp-conte ... errain.jpg

I'll have a dig through the rules and see if they can be used sideways.

_________________
10 PRINT "Bad Monkey ";
20 GOTO 10


Top
 Profile  
 
PostPosted: Fri Sep 30, 2011 9:22 pm 
Corpse Bride
User avatar

Joined: Tue Jul 01, 2008 11:44 pm
Posts: 2217
Location: England
I feel that the diagonals in Codehead's hex grid are reminiscent of the diagonals in isometric.

If the image were rotated 90 degrees, the diagonals would be steep, and unlike isometric.

_________________
I ain't pushing no moon buttons.


Top
 Profile  
 
PostPosted: Fri Sep 30, 2011 9:27 pm 
Bibliotherapist
User avatar

Joined: Wed Nov 03, 2004 1:28 pm
Posts: 6717
Location: Oxford, Englandshire
TwoBit's early StarTrek screens (viewtopic.php?f=16&t=10786) show the hexes in that orientation too.

However, as we were talking about making the hexmap as flexible as possible, perhaps both options should be supported?

_________________
10 PRINT "Bad Monkey ";
20 GOTO 10


Top
 Profile  
 
PostPosted: Fri Sep 30, 2011 9:47 pm 
Corpse Bride
User avatar

Joined: Tue Jul 01, 2008 11:44 pm
Posts: 2217
Location: England
Looksee...

Image

_________________
I ain't pushing no moon buttons.


Last edited by Jasmine on Fri Sep 30, 2011 10:24 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri Sep 30, 2011 9:58 pm 
Harmlessness does no harm
User avatar

Joined: Tue Sep 14, 2004 8:37 pm
Posts: 3809
Location: Ferriday, LA, US
Like I said, I'm not complaining. I've just seen it done the "other way" most of the time. I actually prefer it, but if I'm the only one, it wouldn't be the first time. ;)

_________________
What most people don't understand about "enlightenment" is that it is not an end-goal; but where you find yourself just before taking a new "first step."


Top
 Profile  
 
PostPosted: Fri Sep 30, 2011 11:41 pm 
Harmlessness does no harm
User avatar

Joined: Tue Sep 14, 2004 8:37 pm
Posts: 3809
Location: Ferriday, LA, US
Stop the presses!!!

If you want to go 2D, the way you guys do your tiles will be WRONG. WRONG WRONG WRONG. It will *triple* the minimum necessary sprite graphics required by the game.

Think about it. If it doesn't become clear why, I am working on a graphic demonstration of why we should *NOT* use horizontally oriented hexes. I will post it here ASAP.

_________________
What most people don't understand about "enlightenment" is that it is not an end-goal; but where you find yourself just before taking a new "first step."


Top
 Profile  
 
PostPosted: Fri Sep 30, 2011 11:45 pm 
Corpse Bride
User avatar

Joined: Tue Jul 01, 2008 11:44 pm
Posts: 2217
Location: England
If the sprites are drawn obliquely, rather than overhead, then...
Vertically stacked hexes
Sprites can face: North/NorthWest/SouthWest/South. Reflect for NorthEast/SouthEast = 4 sprites drawn
Horizontally stacked hexes
Sprites can face: NorthWest/West/SouthWest. Reflect for NorthEast/East/SouthEast = 3 sprites drawn

If the sprites are drawn true overhead, then...
Vertically stacked hexes
Sprites can face: North/NorthWest. Reflect for other four = 2 sprites drawn
Horizontally stacked hexes
Sprites can face: West/NorthWest. Reflect for other four = 2 sprites drawn

_________________
I ain't pushing no moon buttons.


Top
 Profile  
 
PostPosted: Sat Oct 01, 2011 12:09 am 
Harmlessness does no harm
User avatar

Joined: Tue Sep 14, 2004 8:37 pm
Posts: 3809
Location: Ferriday, LA, US
OK, here goes:

If we vertically orient our hexes, we need to draw our 2D sprites in one orientation (side-view):

Image

And optionally mirror the image from the other side:

Image

And that's that. It's not perfect; but convincing enough for movement.

---

Now if we orient our hex maps horizontally, not only do we have to do side views for our sprites:

Image

Image

Unless we want our units to look like they crab-walk, we need toward-facing orientation...

Image

As well as away-facing orientation...

Image

Thus, tripling the bare minimum of sprite images we will need. Imagine all the animations for walking; shooting; getting hit; and so on, and think about how much overhead that adds to our graphics!

_________________
What most people don't understand about "enlightenment" is that it is not an end-goal; but where you find yourself just before taking a new "first step."


Top
 Profile  
 
PostPosted: Sat Oct 01, 2011 12:11 am 
Harmlessness does no harm
User avatar

Joined: Tue Sep 14, 2004 8:37 pm
Posts: 3809
Location: Ferriday, LA, US
Jasmine wrote:
If the sprites are drawn obliquely, rather than overhead, then...
Vertically stacked hexes
Sprites can face: North/NorthWest/SouthWest/South. Reflect for NorthEast/SouthEast = 4 sprites drawn
Horizontally stacked hexes
Sprites can face: NorthWest/West/SouthWest. Reflect for NorthEast/East/SouthEast = 3 sprites drawn

Wrong. See post above.

EDIT: Sorry for being terse and coming off like a jerk, Jasmine. My apologies!

Jasmine wrote:
If the sprites are drawn true overhead, then...

... then wouldn't that make it more difficult to easily tell different types of units apart?

_________________
What most people don't understand about "enlightenment" is that it is not an end-goal; but where you find yourself just before taking a new "first step."


Last edited by Mugai on Sat Oct 01, 2011 1:10 am, edited 4 times in total.
Note to self: Mind the tone.


Top
 Profile  
 
PostPosted: Sat Oct 01, 2011 12:47 am 
Harmlessness does no harm
User avatar

Joined: Tue Sep 14, 2004 8:37 pm
Posts: 3809
Location: Ferriday, LA, US
And in case there are any doubters as to why the vertical orientation is better:

Image

NOTE -- the hexes and iso-tiles in the example here are both based on 64-pixel-width images. No finagling to make them "fit" necessary.

(As an aside, the 2D Fallout games use hex-grids based on my orientation. Note the sides of the hex cursor.)

_________________
What most people don't understand about "enlightenment" is that it is not an end-goal; but where you find yourself just before taking a new "first step."


Top
 Profile  
 
PostPosted: Sat Oct 01, 2011 7:07 am 
Bibliotherapist
User avatar

Joined: Wed Nov 03, 2004 1:28 pm
Posts: 6717
Location: Oxford, Englandshire
:eek

Holy mass debate Batman!

I'm going away for the weekend, so I won't have any input on this for a while. However, I still think the HexMap engine could support both modes.

I was going for top down in the Battletech game, I suppose isometric is doable too though.

_________________
10 PRINT "Bad Monkey ";
20 GOTO 10


Top
 Profile  
 
PostPosted: Sat Oct 01, 2011 9:19 am 
Harmlessness does no harm
User avatar

Joined: Tue Sep 14, 2004 8:37 pm
Posts: 3809
Location: Ferriday, LA, US
Codehead wrote:
Holy mass debate Batman!

Heh! :O Maybe I did get a little carried away... :lol

Codehead wrote:
I was going for top down in the Battletech game, I suppose isometric is doable too though.

Eh? Are you talking about the tile maps, or the sprites?

If you mean the sprites, I just assumed that our units would be drawn from a "to-the-side" view to some degree, as a straight-down from the tip-top image hides a lot of detail. In other words -- do you want to see a human character's facial features, what it is wearing, and so on; or do you just want to see the top of his head? The straight-on top-down view makes it more difficult to distinguish recognizable features that way -- unless of course your unit is more distinguishable from the top (like many space ship designs), thus making a directly overhead camera angle more desirable.

_________________
What most people don't understand about "enlightenment" is that it is not an end-goal; but where you find yourself just before taking a new "first step."


Top
 Profile  
 
PostPosted: Tue Oct 04, 2011 10:41 pm 
Bibliotherapist
User avatar

Joined: Wed Nov 03, 2004 1:28 pm
Posts: 6717
Location: Oxford, Englandshire
rotInMilc wrote:

Codehead wrote:
I was going for top down in the Battletech game, I suppose isometric is doable too though.

Eh? Are you talking about the tile maps, or the sprites?

If you mean the sprites, I just assumed that our units would be drawn from a "to-the-side" view to some degree, as a straight-down from the tip-top image hides a lot of detail. In other words -- do you want to see a human character's facial features, what it is wearing, and so on; or do you just want to see the top of his head? The straight-on top-down view makes it more difficult to distinguish recognizable features that way -- unless of course your unit is more distinguishable from the top (like many space ship designs), thus making a directly overhead camera angle more desirable.


Top-down works for MegaMek, which is more or less what I'm going for here.

Image

I did a bit of fiddling with the code tonight. I've thrown in a function that sets up the hexes to a given size (across flats or across points) and orientation. It's only working for across flats and vertical stack at the moment, but I can extend it to handle across points sizes and horizontal stacking quite easily. :thumbs

_________________
10 PRINT "Bad Monkey ";
20 GOTO 10


Top
 Profile  
 
PostPosted: Tue Oct 04, 2011 11:48 pm 
Harmlessness does no harm
User avatar

Joined: Tue Sep 14, 2004 8:37 pm
Posts: 3809
Location: Ferriday, LA, US
Ah, good work Karl! Yeah, I can see how 90-degree top-down can work for this (best part is that you can just animate once, and just rotate the sprite in code). If the sprites were mostly the same/similar (i.e. rigidly humanoid) it would be a problem, but with a broader range of sprite shapes, one-angle sprites are quite doable. :)

_________________
What most people don't understand about "enlightenment" is that it is not an end-goal; but where you find yourself just before taking a new "first step."


Top
 Profile  
 
PostPosted: Wed Oct 05, 2011 9:01 pm 
Bibliotherapist
User avatar

Joined: Wed Nov 03, 2004 1:28 pm
Posts: 6717
Location: Oxford, Englandshire
Screenshot Time!

Image

30 units across flats, vertical stack


Image

40 units across points, horizontal stack.

:rock

_________________
10 PRINT "Bad Monkey ";
20 GOTO 10


Top
 Profile  
 
PostPosted: Wed Oct 05, 2011 9:32 pm 
Corpse Bride
User avatar

Joined: Tue Jul 01, 2008 11:44 pm
Posts: 2217
Location: England
That looks great.

Is one map the rotation of the other, or have you programmed the two grids separately?

The reason I ask is because when users design maps, they may want to play them in either horizontal or vertical format. If one grid is a rotation of the other, then there is no problem. But if they are programmed separately, then the map may not look the same because of how rows and columns get jiggled about moving from one alignment to the other.

_________________
I ain't pushing no moon buttons.


Top
 Profile  
 
PostPosted: Wed Oct 05, 2011 9:40 pm 
Harmlessness does no harm
User avatar

Joined: Tue Sep 14, 2004 8:37 pm
Posts: 3809
Location: Ferriday, LA, US
Jasmine wrote:
But if they are programmed separately, then the map may not look the same because of how rows and columns get jiggled about moving from one alignment to the other.

I was wondering this too, having noticed that the positions of the tiles in those two images really don't match...

_________________
What most people don't understand about "enlightenment" is that it is not an end-goal; but where you find yourself just before taking a new "first step."


Top
 Profile  
 
PostPosted: Thu Oct 06, 2011 8:14 am 
Bibliotherapist
User avatar

Joined: Wed Nov 03, 2004 1:28 pm
Posts: 6717
Location: Oxford, Englandshire
Yeah, basically the x and y axes are switched, but I didn't switch the row and column counters. That's why the pattern is skewed.

I was thinking about it last night, the origin stays in the bottom left corner, so the whole map is flipped diagonally rather than rotated 90 degrees CW.

_________________
10 PRINT "Bad Monkey ";
20 GOTO 10


Top
 Profile  
 
PostPosted: Fri Oct 07, 2011 2:22 pm 
Bibliotherapist
User avatar

Joined: Wed Nov 03, 2004 1:28 pm
Posts: 6717
Location: Oxford, Englandshire
I did a bunch of thinking rather than coding last night (my head still hurts). One of my goals setting out on this project was to cut through the junk and get the game mechanics going without worrying about fluff and eye-candy that could be added afterwards.

I figured if I could get something playable going quickly and stay agile, I would keep my interest levels up and prevent this project going the same way as most of my other stuff (unfinished).

However, in trying to build a 'hexmap engine', I'm getting bogged with feature creep already. I spent a good hour the other night trying to think of neutral names for column and row variables so that when the map was rotated and built horizontally, the names would still make sense.

For BattleTech (and StarTrek, I think), the hexes only need to be drawn the way that they were in the first screenshot I posted last Friday. I've spent a week adding fluff that isn't required (for my goals) and compromising my design with bodges before I'd even got started.

I still think the Universal HexMap engine is a cool idea, but I'm going to work towards the original goal in the short term and maybe I can revisit the fluff later when it won't push me off course quite so much.

_________________
10 PRINT "Bad Monkey ";
20 GOTO 10


Top
 Profile  
 
PostPosted: Fri Oct 07, 2011 2:33 pm 
Corpse Bride
User avatar

Joined: Tue Jul 01, 2008 11:44 pm
Posts: 2217
Location: England
Codehead wrote:
I spent a good hour the other night trying to think of neutral names for column and row variables so that when the map was rotated and built horizontally, the names would still make sense.


Stak and Stag. :D

These are the Staxes (to rhyme with axes. (Singular is Staxis))

_________________
I ain't pushing no moon buttons.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 80 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group