Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 10 Nov 2006
Offline Last Active Today, 01:55 AM

#5169042 How to make unique and interesting planets (4X)?

Posted by Ashaman73 on 24 July 2014 - 11:22 PM

How to make them interesting/unique/fun?

A single drop of water in a desert is interesting and unique, but quite mundane in a tropcial region.


The concept of interest/unique is similar to the concept of contrast. To create something unique and interesting you need to create something mundane first.


Well, what are mundane planets ? Are there terra-formed earthlike planets, populated planets, desert like planets, alien planets, water planets etc. ?


A very hi-contrast will make planets like bonfires. Eg. if most of your planets are desert like, with small colonies or even only a space station, then a tropical planet inhabited by aliens will be like a bacon the player want to explore. On the other hand, if most planets are terra-formed, containing some kind of wildlife, then a alien populated planet has not such a strong attraction and uniqueness.

#5168065 Prevent Paging

Posted by Ashaman73 on 20 July 2014 - 11:01 PM

On my server side I plan on loading as much resources into ram that will fit of course with an order of priority filling all the available ram. I want certain resources to be available as fast as possible trying to get <= 1ms round trip over gigabit lan.

My first thought: why are you not using a performance oriented database (paired up with hi-performance hardware) which meets your data-access requirements ?

#5167533 How To Make Combat Formulas Work Better ?

Posted by Ashaman73 on 18 July 2014 - 01:38 AM

 I have been running combat simulations on and off for the last couple days, and I have been having issues making every thing "work" together to create a smooth running system.

 Here is what I have, maybe someone can figure out a better system than what I have.

( this is real time combat )


Combat Level - derived from several of the base skills ( haven't figured out a good way to calculate this yet )

HP - health ... regenerates based on combat level

MP - magic ... regenerates based on combat level

RP - religion ... regenerates based on combat level

Strength - how hard something can hit

Accuracy - percent added to damage

Agility - percentage chance of dodging some or all of an attack

Defense - amount of damage that can be absorbed

Armor - percentage of damage that can be absorbed

Luck - positive or negative random effect


* A difference of 3 or more combat levels between the combatants will change percentage of damage dealt and damage taken

* The level of MP & RP is the attack and defence level.



 Hit Given =  (Strength * (Accuracy bonus + luck) ) * combat level difference penalty or bonus percentage

 Hit Taken = (Hit Given - ( (Defense * armor bonus) * (agility bonus + luck) ) ) * combat level difference penalty or bonus percentage

Take a step back and discard as much as possible until you have no more things left, which you can take away without collapsing the combat system.



Hp - keep it

Mana,Relegion,Strength - just let's call it power for now (=how hard did an attack hit,regardless of its nature).

Accuracy- ditch it, just an modifier of damage, damage is derived from power

agility,defense,armor - just let's call it defense for now (=how good are you to avoid damage)

luck - random seed modifier, ditch it


Leaving for just combat related stuff:

Hp, Dmg, Def

While power is something special, either it is a resource like hp for casting spells etc. or it modifies the dmg output.


Now start building a simple system relying on these attributes, something like this:

hp' = max(0,hp - dmg/(1+def))


Now you need to think about a basic balancing. Start to set a fix value for one value, like hp is always 100. Then think about what avg dmg/def values would make sense to have a combat situation, like if you have X dmg and half of it as def, the defender should survive 5 hits.


The next step is to consider the effect of your combat level on the formula. Don't make it to complex. A linear effect would be a good start,something like this


with cl = combat_level factor, for attacker (cl_a) and defender (cl_d), if cl_a=cl_d, then you get



Bevor we differentiate between different, more detailed attributes, add some modifiers, just ignore the combat level because it is linear:

hp'  = max(0, hp*f_hp - dmg * f_dmg / (1+def * f_def))/f_hp


This way you have the option to handle different combat situation more gracefully:

1. example:  a spell, which protects you vs 50% of any incoming dmg =>f_hp=2

2. example:  a spell, which ignores any defense value => f_def = 0


Now you can begin to differentiate between different influences on the basic attributes, that is, you derive the basic combat stats like hp,dmg,def on-the-fly, example:


= strength * factor * weapon_base_dmg, if basic melee attack

= magic * factor * spell_base_dmg, if basic spell attack

= relgion * factor * praying_base_dmg ...

#5167314 Stop objects and clear all forces

Posted by Ashaman73 on 17 July 2014 - 01:53 AM

But calling clearForces has no effect. How to do it other way?

You need to do two things:

1. Detect that you dont hit the ground any longer:

Either check contacts or use raytests. Bullet supports contact manifolds and ray casting. To avoid some miss-behavior for bouncing objects, I would check the last 2 frames, that is, you have ground contact only if you detect a contact this and in the last frame.


2. Nullifying the forces is only one part, you still need to clear the current velocity, thought you can keep the up-down (y-axis) velocity.

#5167306 Game development for Oculus Rift, where to start?

Posted by Ashaman73 on 17 July 2014 - 12:25 AM

Well, a good start would be to get your hands on a dev-kit tongue.png Everything else would be pointless (to develop a game for a specialized tool without testing it on the tool itself).

#5167080 Fleets with personality & no micromanagement (4X)

Posted by Ashaman73 on 15 July 2014 - 11:01 PM

I create often too complex design and start simplifing it quite drastically later on, therefor, from an external view, I would say, that your fleet management is too complex for now.


You have 4 levels:

1. fleets (8)

2. flotillas (1-12)

3. squadrons (4-12)

4. ships(...)


Even if you build a dedicated fleet-management game it would be quite complex, but in the context of a 4x game it seems too much in my opinion.

I would get rid of the flotillas first, then add the option to transfer ships/squadrons between fleets. If you want more detailed,tactical combat, do it on the squadron level (I could think of Xcom like combat with 4-12 squadrons).

#5166716 Closing the loop: player death in a schmup?

Posted by Ashaman73 on 14 July 2014 - 06:02 AM

My original intent was to have permadeath: if you die in a mission, you lose all progress.

If you want to reset the progress of the player, do it only up to where he is able to benefit from his experiences.


Therefor the first question is: Can the player make misstakes which will result in problems much later on, or does a misstake result in (almost) immediatly consequences.

Eg getting killed by a boss, because you don't master his attack pattern yet, is an example of the latter consequences. On the other hand, if you are able to develop your ship over time and all your investment went into weapon technology and no hull upgrade, then getting killed by the boss due to your low armor values is a more strategically misstake.


This should define your reset range, if you have a strategically development, permadeath (starting from the beginning) is a valid option. If loosing only to a boss due not knowing how to master this challenge yet, then restarting only this mission would be a better option (This would avoid to grind through all the missions you already mastered).




perhaps some form of handicap (damaged ship that needs repairs?)

I don't know your excat game flow, but if you have a ship, which got developed over time and you need to do missions to progress, I would consider the following ideas:

1. Reset only on mission base:

You can retry a mission as often as you like. If your ship got destroyed, you can try again without further penalties.

2. Destroy your ship piecewise:

If you got a blow, only a certain equipment got destroyed (or damaged). Getting a critical hit or getting too many hits will destroy your ship.

3. Reward/damage choice:

If you beat a mission, but got some destroyed (damaged) equipment, you have the option to retry again or to take the reward/damage and continue.


This has the advantage, that a player has the choice to skip a frustrating mission while accepting the penalty. On the other hand,doing it too often will result in major problems later on. Nevertheless, the player has the choice to restart the game and utilize his new knowledge to perform better the next time.

#5166700 Storing position of member variable

Posted by Ashaman73 on 14 July 2014 - 05:02 AM

by automating most loading/serialization/editor-related stuff.

To be honest, I would use only a very simple system, that is , just a de-/serialize (post-deserialization) method which read/write your (primitive) attributes from/to a stream. The overhead to code and maintain a more complex system is not necessary in my opinion and often more error prone than KISS. 


Here is a simple example of a more complex scenario, continaing arrays, chunks, complex sub objects etc:

serialize(stream) {
  // handle inventory
  if(inventory.size()>0) {
    for(i=0;i<inventory.size();i++) {
       bool item_present = inventory.get(i);
       if(item_present) {

  // handle equipment
  if(equipement.size()>0) {


deserialize(stream) {
   for( int chunk_id = stream.read();chunk_id!=END_CHUNK; chunk_id = stream.read()) {
      switch(chunk_id) {
        case INVENTORY_CHUNK:
           int size = stream.readInt();
           ... continue to read rest ... 

        case EQUIPMENT_CHUNK: 
           // read, but ignore, no longer supported ....


The benefit is, that you have more control over sub-sequent save game versions and you are able to read and process older file versions more easily without bloating the whole code. The latter has the benefit, that you can add new attributes more easily or ignore obsolete one, without forcing a new game file version. It is really annoying if almost every single bug-fix will make older save-games obsolete.

#5166153 Cooperative Pathfinding Vs Queuing?

Posted by Ashaman73 on 11 July 2014 - 02:25 AM

But the problem I encounter right now is the agents sometimes will be dead locked within choke points.

I got a similar problem once (lot of agents and narrow tunnels). It depends a lot on the environment you have. There are several solution additional to coop-pathfinding or queue, but it depends on the environment and the agent movement possiblities:

1. swapping: you can swap entities, if the block each other (works in grid/rogue like scenarios)

2. always move right: entities will try to follow a path by moving on the right side of the path (path following steering behavior)

3. queuinghelps a lot to ease a situation, but alone will only help if your entities are not blocked by other entities moving in the opposite direction.


To be honest, I wasn't able to solve this situtation in a satisfying way, therefor I disabled entity/entity collision at all (only entity/player) and added steering behavior  (queueing,avoidance etc.) to give a better illusion of collision less entity movement.

#5166120 [resolved] Inventory System 'Architecture'

Posted by Ashaman73 on 10 July 2014 - 10:57 PM

I don't know if I understood your system correctly, but your component types are, for example, weapons,armor,quest items ? And your components are like a sword, club, helm etc ?


An inventory system is often a very low frequently accessed system (compared to physics,AI,rendering), therefor not really performance critical. In this case I would always sugguest to keep the data-structures and manipulation methods simple,small and clear. Eg a simple array as inventory holding all your components (each component includes its own type) plus some common manipulation methods like add,remove,swap,merge, get next by type, get next by id etc.


On top of this you can build other utility methods, like filtered,sorted views (show me only weapons, sorted by damage), links (button A is linked to item X at inventory index Y).

#5165955 Saving Question

Posted by Ashaman73 on 10 July 2014 - 12:42 AM

The problem is, how to discover the correct component type engine side, if the usesr are able to write a custom (plugin) ?


First, I would add a factory like management class (compare L.Spiros post) and a unique id, which can be designed by the component coder himself (build in some tests to avoid dublicates etc.):

interface ComponentManager {
   Component deserializeComponent(Stream);
   unique_id getUniqueId();

class ComponentManagerRegistry {
   registerComponentManager(ComponentManager); // map: unique_id -> ComponentManager
   ComponentManager getComponentManager(unique_id);

Each component must provide an unique id and must register itself to the component manager.Then the de-/serializsation code looks like this:

for each Component c do
  unique_id = c.getUniqueComponentManagerId();
  ComponentManager cm = ComponentManagerRegistry.getComponentManager(unique_id);

while stream!=end do
  unique_id = stream.deserializeId();
  ComponentManager cm = ComponentManagerRegistry.getComponentManager(unique_id);
  Componentn new_component = cm.deserialize(stream);

#5165785 2D Platformer Technique?

Posted by Ashaman73 on 09 July 2014 - 05:52 AM

Since all my nodes are "walkable" tiles. It can never jump up to hit a target in the air if it needed.

Well, you dont need to handle every situation by the pathfinder. Eg if your entity is able to push an other object by jumping up to it, just determine the best jumping-start-tile, move to this tile by your pathfinder, and jump up to the object using the standard physics, then relocate to a close tile and continue like before.


Since the nodes are all based on merely x and y (not taking into account acceleration and speed), it requires a lot of fudging to get it to work (for example, you can see it slows down between jumps, because it has to position itself correctly before making the jump).

This is a problem of the entity controller you use, in other words, you control your entities by using forces/velocity (?) to move it around ? This is called dynamic controller. The alternative is a kinematic controller, which has better control and often uses the physics engine only for collision detection. Dynamic controllers are really hard to get right.


It cannot make jumps like this:

By the use of a kinematic controller (you code the movement path of the entity by hand) and adjustment to your waypoints (add extra edges for jumping left or right to an tile above) , you will be able to manage this too.


It gets stuck for a really really long time. (This is stopped after a fixed time)

Maybe it is not the best idea to use a physics engine to handle the collision between world and entity if you want to have these kind of special movement (jump up to a tile, but then do not fall through it). I would recomment to use the physic engine to help you to do the collision detection (check if entity at position X,Y collides with tile B), but to implement the collision response yourself, that is, use a kinematic controller and handle special movement actions yourself (eg. if jumping up, ignore tile A,B,C , until jump is completed etc.).

#5165778 shadowmapping don't work

Posted by Ashaman73 on 09 July 2014 - 05:27 AM

You have encountered one of the many shadowmapping artifacts. Here's an article about this and some other issues with shadowmapping and how to counter them, thought there will be never a perfect  and simple solution.

#5165526 How important is localization?

Posted by Ashaman73 on 08 July 2014 - 05:55 AM

Do you want to sell your game to a few thousand Americans or to tens of thousands of people around the world? America has only 350 million people but the world has 7 billion. More languages = more markets = more sales.

Nah... I'm a german, I play games for more than 30 years, and 99% of all the games I played were english only. I would even say, that most of the internet is english only. You have the nativ speaking english markets (US, UK, AUS), you have countries where almost everyone can speak english, atleast the iOS users (eg india), you have countries where english is part of the school system (eg germany) and you have lot of people who knows enough  english to understand the gameplay (as long as you dont have a story telling game ;-) ).


With english you will cover most of the paying market, even the strong german market. I would localize it only if it sells good in the english market first.

#5163002 What truly makes an enemy/boss hard to beat and be wary of?

Posted by Ashaman73 on 26 June 2014 - 07:06 AM

Well, from a more abstract game design view, a boss is just a challenge milestone for the player. Two kind of challenges come to mind:

1. learning challenge: in this case you need to analyse the boss, its tactice and beat him according to your knowledge.

2. skill challenge: in this case you need to be really skillful and need to master the game mechanism to beat the boss.


These are really two different kind of challenges, where the learning challenge is much saver to be used. According to your question, the hardest boss would include a learning and skill challenge. The issue with skill challenges is, that there will be always players who will not be able to archive the necessary skill level (=>frustration) and players who will master the skill level with ease (=>boredom). The same could be said about the knowledge level, some players will be learning or just knowing the right things at first sign (=>boredom/too easy), and some players wil justl not catch a single hint you give them (=>frustration/it is bugged attitude), but atleast you can beat the knowledge challenge with the help of others (guides,internet,forum).


As you see, a hard challenge depends really on the player. Most veteran players will most likely take knowledge challenges with ease (yeah, I know this move/riddle/puzzle already from game X), whereas adding skill challenges could be really dangerous and should target only a defined audience (eg dark souls, in which both skill and knowledge is needed).


This has an interesting impact on games. With games getting more expensive to produce, but players are less willing to pay high prices (waiting for steam sales etc.), games only make any profits by selling really large number of copies. Therefor a game needs to address a really broad audience, and therefor it needs to reduce all the challenges (e.g. in single player games 90% of the challenges will be knowledge based and the rest will be based (low) skill-level). On the other hand, players who want to challenge their skills, will pick up most likely a multiplayer game (you need higher skills than your opponent).