Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 25 Nov 2005
Offline Last Active Today, 09:48 AM

#5164541 Speed of fleets

Posted by LorenzoGatti on 03 July 2014 - 05:36 AM

Many observations made so far point in the same direction: speed differences make little sense and can be eliminated as a source of pointless annoyance.

  • FTL propulsion can have the same pseudo-speed for every ship because it's based on the same technology: for example, a succession of "jumps" involves a maximum or fixed distance and a constant preparation time for each jump, with the only difference between ships being energy cost and device size.
  • Realistic propulsion can be designed to give the same "standard" acceleration, and therefore the same travel time on any route, to any ship.
    If both engines and robust materials are very good and relatively cheap, the limiting constraint for acceleration is not squashing passengers to death (rather than affording powerful engines or not breaking the ship apart) and it doesn't vary by ship type. Improved engines are going to be smaller, cheaper, more efficient, but not "faster".

If FTL speed differences (like in Star Trek) are needed, they can be simplified to a few tiers and used to forbid ships with different speeds to belong to the same fleet. Serious speed differences are going to imply different strategic movements in any case.


If limiting thrust of realistic engines according to available fuel is a normal occurrence, it can be assumed that the fleet automatically allocates available fuel to maintain the same travel time for every ship, rather than slowing down specific fuel-challenged ships. Computations are easy: fuel is proportional to ship mass.

#5163680 Alpha Zone on Targa Texture just won't show alpha

Posted by LorenzoGatti on 29 June 2014 - 01:40 PM

What about the creation of the OpenGL texture? The alpha channel could be lost after loading the file correctly.

#5162732 Idea for samurai/ninja game

Posted by LorenzoGatti on 25 June 2014 - 02:30 AM

So question: Would this again be a good idea for a single player game with some multi-player aspects? Something like a Halo or Call of Duty or something like that?

Multiplayer modes add a large amount of extra work because they add significant technical challenges, such as running servers and finding them, designing communication protocols, synchronizing clients while minimizing lag, handling player identities and maybe accounts, etc.
All these problems can be solved, usually in effective and efficient ways, but not for free.
I regret mentioning that in a strategy wargame player vs player battles are particularly appropriate; it's a standard feature but, in your case, probably a luxury that should be left out even under ideal circumstances.

Or would it just be best to make something like a single player that is like Tenchu and Way of the Samurai combined?  Both of those games have a mission based part role playing aspect to them.

Both these game series appear to have relatively complex fighting, complex character models and large 3D environments, putting them in the horribly expensive.tier of development budgets.
If you survive the initial setup effort of being ready to make 3D assets (which might be a worthwhile learning/recruiting experience) and getting a 3D engine running (which might be relatively easy and inexpensive with ready-made ones) you are left with the choice between a small and short game, a simplified and ugly game, or both.
Instead, as already touched by others, you should focus on cheap technology and development tools.
For example, if you choose a RPG angle rather than a wargame angle, tile-based 2D map editors should be suitable for churning out large amounts of Japanese-style scenery (after drawing some highly reusable tiles), and something like RPG Maker could serve as a tile map editor and allow cheap implementation of large amounts of characters, dialogues and fights, sacrificing the sort of action found in games like Tenchu.

Or it could also take on a Fable type life.  The only thing would be, based on what character the player decides to play, the missions and quests would be slightly different.  Am I hitting on something a bit more viable now?


No. Something like Fable is even more horribly expensive to make than a "standard" action-adventure game, and more difficult because it's more sophisticated. More mechanisms can go wrong, requiring more testing and more iterations, and it's very likely that more assets would be wasted on optional and mutually exclusive levels instead of used once in mandatory levels.


Please, give me as much advice as you can.  For me some of it is hard to hear, but it is helpful in understanding the scope of what I can do.


Your scope should be the smallest that leaves you with an acceptable game, and your expectations for a minimum viable product should be proportional to your skill and experience. What's the simplest and cheapest entertaining thing that a samurai or ninja could do?


So please, anything, any thoughts at all.  Now that I think about it, it would make an awesome single player game in the console arena.


Development for consoles is another difficult and expensive luxury. Choose one easy platform (most likely, Windows PC leveraging game-making tools).


Please let me know if I am now headed in the right direction.  You have my thanks!!


You are still headed in a tragically ambitious and confused direction, but at least you seem open to suggestions.

#5162271 Idea for samurai/ninja game

Posted by LorenzoGatti on 23 June 2014 - 01:53 AM

Combining large-scale battles, personal combat and adventuring is overly ambitious and incoherent: some of these aspects can be reduced to a collateral minigame (e.g. send spies between battles), reduced to a well-integrated part of the main game (e.g. exploration and stealth with specific units and limited purposes within a RTS), or implemented as variants of normal gameplay (e.g. a RTS turning into micromanaged melee combat with a handful of complex hero units and/or into RPG-like exploration with large maps and no reinforcements).


Your character types appear a bit irrelevant, because the only real one is the samurai, able to face all challenges and take any initiative. A ninja is, by definition, insignificant cannon fodder, while a ronin can be either hired by a noble house and effectively "promoted" to be the same as a regular samurai or independent and uninvolved in the plot (except perhaps as a minor enemy, not unlike bandits or savage animals).

Since your story is about noble houses struggling for power, ninja clans, monasteries, town leaders, various kinds of powerful free agents etc. cannot be important factions; they should appear as someone's allies.


Making a "learning tool" of your game is going to lead to ugly conflicts and compromises between fun and historical accuracy. For example, you might discover that rifles are a dominant strategy in battle and need to be limited or nerfed in unrealistic ways.


Regarding making a MMO, see the first item in the forum guidelines. Moreover, you are describing an eminently single-player game (your character vs. the rest of Japan: death or glory) which could be extended to small multiplayer battles without a plot. In a MMO design, not all players could be able to be the samurai general, and being a lowly soldier or ninja would suck.

#5161260 Attribute and Formula Help

Posted by LorenzoGatti on 18 June 2014 - 03:24 AM

I think one key information missing is what range of damage you'd like to see (minimum to maximum).

The range of damage values is only a scaling factor, so simple to manage that I forgot it in the example formulas in my post.

The starting points are

  • A set of benchmarks: the fight of unit A vs. weaker unit B should end with A's victory with probability p, often p=1, and its duration of n turns should follow a distribution with a given mean N and a given minimum and maximum, possibly approximate.
  • A range of hit point totals for different units: highly compressed like in Warhammer to make defense and "saving" hit points a big deal, extremely wide like in D&D to make minor damage insignificant, or something in the middle.

Given these constraints, it's obvious that, if unit B has b hit points, A's typical attack should do b/N average damage per turn, independently of how the stats and equipment of A and B determine damage. 

Different ways to do b/N damage per turn are also independent from stats:

  • Fixed and certain damage X every turn: X=b/N. Only an option if hit point ranges are large or N is very small, or the necessary rounding to an integer will distort damage values.
  • Random damage: unit A's damage can be a random variable with an average of b/N. Winning probability p and the distribution of fight duration n can be computed from the distribution of damage.
  • A chance to miss: if unit A hits with probability q, doing X damage, q*X=b/N. Critical hits are a slight generalization to X or Y damage rather than X or nothing: q*X+(1-q)*Y=b/N. With both misses (probability 1-q) and critical hits (probability c conditional on hitting) you simply add three branches for X,Y and 0 damage: q*(c*X+(1-c)*Y) =b/N. And so on; X and Y can, of course, be random variables.
  • Random delay: if unit A attacks (on average) every m turns doing X damage each time,  X/m=b/N. In most games X<b (no 1-hit kills) implying m<N.

#5161003 Attribute and Formula Help

Posted by LorenzoGatti on 17 June 2014 - 02:01 AM

You need to decide how the combat rules should behave, then formulas that fit the requirements will be easy to find.

For example, consider critical hits:

  • Why do you want higher damage variance? How is low variance bad? Barring strange effects, higher variance gives a chance to the weaker party, and every game needs to find the proper balance between confidence and uneasiness (for strong characters) and between despair and gambling (for weak characters).
  • Wouldn't rolling virtual dice for damage, with the possibility of choosing the probability distribution of damage output quite freely for a desired expected value (in particular, larger variance can be obtained by summing fewer larger dice), be more flexible than a mixture of "high" and "low" damage?
  • Are you OK with a bimodal distribution? Would the players notice?

Or consider special (magical) attack and defense:

  • Against a given reference opponent (e.g. Str 50, Def 50, Mg 5), increasing Mg is equivalent to increasing Str and Def. What is the equivalence? Does it depend on your stat values? Or on the opponent's stat values?
  • For example, you might want a very linear system in which a +k Str or Def increase is always as useful as +1 Mg, regardless of your stat values, and against any enemy: expected magical attack damage could be (Str+k*Mg)/(Def+k*Mg).
  • Or you might want a strongly level-based system in which lower Mg values don't stand a chance against higher ones, with Str and Def mattering only in the same Mg tier: expected magical attack damage could be min( (Str-Def)*(attacker Mg - defender Mg), 0)
  • How many points of Str, Def, or Mg should equipment be worth? Should it vary according to stat values?

#5158061 Horror Story Help?

Posted by LorenzoGatti on 04 June 2014 - 04:50 AM

Rituals are only a detail of the plot, and in a game they should be designed according to practical criteria because they are completely arbitrary:

  • What is suitable for depiction? For example, chanting in made-up languages, chalk diagrams and candles might be rather family-friendly, violent human sacrifices in the middle of a disgusting sex ritual probably not. What pretty graphics and special effects are doable? How can they be adapted to be part of a magical ritual?
  • What is suitable for player interaction? Assuming the cult has to be disrupted, means could include sneaking an "impure" person inside a sacred perimeter, damaging an artifact, distracting or attacking cultists at a critical moment, delaying cultist travel, suppressing information, destroying or defiling a place of power, etc. The genre of your game determines the genre of the rituals; if the action is fun, any excuse about how magic works is acceptable..

On the other hand you should reflect on the higher metaphysical level on which your plot is supposed to make sense:

  • What are gods?
  • Are there even higher powers, e.g. generic "good" and "evil"?
  • What does it mean for a god to die, and revive?
  • What sort of magic is possible? (Reviving dead gods is probably one of the smallest niches of magic, probably something that never happened before; there has to be some larger body of tradition and knowledge.)
  • Where does magical power come from?
  • How can mere humans interact with gods?

For example, requiring the death of another (enemy?) god to resurrect the old dead one might range from appropriate because of cosmic balance and limitation mechanisms, to a reasonable plot gimmick to make resurrection difficult, to preposterous because the death of the god was a very special occurrence that has nothing to do with other gods.

#5155181 Roads (connection between villages/cities)

Posted by LorenzoGatti on 22 May 2014 - 02:28 AM

The first idea is to make some "build road" option after clicking on any village/city which would show DESTINATION ("neighbour" slots/villages/cites/nodes only) and by clicking you can build/upgrade a road/railroad. Also, my though is that maybe it should not be allowed to join any village with any village because it would look very messy (crossing of roads), so maybe some "distance limit" for the build road feature?


My suggestion to limit nonsensical road construction is relying on the Delaunay triangulation of village locations: allow roads that are an edge of the Delaunay triangulation, and forbid all others.

It seems that you are able to move, add and delete villages during initial map creation to obtain a nice Delaunay graph (with appropriate numbers of neighbours, sufficiently uniform edge length, etc.)

#5150283 Cars differentials, open, locked and preload

Posted by LorenzoGatti on 29 April 2014 - 03:48 AM

You are completely failing to explain the actual problems you have, apart from being perplexed by a new and unfamiliar subject or mixing up different models of different designs of differential. Are the cars in what I suppose to be a a racing game doing anything inappropriate?  


There is a wide range of useful locking and torque distribution policies you can adopt in your software-simulated differential, without even worrying about actual mechanical implementations.

As long as the behaviour of your differential is physically sound (e.g. you don't drive wheels with friction in the clutch, with preload springs, or with torques out of thin air) and it conforms to some basic principles (unlocked for small wheel velocity differences, locked when one wheel appears to be slipping) you can do anything you want with parameters such as a "preload torque": unlike actual physical quantities such as wheel angular velocities they are only an abstract description of what the differential does.

#5149881 Magic advancement system

Posted by LorenzoGatti on 27 April 2014 - 09:50 AM

Don't confuse different aspects of the magic system that are actually rather independent, particularly strategic improvement (acquiring new spells or improved variants of old spells), tactical spellcasting (e.g. gathering energy, performing rituals, hitting targets, etc.) and intermediate time scales (e.g. "preparing" spells in advance, D&D style, or keeping magical objects ready).

What is it that should feel more "magical" than learning from a trainer? What do you really need in your game?

Making study a boring activity that is left off screen and skipped over, but actual spellcasting player-skill-intensive, cool and complex, is as legitimate as making learning spells a varied collection of mystical revelations and discoveries, themselves an important part of the plot, but casting spells simple and dependable like mundane melee or ranged combat.

#5149868 DSP. Reverb

Posted by LorenzoGatti on 27 April 2014 - 08:33 AM

 The reverberation chapterof a a great textbook by Stanford professor Julius Orion Smith, "Physical Audio Signal Processing", is particularly comprehensive (feedback delay networks appear to be one of his research interests).

#5147837 Understanding and implementing "Immediate Stream Compaction"

Posted by LorenzoGatti on 18 April 2014 - 02:11 AM

Comparing the last diagram and your code, I don't see the "auxiliary array" of "block sums", nor the separate multithreaded processing steps that write it from collected per-block data (no locking, every thread writes only to one block's specific location of the array) and that read it to update the blocks (no locking, it's read only).

#5147064 Strange graphics file format

Posted by LorenzoGatti on 15 April 2014 - 03:19 AM

I was wrong about the modes, mode 1 means it's the difference from the pixel at (x - 1, y), mode 2 means it's the difference from the pixel at (x, y - 1). Still no clue about the other modes.

Edit: mode 3 is the difference from (pixel[x - 1, y] + pixel[x, y - 1]) / 2 or something like that

These appear to be the PNG filters. 1,2,3 correspond; other possible values include 0 (unaltered pixel) and 4 (Paeth predictor, see the PNG spec). Filter type 3 has a floor operation: the reference value is floor((pixel[x - 1, y] + pixel[x, y - 1]) / 2) in your notation.

#5146184 Need some pointers on a diplomatic AI

Posted by LorenzoGatti on 11 April 2014 - 02:20 AM

The different factions have the following tools to interact:

Declaring war for a specific neighboring sector
Giving gifts / send diplomatic ship to improve relations
Insult to lower relations
Trade agreements (allowing ships to buy/sell from other factions assets)
Passage agreements (using jumpgates from other factions to get to their sectors)
Military/Alliance agreements (both factions using military ships as one)
Give/sell/ask for a sector to improve relation or get money or remove a threat

Each faction has values that can be used: diplomatic power (how persuasive is a faction), xenophobia (how resistant is a faction to offers from another (to balance diplomatic power), how warlike or "tradelike" is the faction and so on. Most of it heavily influenced by 4X games.

Going to war is easy, but for the rest, like making alliances, allowing ship passage / trading and so on in a believable way, I am kinda lost. I don't really see a sort of generic algorithm that would make AI controlled factions using diplomacy without relying on a nightmarish mess of nested If/else/if/else. While I am fairly used to FSM logics which i used (to an extend) for individual units I don't really see that working on a faction level.

The major problem I see in this description of diplomacy is that most of it consists of arbitrary abstractions and ritual behaviour and it doesn't lend itself to translation into rules and game theory (which you need to have an AI that reasons in meaningful ways). 

If factions are interested in their own prosperity (as opposed to hurting themselves to hurt others more, e.g. going to war) they can simply be friendly with everybody: reciprocal trade and passage agreements, occasional fair exchanges of territories for good reasons, massive military alliances (marking the few rogue factions outside the alliance as a potential threat), no wars, no gifts, no insults, no bad relationships, no persuasion, no xenophobia. Strategy would consist of being ready to go to war with neighbours that aren't in the alliance in case they do something funny.

This style of AI would have to evaluate the economical benefit from trade and passage agreements (maybe a Monte Carlo simulation of commerce and travel with and without the agreement) and the best selection and deployment of military forces (maybe more suitable for thorough searching over move trees containing fleet movements, battles etc.).

#5145604 Pirate RPG class design

Posted by LorenzoGatti on 09 April 2014 - 02:23 AM

Almost any kind of spell would be highly useful for piracy as a job: illusions to mislead ships, fireballs etc. to threaten a whole crew, mind-affecting spells to make defenders ineffective, portals into the storage areas to loot without the hassle of a proper battle, offensive and defensive buffing to prevail in combat, etc. Magical countermeasures against piracy would be equally varied.

Your pirate class, on the other hand, isn't focused around piracy, it is focused on the sort of ship-to-ship personal combat required by a specific mundane style of piracy that would simply not exist in a world where magic is common and is a better way to fight at sea. 

You need a compromise between swashbuckling and magic: magic should be carefully limited so that it doesn't affect piracy enough to make combat useless.


For example, if almost any seaman could shoot decent antipersonnel magical attacks beyond cannon range, artillery would be obsolete (not a great loss) and engagements would begin with a possibly brutal shootout (not unlike the airship battles in the Last Exile anime); assuming magical energy runs out and there are no other common spells the engagement would proceed normally to boarding and evasion, with less ship damage and likely more wounded people than in real-life piracy (not affecting combat style too much).

If the same kind of magical shooting were a rare ability, high level pirate crews would hire a sniper and the sniper would pick off officers unopposed (or, rather, threaten to do so: what captain wants to order an attack knowing that he's going to be incinerated before seeing the outcome?).

Many targets would try to run faster than pirates or surrender because they can't, while rare and privileged targets would bring their own wizard sniper to put up a fight (usually causing pirates to retreat).