Jump to content

  • Log In with Google      Sign In   
  • Create Account

wodinoneeye

Member Since 02 Dec 2004
Offline Last Active Oct 27 2014 07:27 PM

Posts I've Made

In Topic: Issues with multiplayer 4X game

27 October 2014 - 07:24 PM

Some kind of 'while you are waiting' you do some effort/activity which optimises your controlled game assets(objects you control), which is independant of actions taken by other players upon those same assets.

 

If you put extra effort in while waiting (keeping you busy and interested) then the delay isnt as bothersome (and the longer your opponent takes is MORE the benefit to you)

 

Possibly some short minigame-like operations (which can be continued if interrupted) withing the game objects.

 

Probably subject to 'decreasing returns'  so that the delay doesnt bend the advanatages too much  for any player

 

 

Example - I have a widget Factory on the map  and I can 'help' it to be built faster  by doing X manipulations  and once in operation I can 'help' it product a bit faster  (my decision which is priority to apply MY attention too) for something I consider most critical  OR give broader attention to multiple assets (objects) which will (because of decreasing returns)  reap the most benefit for the effort I expend  (in that delay waiting time).

 

Of course it requires  an additional;  internal mechanism for the 'objects'  to be (graphically) presented and interfaced with (managed0

 

-----

 

Myself I always did wonder how well the 'online' versions of some games (like Civilization)  actually worked when it took so long for 'your turn' to come back around again.  I never did play them to find how they solved the 'sit and twiddle your thumbs' part of thatmechanism or what measures they took to prevent players from monopolizing the time  (taking a long time to do THEIR turns)  -- for games that arent long delays like the old postal games (which had a fixed weekly schedule)


In Topic: General advises on conception of a game engine

27 October 2014 - 07:11 PM

Figuire out precisely what you need it to do and avoid "Creeping Featuritus" which can cause inclusion of elements you dont really need (and add unneeded constraints or work).

 

If you find yourself saying "it would be nice to have THAT"  then you need to figure out early whether you need it or not.

 

Retroactively changing the engine to have features you 'now need' can be counter productive and quite wasteful of effort.


In Topic: Crowd simulation

27 October 2014 - 07:07 PM

Grid can be a good approximation (squares big enough to hold a person without too much crowding - scaled to say 4 feet by 4 feet)  or a more irregular Navmesh of similar 'cell' dimensions that closer matches upto the irregularities of the terrain.

 

Looking into D*  (Dynamic A*) might be useful as a mechanism (or a variant of it) which reserves ahead of the moving object some space (with an added time dimension) to simulate the looking ahead behavior people use while moving in crowds.

 

Variations would only reserve a short time ahead and require near constant reevaluations and implementing conventions like 'keep to the right'  that some people get used to in situations (like sidewalks) whhere there are conventions. 

 

Depending on the setting (like a cityscape) there are also other factors -- traffic lights at crossings and vehicles moving by their own rules which might complicate the situation)

 


In Topic: O(pow(N,12))

23 October 2014 - 06:05 PM

in  generateIndexVertexBuffers()   use either a  GOTO  or ELSE IF  to skip code when the condition becomes  canBeSeen = true;

 

(your mileage with your compiler may vary so try both ways and profile/speed test each way to find which one is fastest)

 

 

 

For those  indents in   // brute force against the VoxelCloud

 

the multiple tests  like   if( basex + ox1 + ox >= x )   can be one ANDed  IF statement

 

if (( basex + ox1 + ox >= x ) && ( basex + ox1 + ox <= x + 1 ) && ( basey + oy1 + oy >= y ) && 

   &&  ( basey + oy1 + oy <= y + 1 ) && ( basez + oz1 + oz >= z ) && ( basez + oz1 + oz <= z + 1 )    etc...

 

to eliminate alot of that gross indentation for the meat of the loops  (the compiler should be smart enough to quick exit on the first false clause   (at least as that logic is now ....if you cant simplify that logic/loops drastically)

 

 

more indent elimination for the similar logic clauses  :

like  if( mVisVoxelStructure[basex][basey][basez]->mExist == true )   can be ANDed    '&&'   and dont need so much indenting

 

 

you might also crush out alot of duplicate math by having some    temp variables    like   

basex_ox = basex + ox         done once higher in the loops   (the compilker probably does this, but it can make your code less bulky looking)

 

--------

 

You should be able to move some of those massivlely nested loop test higher into the nesting structure to eliminate alot of unneeded processing

 

if( mVisVoxelStructure[basex][basey][basez]->mExist == true )   should goimmediately within the level of the  basex,basey,basez  loops as there is no point running the tests beyond that for those loop values  if the voxel point there doesnt exist

 

look at the patterns and you will probably find similar higher repositionings for the

if( mVisVoxelStructure[basex + ox][basey + oy][basez + oz]->mExist == true )

and

if( mVisVoxelStructure[basex + ox + ox1][basey + oy + oy1][basez + oz + oz1]->mExist == true )

and the others too

 

----

 

Another possible Simplification   -- you have a very small regular pattern    of combinations of  {0..1}  and  {-1..1} for 3 nested XYZ variables   and there might be a way of having those offsets be static in several arrays which only a single loop need traverse   (short enough combinations that you might be able to do that (static) for 6 range variables in one loop

 

 

For me (something Ive done to speed things up even more) was with fixed array sizes for the asteroid data to do pointer offsets arithmetic  staticized to eliminate the overhead of multiple dimension arrays -- but again that wound NOT work if you are applying this to a more generalized solution  (ie  ASTEROID_SIZE  being variable to any size)

 

-----

 

 

You also might want to use a 1 cell deep empty boundry around your asteroid data  to eliminate the need for the missing boundry checking  (and adjust all your loops accordingly)  as some of your offsets appear to sometimes try to access the array with coordinate  values of      -1     or  ASTEROID_SIZE     which would go outside the proper array ranges and be incorrect (if they didnt cause a segment fault)


In Topic: Planetary defences, ground forces, fleets

11 October 2014 - 04:31 PM

Sensors ??  To get a chance to move the mobile resources back ???


PARTNERS