project-navigation
Personal tools

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - dodon

Pages: 1 [2] 3 4
16
I noticed this behaviour (on other maps).

Do you select a new soldier while the active one is moving?
Or better, do you remember which soldier moved while you selected the one in the first picture and where did it start?

17
Discussion / Re: Will 2.3.1 fix reaction fire?
« on: October 03, 2010, 01:16:14 am »
If it has been applied, then yes, it seems so.

So will there be a 2.3.1 release that fixes this RF issue for 2.3 versions or is it straight to 2.4?

This is what i called "a patch for 2.4" and it is only in 2.4 but it should be easy to backport this

18
Discussion / Re: Will 2.3.1 fix reaction fire?
« on: October 02, 2010, 01:01:07 pm »
I think there are several problems:

  • the reaction fire code is bugy (there was a patch for 2.4 that fixed the more important ones.)
  • A lot of people complain, that the RF worked in 2.2 and it is broken in 2.3. But they might just remember the performance of their elite troops at the end of 2.2 and expect the same behaviour of the rookies in the beginning of 2.3 (and the players with more experienced troops usualy report, that RF works in 2.3)
  • It is difficult to judge when RF "should work". (while an alien moves the player has to evaluate the wappon range, the TU the alien spent in view (of a soldier), the chances to hit a friend and the cances to hit a foe). So there might be some false bugreports.
    To get better data i added a line to log the results of the mockshot. And I must say the mockshot is executed a lot but most of the time the hits on a enemy are below the necessary 30.

you can improve the "visibility" of RF to the player if you remove the test with the mockshot. But then you will get the following bug reports  ;):
  • RF is broken, the soldiers shoot but they never hit a target
  • RF is broken, it wasts a lot of amo
  • RF is broken, the aliens cheat with RF and always hit (well once in a while an alien will hit a soldier)
  • ...

19
The point is?
It sounds like the only way to play with git is to commit everything that you do.
That sounds like saying that you have to allow anyone that wants to play with the source to commit changes to the development tree.

Unless I'm missing something, that's horrible.
Well SVN is a VCS and Git is a DVCS (distributed version control system)
As Mattn pointed out, the commits are on your mashine. Unles you push them to an other repository or someone fetches/pulls them from you, nobody else is affectet.
 

What is supposed to be git's benefit over svn?

The "distributed" part in DVCS gives the administrators of the repository additional freedom to tailor the way the repository works to the development process. That won't matter for you but it can relieve the main developers of a lot of work.

An other benefit that depends on the circumstances you work in is, that you have (a part of) the repository on your mashine and you don't have to be connected to the server to work with the repository. (view code, change branches ...)

And you can commit your changes to the local repository and use all the tools git provides for your code development.

Actualy the last one is the important one for me. And if you don't know the tools git provides for you should start to explore your new posibillities

20
But isn't that trading stashing for branching ?

I don't think so.
With stashing all your changes are in one place, you risk publishing unfinished code and one bugfix affecting an other one.
With branching you separate the changes for each task, with regular commits to the branche you reduce the risk of loosing your codechanges with awrong delete, edit or merge, you can use all the tools git provides for the code you develop (changehistory, bisect, ...) and you can even "ignore" the changes in the masterbranch (but if you wait to long mergin the changes back will be painful)

My point is that it's *overhead* compared to SVN. I don't want to manage branches, I want to squash bugs.
Yes it is overhead. All I can do is to urge you to try branching (and if it does not work for you at the moment to try it again, when you are comfortable with git) and then decide if it's worth it.

21
I have not worked with Git (yet)

But I hope to get rid of all my unversioned files and changes. These things should go into a local branch.

@duke: as Mattn proposed one local branch per bug seems appropriate.


22
Feature Requests / Re: Simple Suggestions for UI Controls
« on: August 05, 2010, 09:16:34 pm »
1. I changed "End turn" to "Quit turn" and used the E-key for "inventoryEquipment screen"
   So i have all my important shortcus on the left hand side. And don't loose TUs if I accidentally press "E"

23
Coding / Re: the AI discussion
« on: August 05, 2010, 09:12:01 pm »
I tried the new ai code. The aliens are  now thougher (at least with MOCK_ESTIMATION_ONLY).
Only the behaviour of the bloodspiders lacks. I think we need different GUETE-values for melee only units.

To compile the code with C::B on windows I had to remove some "error messages" from tracing.c

From the description of G_ClientShoot: @return qtrue if everything went ok (i.e. the shot(s) where fired ok), otherwise qfalse.
That means if  G_ClientShoot returns false you can't shoot that target. So this optimization of the AI_CalculateDamageMock reduces the time for the alien turn noticably (a similar break is in the mock shot of the reaction fire):

Code: [Select]
/**
 * @brief Estimate the damage of a shot (given firedef and shoottype) by making mock shots with G_ClientShoot. This function properly calculates for
 * gravity & splash-based weapons while being the most accurate. This comes at a heavy processor cost though and should only be used where really needed
 * @sa G_ClientShoot
 * @param[in] ent_player the player who's actor will try to shoot
 * @param[in] ent AI actor that is trying to shoot
 * @param[in] The target we're shooting at
 * @param[in] The shooting type we're using
 * @param[in] The firedefinition index we're using
 * @param[in] The firedef we're using. Redundant because of fdIdx and used only for minimizing sampled shots.
 * @param[out] the damage expected from the shot
 */
static int AI_CalculateDamageMock(const player_t * ent_player, edict_t * ent, const edict_t * check, shoot_types_t shootType, fireDefIndex_t fdIdx, const fireDef_t *fd)
{

int mockShotDmg = 0;
int j;
const int samples = 10; /** Try to make only this many G_ShootSingle shots in order to keep CPU usage to a minimum */

/* Sample 5 mock shots through the proper G_ClientShoot to see what kind of damage we can deal with our current settings */
/** @todo OPTIMIZE, we're really having a HUGE bite into the cpu over here */
/** @todo: is the z-align value of 0 correct? */
/** @todo: allow mock.allowSelf=1? */

/** If the firedef is already shooting many times, divide by fd->shots so we get about 10 samples only */
const int iterations = ((int)(samples/fd->shots))?samples/fd->shots:1;

/** Only aliens are pleased in damaging civilians */
const int shootCivilians = (ent->team == TEAM_ALIEN);
float civilianPenalty = 1.0f;

for (j = 0; j < iterations; j++) {
shot_mock_t mock;
memset(&mock, 0, sizeof(mock));
if (G_ClientShoot(ent_player, ent, check->pos, shootType, fdIdx, &mock, qfalse, 0)) {
/* Add the total damage expected */
mockShotDmg += mock.damage;
/* Remove the fraction of the damage that is done to us/our team and civilians (if we're not aliens)*/
mockShotDmg -= ((mock.friendCount + mock.self) / (mock.enemyCount ? mock.enemyCount : 1)) * mock.damage;
civilianPenalty = shootCivilians? 1 : mock.civilian/(mock.enemyCount? mock.enemyCount : 1.0f);
mockShotDmg *= civilianPenalty;
} else {
break;
}
}
mockShotDmg /= iterations;

return mockShotDmg;
}

24
Bugs prior to release 2.4 / Re: Reaction Fire - End Turn
« on: July 27, 2010, 05:33:48 pm »
I changed the reaction fire code to get rid of the change in the active team. That way the bug should disappear.
The patch is for trunk r31069.

Can somebody test the patch and report back?

25
Bugs prior to release 2.4 / Re: Reaction Fire - End Turn
« on: July 23, 2010, 04:48:42 pm »
I can think of several ways to remove the bug:

1. blocking the AI with an extra var for the active team, that gets only changed, when the server gets a "end round" message
2. blocking the AI, while the reaction fire changes the active team.
3. refactoring the shootingfunctions, to remove the dependency on level.activeTeam

If someone of the developers pionts out the desired (or a better) solution, i'll provide the necessary code.

26
it looks like this is a part of the Reactionfire - End Turn bug

27
got it today.

one addition to the reproduction:
the earth has to move while you reload.

When you focus on earth with some info tabs, then reload, it's like the engine is changing focus from default target to last clicked tab in the previous session at every game cycle...
Makes sense?
yes, it looks like the engine tries to move to 2 different positions at the same time, the movement target from the first game and the position saved in the savegame.

28
Bugs prior to release 2.4 / random map assembly not random
« on: July 17, 2010, 10:26:36 pm »
if the cvar "sv_threads" is not 0 (default since r03484) the layout of RMAs is always the same.

examples from ufoconsole.log:
Code: [Select]
2010/07/17 21:53:15 CM_LoadMap: "-africa/af_ +craft_ufo_scout +craft_drop_firebird +empty1 +empty2 +house1 +house2 +house3 +house4 +house5 +fence3 +misc1 +fence1 +misc1 +misc1" "0 -8 0 -24 -16 0 -24 8 0 16 8 0 16 0 0 -8 0 0 8 8 0 0 -16 0 -8 8 0 -16 8 0 -8 -8 0 -8 -16 0 16 -8 0 16 -16 0"
2010/07/17 21:53:42 CM_LoadMap: "-africa/af_ +craft_ufo_scout +craft_drop_firebird +empty1 +empty2 +house1 +house2 +house3 +house4 +house5 +fence3 +misc1 +fence1 +misc1 +misc1" "0 -8 0 -24 -16 0 -24 8 0 16 8 0 16 0 0 -8 0 0 8 8 0 0 -16 0 -8 8 0 -16 8 0 -8 -8 0 -8 -16 0 16 -8 0 16 -16 0"
2010/07/17 21:56:10 CM_LoadMap: "-africa/af_ +craft_ufo_scout +craft_drop_firebird +empty1 +empty2 +house1 +house2 +house3 +house4 +house5 +fence3 +misc1 +fence1 +misc1 +misc1" "0 -8 0 -24 -16 0 -24 8 0 16 8 0 16 0 0 -8 0 0 8 8 0 0 -16 0 -8 8 0 -16 8 0 -8 -8 0 -8 -16 0 16 -8 0 16 -16 0"

The reason for this behaviour is, that the threads, that create the maps always use the same sequence of random numbers due to a missing "srand" command.

I atached a quickfix for this problem.
It's a quickfix, because ...
  • it might break some testcode
  • with more than one thread the probability all threads use the same seed is high

 




29
Bugs prior to release 2.4 / Re: Reaction Fire - End Turn
« on: July 15, 2010, 06:58:32 pm »
poida is right the bug is related to reaction fire. But it also is thread related. So it's not easy to reproduce.

Here is a ufoconsole.log with additional entries to show what happened:
Code: [Select]
2010/07/15 16:32:42 (player 0) It's team 1's round
2010/07/15 16:32:42 dodon has taken control over team 1.
2010/07/15 16:32:53 [STATS] dodon (Lorraine Checa S-2) kills alien (Morgh Hs Nhs Oorgh) with Snap Shot of sniper_ammo
2010/07/15 16:32:53 RF1 change active team to 7 Time:347406 Thread:4076
2010/07/15 16:32:53 AI  active (7)              Time:347406 Thread:3788
2010/07/15 16:32:53 RF2 change active team to 1 Time:347422 Thread:4076
2010/07/15 16:33:23 RF1 change active team to 7 Time:377409 Thread:4076
2010/07/15 16:33:23 AI  active (7)              Time:377409 Thread:3788
2010/07/15 16:33:23 RF2 change active team to 1 Time:377425 Thread:4076
2010/07/15 16:33:29 RF1 change active team to 7 Time:383042 Thread:4076
2010/07/15 16:33:29 AI  active (7)              Time:383042 Thread:3788
2010/07/15 16:33:29 RF2 change active team to 1 Time:383042 Thread:4076
2010/07/15 16:33:29 RF1 change active team to 7 Time:383043 Thread:4076
...
2010/07/15 16:33:29 RF2 change active team to 1 Time:383045 Thread:4076
2010/07/15 16:33:33 RF1 change active team to 7 Time:387177 Thread:4076
2010/07/15 16:33:33 AI  active (7)              Time:387177 Thread:3788
2010/07/15 16:33:33 RF2 change active team to 1 Time:387177 Thread:4076
...
2010/07/15 16:33:33 RF2 change active team to 1 Time:387199 Thread:4076
2010/07/15 16:33:41 RF1 change active team to 7 Time:395414 Thread:4076
2010/07/15 16:33:41 AI  active (7)              Time:395414 Thread:3788
2010/07/15 16:33:41 RF2 change active team to 1 Time:395414 Thread:4076
2010/07/15 16:33:41 RF1 change active team to 7 Time:395415 Thread:4076
...
2010/07/15 16:33:41 RF2 change active team to 1 Time:395418 Thread:4076
2010/07/15 16:33:41 RF1 change active team to 7 Time:395492 Thread:3788
2010/07/15 16:33:42 RF2 change active team to 1 Time:395606 Thread:3788
2010/07/15 16:33:42 AI  active (7)              Time:395721 Thread:3788
2010/07/15 16:33:42 AI  active (7)              Time:395874 Thread:3788
2010/07/15 16:33:42 AI  active (7)              Time:396072 Thread:3788
2010/07/15 16:33:42 AI  active (7)              Time:396241 Thread:3788
2010/07/15 16:33:42 AI  active (7)              Time:396403 Thread:3788
2010/07/15 16:33:42 AI  active (0)              Time:396498 Thread:3788
2010/07/15 16:33:43 AI  active (0)              Time:396634 Thread:3788
2010/07/15 16:33:43 AI  active (0)              Time:396777 Thread:3788
2010/07/15 16:33:43 AI  active (0)              Time:396883 Thread:3788
2010/07/15 16:33:43 AI  active (0)              Time:396996 Thread:3788
2010/07/15 16:33:43 AI  active (0)              Time:397109 Thread:3788
2010/07/15 16:33:44 Team 1 ended round
2010/07/15 16:33:44 Team 7's round started!
2010/07/15 16:33:56 Team 7 ended round
2010/07/15 16:33:56 Team 0's round started!
2010/07/15 16:33:56 Team 0 ended round
2010/07/15 16:33:56 Team 1's round started!
2010/07/15 16:36:07 quit
The code is trunk r31015 and the entry
  RF1 is from g_reaction.c line 360,
  RF2 is from g_reaction.c line 363 and
  AI is from g_ai.c line 1044

What happens is this:
A soldier from team 0 moves and an alien can shoot with RF, so th game changes sides to execute the shot. At the same time the thread with the alien AI checks which side is active and starts the AI. At that point several things can happen such as the alien shoots at a target unrelated to RF or the AI tells the server to change the sides (back to the alien team).



 

30
Coding / Re: Assertions in dbuffer.c
« on: July 14, 2010, 02:44:16 pm »
I played 14 maps wit r31015 (with smal modifications of the GUI).
Here is what happened:

6x I reached the end of the mission (once a soldier refused to move during the mission til the end)
2x switch to geoscape during the mission (forgot to look at ufoconsole.log so no further information)
1x bufferunderflow in "dbuffer.c line 166" (ufoconsole.log was incomplete so no further information)
1x SIGSEGV in "dbuffer.c line 370" and "program closed it self" - no ufoconsole.log
1x SIGSEGV in "dbuffer.c line 279" and "program closed it self" - no ufoconsole.log
1x  switch to geoscape
        Looks like the "end of roundbug" while one of my soldiers was moving
        ufoconsole.log:
Code: [Select]
...
2010/07/13 10:42:29 Team 7 ended round
2010/07/13 10:42:29 Team 0's round started!
2010/07/13 10:42:29 Team 0 ended round
2010/07/13 10:42:29 Team 1's round started!
2010/07/13 10:44:07 Team 1 ended round
2010/07/13 10:44:07 Team 0's round started!
2010/07/13 10:44:10 ********************
2010/07/13 10:44:10 ERROR: LE_DoEndPathMove: Actor movement is out of sync: 129:119:0 should be 130:119:0 (step 7 of 7) (team 1)
2010/07/13 10:44:10 ********************
2010/07/13 10:44:10 Shutdown server: Server crashed.

1x "end of roundbug" and enemy round did not end:
        high processorusage 90% on one core, 20 % on the other (endles loop?)
1x "end of roundbug" and game froze:
     GUI was not redrawn
     0% processorusage

Pages: 1 [2] 3 4