Author Topic: AstralHex Progress  (Read 8892 times)

abecedarian

  • Newcomer
  • Posts: 13
  • Karma: +0/-0
    • View Profile
    • Email
AstralHex Progress
« on: August 27, 2011, 06:52:02 PM »
Hey! The project I've been working on for quite a while now is still happening.. working title is AstralHex! Just got the Field of View math down which was surprisingly complicated due to the hexagonal grid..

Got a video here:
http://www.youtube.com/watch?v=f7gknTJSmsc

Next thing I'm going to tackle is combat.. I've already had a working melee engine but it was kind of temporary.. Three areas of combat are

-Melee
-Ranged
Not sure how to handle stats involved with Melee and ranged... Accuracy, Strength, Defense for each? More stats? Open to suggestions!

-Magic
Types of magic:
Blast, Bolt, Area-Effect  (ie, Fire, Ice, Lightning, Poison)
Specials (ie, affect landscape, grow trees, etc)

There are going to be status effects like:
Bubble, Mirror, Slow, Petrify, Ghost

What I need to decide is how the Stats, Experience and Leveling are going to work...
How equipment effects stats... How these stats relate to combat...
How to determine stats of entities at different levels..

I am not really sure how that's all going to fit together... Not super-familiar with roguelikes anyway (and btw, am definitely not constraining myself to traditional limitations of roguelikes)

I was curious if anyone had any suggestions on variations of combat systems that could be implemented? Links to articles or explanations of those systems would be appreciated! I'm going to do some research on D&D type stuff right now to find some inspiration.. Trying to keep the number of stats to keep track of reasonably low..

This is a turnbased game btw! Each Entity has a Charge-Timer and a Speed Value...
CT=(CT+Spd)
If CT>100 then it's this Entity's turn
(This was inspired by Final Fantasy Tactics for PSOne)

Anyway, thanks Getter77 for reminding me to keep you guys posted! I feel like this is one of the best places to ask for design-ideas.. The game is still very open-ended in that sense - I'm just now getting to the really fun stuff, so feel free to have a voice in the matter!

Z

  • Rogueliker
  • ***
  • Posts: 905
  • Karma: +0/-0
    • View Profile
    • Z's Roguelike Stuff
Re: AstralHex Progress
« Reply #1 on: August 27, 2011, 08:21:44 PM »
Hey! The project I've been working on for quite a while now is still happening.. working title is AstralHex! Just got the Field of View math down which was surprisingly complicated due to the hexagonal grid..

What are your opinions about working with the hex grid? I think it is quite easy if you do it correctly (that is, use good coordinate system and abstractions), but probably difficult otherwise... For example, a simple FOV algorithm, not perfect or optimized, but probably good enough:

Code: [Select]
v[0]..v[11] = the list of vectors of length 1, in a clockwise order; there are 6 of them, but we have v[a+6] = v[a] for convenience
P = player's location

for(int i=0; i<6; i++) for(int a=0; a<MAX; a++) {
  // draw a line from P to P + MAX * v[i] + a * v[i+2]
  for(int l=0; l<=MAX; l++) {
    location L = P + l * v[i] + round(l*a/MAX) * v[i+2]
    mark L as seen
    break the inner loop if L blocks LOS
    }
  }

Psiweapon

  • Rogueliker
  • ***
  • Posts: 334
  • Karma: +0/-0
  • Im in ur rougeliekz, pixelling ur tielz!
    • View Profile
    • I Lovemaking Tiles
Re: AstralHex Progress
« Reply #2 on: August 28, 2011, 12:50:28 PM »
I've always wondered what kind of coordinates are used in hex-based games (I love hexes, btw)

Although once, a long time a go, I realized that you could use orthogonal coordinates, if you only allowed one two kinds of diagonal movement (i.e. up-left and down-right are allowed, up-right and down-left are forbidden) and skewthe display.

Ork tech!
The invisible hand is a lie, the fiendish dogma of the market cultists. Lest the apostasy grows strong, their blood god will devour each and everyone, pious and infidel alike.

Z

  • Rogueliker
  • ***
  • Posts: 905
  • Karma: +0/-0
    • View Profile
    • Z's Roguelike Stuff
Re: AstralHex Progress
« Reply #3 on: August 28, 2011, 02:41:56 PM »
My Hydra Slayer uses only (x,y) pairs whose sums are even, and the neighbors of (0,0) are (2,0), (-2,0), (1,1), (1,-1), (-1,1) and (-1,-1) (my hexes are standing on a corner, not on an edge like in AstralHex). Vapors of Insanity uses what you describe, so neighbors of (0,0) are (1,0), (-1,0), (0,1), (0,-1), (1,-1) and (-1,1). For generating villages and other settlements VoI sometimes temporarily uses a slightly different coordinate system, in which cells with X coordinate of 0 approximately form a vertical line. This allows pre-designed orthogonal maps to also look reasonably well in hex mode.

Each of the three systems above has some disadvantage (the first one leaves lots of "dead space", the second one means that the natural shape of a level is a parallelogram, and the third one requires more complicated vector operations to take care of odd/even cases).

Both games use abstractions (like vectors which can be added to locations, "for each major direction" or "for each vector of length between k and l"), which allows development without thinking about the underlying coordinate system at all (also mostly eliminating the disadvantage of the third system, I think), and also has a nice side effect that usually the same algorithm works for orthogonal and hexagonal mode (and that's why both HS and VoI leave geometry as a choice for the player).

AquaTsar17

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 57
  • Karma: +0/-0
    • View Profile
Re: AstralHex Progress
« Reply #4 on: September 02, 2011, 11:20:14 PM »
I think there's already a couple threads in the dev forum here that talk about possible systems for stats and how combat works and such, so you could look into those for some more ideas.

Since you mentioned FFT's timing system I thought I'd mention that you could consider some of the other ideas in that game. Like armor adding to health rather than having a defense stat, dodging being based on the weapon being used to attack you and your shield equipped, differences in timing for spells and various ranged effects, etc.

Facing of course matters in FFT but most people avoid that in RLs due to how annoying it is to implement properly.

All turns are composed of "move + action", and which you perform determines when your next turn is available. So, skipping a move would mean your next turn comes up faster, and skipping both move & action means your turn is available a lot sooner. However, this may be problematic for a RL since you can only do one or the other (move or act) typically. Maybe if skipping your turn (ie: waiting) or going defensive had a temporary affect on your speed could be interesting? I don't know. It'd certainly make for interesting enemies if some went defensive in between attacks to get in a double action here and there.

These details (and way more than anyone should really care about) for FFT are available here http://www.gamefaqs.com/ps/197339-final-fantasy-tactics/faqs/3876 in case you're interested.

For a similar FF-like system you could also look at ZODIAC http://zodiac-ffrpg.wikidot.com/ for inspiration. Any system you find you'll have to tweak a bit anyway.