Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


LorenzoGatti

Member Since 25 Nov 2005
Online Last Active Today, 02:53 PM

Posts I've Made

In Topic: Bullet hell projectiles as separate objects? Or as one whole particle system?

14 December 2014 - 09:45 AM


It would be VERY flexible to have your bullets as separate game objects, but...



Dynamic memory is slow, everyone knows that. If you have a component based architecture, and are storing your game objects in a list, as well as pointers to those game objects in separate lists, and you have multiple enemies on the screen firing 30+ bullets at a time...



you'd have to dynamically allocate around 1000 or more objects per frame, including all of the separate rendering components... and physics components... ugh.


 

  • You must not dynamically allocate thousands of objects per frame: allocate large pools before beginning and recycle objects after they "die". If you cannot reliably keep around and reinitialize a reincarnated bullet, or if you "need" dynamic allocation of individual entities such as bullets, improve your component system.
  • Objects should be indexed into grids, quadtrees etc. according to which sets of objects can and cannot collide with each other: emitters are completely irrelevant. Instead, depending on how your bullets behave, broadphase collision detection might be possibly based on groups of bullets that are moving in a similar way (e.g. parallel trajectories at the same speed).
  • Why do you think an entity-component data structure and a particle system are different and incompatible? Only the basic "particle" component of your bullets is performance-critical and it can quite possibly live in a quadtree (along with an entity ID, to look up other bullet components such as what to do when the bullet collides). 

In Topic: Fleets (as formations)

08 December 2014 - 02:47 PM

The most fun action to do, and the one that tolerates the most micromanagement, is moving fleets around to make them do something useful.

Building ships and fleets is a clearly preliminary task that should be simplified and stripped down to leave only the interesting decisions, such as what shipyards are most suitable, what ships models and improvements should be researched and produced, which assignments need new ships more urgently, etc.

Even using fleets could be boring; the player should be allowed to automate tasks such as patrol routes/zones, escorts of civilian convoys (possibly including escorting new military ships to their assigned fleet's home if travel is dangerous), generic travel, exploration with long range sensors, and so on.

There might be some opportunities to turn boring abstract actions into regular fleet movement (for example, explicit temporary fleets representing convoys of reinforcements or cargo ships instead of abstract movement of resources)

 

Regarding moving all units every turn, player attention to each fleet should be required every now and then (e.g. when a multi-turn order is finished) but optional every turn, with some appropriate user interface to efficiently exclude uninteresting fleets that should continue following the same orders.

For example, if the enemy Death Star is detected, the right turn to inspect all fleets, decide which ones should take part in a great offensive against it, and changing their orders to execute the new strategy is right now, regardless of feelings about micromanagement. The player would simply enjoy a special, important "big turn".


In Topic: Best way to follow a moving object

08 December 2014 - 08:34 AM

Adding to ApochiPiQ's suggestion, you can obtain better incremental pathfinding at a higher cost by discarding the last part of the old path and extending the chaser's path from there, with increased opportunity to take shortcuts against the target's meanderings. At most, you can discard the whole previous plan, going back to non-incremental pathfinding. The amount of discarding can vary adaptively (e.g. according to how much of the last discarded path portion is reconstructed without change).


In Topic: RTS pathfinding gridlock, world coordinates vs. path node coordinates

06 December 2014 - 09:33 AM

If the pathfinding graph is small, maybe you can afford to maintain, for each place on the map, a list of which units are going to pass through that location and when (computed as a byproduct of shortest path search). This would allow low-priority units to treat higher priority units as obstacles, avoiding congestion preemptively.


In Topic: A game idea, need help please

03 December 2014 - 01:58 PM

Of the different genres you are touching, the one you seem most interested in is PvP raiding and war of attrition, on a very strategic level of detail. The concern with being online to defend cities is hard to understand: it's obvious that armies must fight in automation mode as well as when they are guided by the player to avoid the need for micromanagement. An online player whose city is under attack could make last minute adjustments or counterattack, with only a marginal advantage over AI-controlled defense. If there is a hero representing the player's character, he needs to fight under AI control too.


PARTNERS