The Sinister Design Forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the new Sinister Design forums!

Pages: 1 ... 107 108 [109] 110 111 ... 118

Author Topic: Ask the developer a question!  (Read 264881 times)

bugfartboy

  • White Cape
  • ***
  • Offline Offline
  • Posts: 1714
    • View Profile
Re: Ask the developer a question!
« Reply #1620 on: May 27, 2015, 05:24:09 PM »

A couple unrelated questions:

    1.  How did you start learning to develop AI processes?

    2.  What do you think of placing script names inside Atk tags to run them when that attack is executed, similar to items?

    3.  How do you handle storing custom variables?  I've been puzzling this over for a while now, and haven't come up with an
         answer that makes sense.  Are you using a two-dimensional array to pair variable names and values together?
Logged

CraigStern

  • The Creator
  • Administrator
  • General
  • *****
  • Offline Offline
  • Posts: 3204
    • View Profile
    • Sinister Design
Re: Ask the developer a question!
« Reply #1621 on: May 29, 2015, 09:17:53 AM »

1.  How did you start learning to develop AI processes?

It was a natural outgrowth of the kinds of games I was making. When I started making TRPG Chapter 1, I knew less than nothing about programming, and so I took the shortcut of making enemy choices in battle 100% random. In Chapter 2, I suddenly had a spatial battlefield to consider, which meant figuring out decision trees to govern character movement and attacks based on the relative positions of various characters. (I did a terrible job of actually programming this at the time, but I at least had the general concept worked out by this point.)

TRPG:SoG and the Psy Arena games introduced backstabbing, and I really wanted a more sophisticated enemy AI for these, so I figured out a simple heuristic to make the AI choose targets more intelligently based upon whether the attack would backstab, whether the attack would kill anyone, whether it would hit multiple targets, and whether a healer was included in the attack.

By the time I got to Telepath Tactics, combat mechanics had become quite complex, but the basic structure of the heuristic from past games remained helpful, needing only a few tweaks (a simple penalty to each potential move's "score" based on energy cost relative to the damage it would do, watching out for friendly fire, being aware of the opportunity to drop enemies into environmental hazards, etc.)

The main AI snag in TT's AI was figuring out how to code pathfinding from scratch, which took me weeks of hard work with a pen and graph paper to work out. I ultimately gave away my pathfinding solution in the $125 tier for the game's Kickstarter. ;)

2.  What do you think of placing script names inside Atk tags to run them when that attack is executed, similar to items?

I've been thinking about implementing that for quite some time--and I'd have stuck this feature in long ago were it not for the fact that this will be somewhat laborious to implement. It's just a matter of priorities at this point; getting the game stable and running without slowdown remains top priority.

3.  How do you handle storing custom variables?  I've been puzzling this over for a while now, and haven't come up with an
         answer that makes sense.  Are you using a two-dimensional array to pair variable names and values together?

You guess correctly. ;)
Logged

bugfartboy

  • White Cape
  • ***
  • Offline Offline
  • Posts: 1714
    • View Profile
Re: Ask the developer a question!
« Reply #1622 on: May 29, 2015, 09:46:48 AM »

You guess correctly. ;)
I guess it wouldn't be a literal two-dimensional array, seeing as one would hold strings and the other integers, but it's still an interesting idea. How many unique variables can be constructed with this setup? Do you assign the arrays a very large size to begin with and just run with it? Or do you reconstruct the array to fit any time a new custom variable is assigned?
Logged

CraigStern

  • The Creator
  • Administrator
  • General
  • *****
  • Offline Offline
  • Posts: 3204
    • View Profile
    • Sinister Design
Re: Ask the developer a question!
« Reply #1623 on: May 30, 2015, 08:56:54 AM »

There is no size limit to these arrays; I simply use the push() function in AS3 to add new variables as they're created. Consequently, there is theoretically no limit to how many variables you can create (though if you created thousands of them, I imagine it might start to impact game performance).
Logged

bugfartboy

  • White Cape
  • ***
  • Offline Offline
  • Posts: 1714
    • View Profile
Re: Ask the developer a question!
« Reply #1624 on: June 07, 2015, 10:51:23 PM »

Quote from: Manual
typing R[x-y] in a script action will tell the game to randomly select a whole number
between x and y. Both x and y must be non-negative integers.
Is this an inclusive between or an exclusive between?  Are x and y both a possibility?
Logged

CraigStern

  • The Creator
  • Administrator
  • General
  • *****
  • Offline Offline
  • Posts: 3204
    • View Profile
    • Sinister Design
Re: Ask the developer a question!
« Reply #1625 on: June 08, 2015, 01:32:56 PM »

When using R[x-y], both x and y are included in the range of possible numbers.
Logged

bugfartboy

  • White Cape
  • ***
  • Offline Offline
  • Posts: 1714
    • View Profile
Re: Ask the developer a question!
« Reply #1626 on: June 08, 2015, 03:38:05 PM »

Are there plans for Tiles to be loaded from Campaign Date files?
Logged

CraigStern

  • The Creator
  • Administrator
  • General
  • *****
  • Offline Offline
  • Posts: 3204
    • View Profile
    • Sinister Design
Re: Ask the developer a question!
« Reply #1627 on: June 08, 2015, 08:22:05 PM »

I'd like for that to be supported eventually.
Logged

bugfartboy

  • White Cape
  • ***
  • Offline Offline
  • Posts: 1714
    • View Profile
Re: Ask the developer a question!
« Reply #1628 on: June 09, 2015, 03:31:00 PM »

Is there any way to summon a character not explicitly defined in CharClasses.xml, such as ones on a roster instead, with a Create attack? I've got a few ideas that I could theoretically make work with some playing around, but would ultimately be made easier if this was the case.

How many of each card are there in the average Psy War deck?
Logged

CraigStern

  • The Creator
  • Administrator
  • General
  • *****
  • Offline Offline
  • Posts: 3204
    • View Profile
    • Sinister Design
Re: Ask the developer a question!
« Reply #1629 on: June 10, 2015, 02:58:28 PM »

Characters that are on the battlefield, belong to Army 0, and are still alive at a battle's conclusion will be saved in the player's save game file--any changes to their stats should then carry over to when they next appear. Characters are loaded directly out of CharClasses.xml under all other circumstances.

I don't 100% remember, but I believe that there are 2 of each card type in a Psy War deck.
Logged

bugfartboy

  • White Cape
  • ***
  • Offline Offline
  • Posts: 1714
    • View Profile
Re: Ask the developer a question!
« Reply #1630 on: June 10, 2015, 04:10:30 PM »

And after a card is played, it gets shuffled back into the deck correct?
Logged

CraigStern

  • The Creator
  • Administrator
  • General
  • *****
  • Offline Offline
  • Posts: 3204
    • View Profile
    • Sinister Design
Re: Ask the developer a question!
« Reply #1631 on: June 11, 2015, 07:59:19 AM »

Nope--it remains discarded until the deck runs out of cards, at which point the discard pile is reshuffled into a new deck.
Logged

bugfartboy

  • White Cape
  • ***
  • Offline Offline
  • Posts: 1714
    • View Profile
Re: Ask the developer a question!
« Reply #1632 on: June 11, 2015, 08:06:41 AM »

Is there any in-universe explanation as to why the cards bear the likeness of people that wouldn't be known otherwise? I mean, surely not every deck has Guy, Anya, and Grotius.
Logged

CraigStern

  • The Creator
  • Administrator
  • General
  • *****
  • Offline Offline
  • Posts: 3204
    • View Profile
    • Sinister Design
Re: Ask the developer a question!
« Reply #1633 on: June 11, 2015, 01:13:52 PM »

If you like, you can explain that as the player mentally assigning familiar identities to unfamiliar designs on the cards. ;)
Logged

LightningLord2

  • Stone Golem
  • *
  • Offline Offline
  • Posts: 34
    • View Profile
Re: Ask the developer a question!
« Reply #1634 on: June 13, 2015, 06:31:59 AM »

Will you make it possible for multiplayer maps that players can rearrange their troop positions? I don't want to have to write down and memorize which position is occupied by which slot.
Logged
Pages: 1 ... 107 108 [109] 110 111 ... 118