zoot Posted April 6, 2013 Author Report Share Posted April 6, 2013 If you just push once you've removed it from the C++ side, I'll do some other stuff for a while. We should still fix this:Finally, this implementation suppresses repeated attack signals from the same location, so as to not inundate the player with warnings from the same battle, but not attack signals from the same unit. If the unit is moving (fleeing), it's conceivable that the player will get multiple warnings for the same skirmish.Either you can have a crack at it, or I will do it when I get back. Quote Link to comment Share on other sites More sharing options...
zoot Posted April 6, 2013 Author Report Share Posted April 6, 2013 Also, I've been thinking that we should probably suppress the sound if the camera is already trained on the location where the attack is happening. This would require an engine function exposed to the GUI context that returns the current camera position. But if that is too difficult to implement, we'll just wait and see what others say. Quote Link to comment Share on other sites More sharing options...
madmax Posted April 6, 2013 Report Share Posted April 6, 2013 ok sure. https://github.com/laxmax/0ad/commit/549218945ccb0f8dc4529f36171c3432569dedf8 Quote Link to comment Share on other sites More sharing options...
madmax Posted April 6, 2013 Report Share Posted April 6, 2013 (edited) Well AoE doesnt, though the sound does start after about 1 or 2 seconds. I think if the player is maneuvering close to the enemy he may want to notified by sound immediately if any unit it attacked. Especially if the number of units is large and the camera view is large. The minimap's little blinking dot may not immediately attract attention. Edited April 6, 2013 by madmax Quote Link to comment Share on other sites More sharing options...
zoot Posted April 6, 2013 Author Report Share Posted April 6, 2013 Does Age of Empires suppress the sound ?I don't recall. The sound just felt superfluous to me when you also have tons of attack sounds at the same time. Quote Link to comment Share on other sites More sharing options...
madmax Posted April 6, 2013 Report Share Posted April 6, 2013 (edited) Ah yeah, the weapon sounds you mean. Hmm. Well the position of the camera is gettable I guess. Somewhere in CGameView there would probably be a function. I am not sure in terms of what it will return it though. Probably 3D co-ordinates which will need to be converted to the co-ordinates being used by the sim JS code.Well lets see what others say about attack notification suppression in camera view.I mean there are cases where its useful, like if the attack is happening on an entity at the edge of the map by say an archer while there are your own archers also firing at something in the middle of the screen. The player may not notice as the attacking weapon sound and the player's weapons sounds are the same...arrows whooshing through the air. Edited April 6, 2013 by madmax Quote Link to comment Share on other sites More sharing options...
madmax Posted April 6, 2013 Report Share Posted April 6, 2013 (edited) So how about sending this code for review. If its in the main code then probably people can try it more easily. Edited April 6, 2013 by madmax Quote Link to comment Share on other sites More sharing options...
zoot Posted April 6, 2013 Author Report Share Posted April 6, 2013 Can't hurt, I guess: http://trac.wildfiregames.com/ticket/1719 Quote Link to comment Share on other sites More sharing options...
madmax Posted April 6, 2013 Report Share Posted April 6, 2013 (edited) ok, I ll make a diff with Tortoise SVN and attach it to the ticket then Edited April 6, 2013 by madmax Quote Link to comment Share on other sites More sharing options...
feneur Posted April 6, 2013 Report Share Posted April 6, 2013 Really nice to see this real time collaboration 1 Quote Link to comment Share on other sites More sharing options...
madmax Posted April 6, 2013 Report Share Posted April 6, 2013 (edited) Code patch added for review for #1719Really nice to see this real time collaboration Yep and now on to the next beginner must have feature !! Edited April 6, 2013 by madmax Quote Link to comment Share on other sites More sharing options...
idanwin Posted April 6, 2013 Report Share Posted April 6, 2013 You would only have the notification sound once, at the start of the battle, anyway, so I don't think that will be too irritating. Quote Link to comment Share on other sites More sharing options...
zoot Posted April 10, 2013 Author Report Share Posted April 10, 2013 (edited) Finally, this implementation suppresses repeated attack signals from the same location, so as to not inundate the player with warnings from the same battle, but not attack signals from the same unit. If the unit is moving (fleeing), it's conceivable that the player will get multiple warnings for the same skirmish. This should be fixed.I've fixed the above thusly: https://github.com/z...254adced42f6877If you agree with the change you can either generate a new patch against SVN and attach that on the ticket, or simply post this diff there: https://github.com/z...tification.diffEdit: Actually, this solution has the unintended consequence that it stops the pinging after a while, even if a unit continues to be hit. I'll need to think about how to fix that and post another diff. Edited April 10, 2013 by zoot Quote Link to comment Share on other sites More sharing options...
zoot Posted April 10, 2013 Author Report Share Posted April 10, 2013 Edit: Actually, this solution has the unintended consequence that it stops the pinging after a while, even if a unit continues to be hit. I'll need to think about how to fix that and post another diff.Fixed the above like this: https://github.com/zootzoot/0ad/commit/82cbc564fbb7c172ba302138fb51365c880359f4Latest diff: https://github.com/zootzoot/0ad/compare/attack-notification.diff Quote Link to comment Share on other sites More sharing options...
madmax Posted April 11, 2013 Report Share Posted April 11, 2013 Looks good. I ll check and put up that diff. Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted May 29, 2013 Report Share Posted May 29, 2013 The patch was reviewed: http://trac.wildfiregames.com/ticket/1719#comment:7 It looks pretty good, just those issues to sort through, it will be great to have in the game Quote Link to comment Share on other sites More sharing options...
madmax Posted July 5, 2013 Report Share Posted July 5, 2013 (edited) Working on this one again today. Just updating my code from zoot's repo.ok, right away I have messed up something. So for updating the code I switched to the attack-notification branch :$ git checkout attack-notification$ git pull zootzoot attack-notification$ git pull k776-master masterabhi@ABHI-PC /f/Code/0ad/0ad (attack-notification|MERGING)$ git pull k776-master masterThe I realized I probably don't need to update from master as it will erase all changes from zootzoot. I knew it the minute I saw that curious MERGING thing at the branch name.Now if I do $ git pull zootzoot attack-notificationI get an error :........M source/third_party/mongoose/mongoose.cppM source/tools/dist/build.shPull is not possible because you have unmerged files.Please, fix them up in the work tree, and then use 'git add/rm <file>'as appropriate to mark resolution, or use 'git commit -a'.How do I fix this now I want to get back to the current state of the attack-notification branch which has pulled in all zoot's changes. Edited July 5, 2013 by madmax Quote Link to comment Share on other sites More sharing options...
madmax Posted July 5, 2013 Report Share Posted July 5, 2013 (edited) ok, I did a git reset :abhi@ABHI-PC /f/Code/0ad/0ad (attack-notification)$ git reset.......abhi@ABHI-PC /f/Code/0ad/0ad (attack-notification)$ git pull zootzoot attack-notificationFrom https://github.com/zootzoot/0ad * branch attack-notification -> FETCH_HEADAlready up-to-date.abhi@ABHI-PC /f/Code/0ad/0ad (attack-notification)$So all seems good now. I ll check if I have zoot's latest changes. Edited July 5, 2013 by madmax Quote Link to comment Share on other sites More sharing options...
madmax Posted July 5, 2013 Report Share Posted July 5, 2013 (edited) Hmm, that reset doesnt seem to have fixed it. The git diff is showing up a lot of changes that I never made. Maybe some other command is needed.ok did a git checkout .Phew, got to be more careful with this. Edited July 5, 2013 by madmax Quote Link to comment Share on other sites More sharing options...
madmax Posted July 5, 2013 Report Share Posted July 5, 2013 Hmmm, I did a clean build, But I get a crash when I start the game, after the setup screen :Much to our regret we must report the program has encountered an error.Please let us know at http://trac.wildfiregames.com/ and attach the crashlog.txt and crashlog.dmp files.Details: unhandled exception (Access violation reading 0x00000046)Location: unknown:0 (?)Call stack:C7660C48errno = 0 (No error reported here)OS error = 126 (The specified module could not be found.) Quote Link to comment Share on other sites More sharing options...
madmax Posted July 5, 2013 Report Share Posted July 5, 2013 Hmm it seems the -quickstart option s causing the crash. If I start the game like this it works :pyrogenesis -autostart="Isthmus" -autostart-ai=1:qbot-wc -autostart-ai=2:qbot-wc Quote Link to comment Share on other sites More sharing options...
zoot Posted July 5, 2013 Author Report Share Posted July 5, 2013 Are you using an NVIDIA Optimus card? Others are experiencing similar errors:http://www.wildfiregames.com/forum/index.php?showtopic=17444 Quote Link to comment Share on other sites More sharing options...
madmax Posted July 5, 2013 Report Share Posted July 5, 2013 (edited) Yes, I have nvidia optimus. But it used to work before. And why this option specifically. Also the game does start without -quickstart, so the sound comes. Edited July 5, 2013 by madmax Quote Link to comment Share on other sites More sharing options...
k776 Posted July 5, 2013 Report Share Posted July 5, 2013 -quickstart disables the sound engine. There was a bug for a short while that caused this to segfault, but has since been fixed. It's possible that zoots code was added after the bug was introduced, but before it was fixed. Quote Link to comment Share on other sites More sharing options...
madmax Posted July 5, 2013 Report Share Posted July 5, 2013 ok, yeah I am updating from bitbucket so its probably not yet updated. Meanwhile I have finished the changes and will send out a patch tomorrow for this long standing ticket. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.