zoot Posted February 28, 2013 Report Share Posted February 28, 2013 (edited) If anyone is interested in working on this, I've cleaned up and slightly expanded upon quantumstate's prototype and uploaded it here:https://github.com/z...ck-notificationCurrently, it correctly presents a textual warning to the player who has come under attack. This should be replaced with an aural warning. It plays an aural warning to the player who has come under attack.However, the minimap 'ping' notification has yet to be implemented. This must be done in C++, I believe. A function for acquiring a list of ongoing attacks against the current player is already in place. The minimap ping has been implemented by madmax.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. Edited May 2, 2013 by zoot Quote Link to comment Share on other sites More sharing options...
zoot Posted March 8, 2013 Author Report Share Posted March 8, 2013 Currently, it correctly presents a textual warning to the player who has come under attack. This should be replaced with an aural warning.As of this commit, it now plays a dog bark when any infantry units come under attack Any help with the minimap implementation would still be appreciated. Quote Link to comment Share on other sites More sharing options...
Pureon Posted March 8, 2013 Report Share Posted March 8, 2013 As of this commit, it now plays a dog bark when any infantry units come under attack Any help with the minimap implementation would still be appreciated.Do we need a new sound effect for this? I assume it won't be committed for Alpha 13? Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted March 8, 2013 Report Share Posted March 8, 2013 Do we need a new sound effect for this? I assume it won't be committed for Alpha 13?Definitely. Maybe get Omri on it. He could give us a nice trumpet or horn signal. Quote Link to comment Share on other sites More sharing options...
zoot Posted March 8, 2013 Author Report Share Posted March 8, 2013 Do we need a new sound effect for this? I assume it won't be committed for Alpha 13It most likely won't, since the whole minimap 'ping' thing still needs to be done. (And yeah, the bark is just a placeholder.) Quote Link to comment Share on other sites More sharing options...
Pureon Posted March 8, 2013 Report Share Posted March 8, 2013 Definitely. Maybe get Omri on it. He could give us a nice trumpet or horn blast.Yeah, sounds good.Won't be ready for Alpha 13 though Quote Link to comment Share on other sites More sharing options...
wraitii Posted March 8, 2013 Report Share Posted March 8, 2013 Note that there is already such a sound in the data, in audio/interface/alarm. Quote Link to comment Share on other sites More sharing options...
Pureon Posted March 8, 2013 Report Share Posted March 8, 2013 Note that there is already such a sound in the data, in audio/interface/alarm.You're right, I think it's alarm_attackplayer.xml Quote Link to comment Share on other sites More sharing options...
madmax Posted April 1, 2013 Report Share Posted April 1, 2013 So the only change needed to Zoot's commit (https://github.com/zootzoot/0ad/commit/e0981ca4bec404ccc1cdbe5838db02ee81ea9088) is in binaries/data/mods/public/simulation/templates/template_unit_infantry.xml I guess ?+ <attacked> audio/interface/alarm/alarm_attackplayer.xml</attacked> Quote Link to comment Share on other sites More sharing options...
zoot Posted April 1, 2013 Author Report Share Posted April 1, 2013 Indeed, fixed as of the latest push: https://github.com/zootzoot/0ad/compare/attack-notification Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted April 2, 2013 Report Share Posted April 2, 2013 Note that there is already such a sound in the data, in audio/interface/alarm.There's also an "upgrade complete" alarm there too (alarmupgradearmory_1). Definitely need that implemented. Quote Link to comment Share on other sites More sharing options...
madmax Posted April 2, 2013 Report Share Posted April 2, 2013 (edited) ok, so #1719 in the Simple Tickets for beginners is closed by zoot then I guess : http://trac.wildfire...&order=priorityI ll try to figure out the "upgrade complete" thing. Edited April 2, 2013 by madmax Quote Link to comment Share on other sites More sharing options...
zoot Posted April 2, 2013 Author Report Share Posted April 2, 2013 As stated above, the minimap notification has yet to be implemented, so the ticket is not done yet. Right now, it just plays a notification sound, but you have no indication where the attack is occurring (unless the camera is already pointed there).Also, the sound needs to be added to all relevant unit templates. For now, it has only been added to the infantry unit template. Quote Link to comment Share on other sites More sharing options...
Shield Bearer Posted April 2, 2013 Report Share Posted April 2, 2013 As stated above, the minimap notification has yet to be implemented, so the ticket is not done yet. Right now, it just plays a notification sound, but you have no indication where the attack is occurring (unless the camera is already pointed there).Also, the sound needs to be added to all relevant unit templates. For now, it has only been added to the infantry unit template.So we can have different sounds for different units? Say a special sound for heroes being attacked? Quote Link to comment Share on other sites More sharing options...
zoot Posted April 2, 2013 Author Report Share Posted April 2, 2013 So we can have different sounds for different units? Say a special sound for heroes being attacked?Yes. 1 Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted April 2, 2013 Report Share Posted April 2, 2013 So we can have different sounds for different units? Say a special sound for heroes being attacked?Yes.A different sound for each hero, even. 1 Quote Link to comment Share on other sites More sharing options...
madmax Posted April 2, 2013 Report Share Posted April 2, 2013 ok, so noobish questions now....I have just updated my SVN code and I do not see zoot's changes in template_unit_infantry.xmlAre the github and SVN code bases kept in sync ? Should I fork from github for future changes or stick with SVN ? Where is the action currently, so to speak Quote Link to comment Share on other sites More sharing options...
zoot Posted April 2, 2013 Author Report Share Posted April 2, 2013 (edited) Relevant questions. My changes reside in a branch on Github. You can think of this as a codebase existing in parallel to Wildfire Games' main 0ad mirror on Github.If anyone wants to continue work on attack notification, they can fork the code from my branch and begin adding their changes to it. When they are done, they must then merge their changes into the main repository.The main repository for now is still SVN, so you should stick with that if you want to follow the mainline of development. The main 0ad mirror on Github (0ad/0ad) is updated from SVN every few days by k776. My repository (zootzoot/0ad), where the attack-notification branch resides, is only updated when I make any changes. Edited April 2, 2013 by zoot Quote Link to comment Share on other sites More sharing options...
madmax Posted April 2, 2013 Report Share Posted April 2, 2013 (edited) When they are done, they must then merge their changes into the main repository.You mean merge into SVN when done since the 'main repo' is SVN ?How will you transfer your changes to SVN from github ? Via .diff files ? Edited April 2, 2013 by madmax Quote Link to comment Share on other sites More sharing options...
zoot Posted April 2, 2013 Author Report Share Posted April 2, 2013 (edited) You mean merge into SVN when done since the 'main repo' is SVN ?Indeed.How will you transfer your changes to SVN from github ? Via .diff files ?Yes, I usually just post a link on Trac to a .diff generated by Github, like so: https://github.com/z...tification.diff Edited April 2, 2013 by zoot Quote Link to comment Share on other sites More sharing options...
madmax Posted April 2, 2013 Report Share Posted April 2, 2013 (edited) Ok thanks ! So I just forked your repository. Now I am cloning it into my local machine using the Git Bash console. It seems to be cloning the 0ad master branch and not your branch specifically.Also, I can switch branches in the github web interface. I could not see 0ad / binaries / data / mods / public / simulation / components / AttackDetection.jsSo I switched the branch in the web interface to attack-notification and now I do see it in the github website.But I guess changing branches in the web interface won't automatically download the files specific to the attack-notification branch to my system ? I guess I need to make the active branch in my local machine as attack-notification ? Only then the files specific to this branch will be added to my local copy ?By default the master branch will probably be my active branch in my local copy. Edited April 2, 2013 by madmax Quote Link to comment Share on other sites More sharing options...
zoot Posted April 2, 2013 Author Report Share Posted April 2, 2013 (edited) Yes, the web interface is only a representation of what is on Github. To use the attack-notification branch on your local machine you have to "check it out".If you have already cloned my repo to your own machine, you should be able to do:git checkout attack-notificationIf you get a message reading "Switched to branch 'attack-notification'", you should then be able to find AttackDetection.js in the relevant subdirectory. Edited April 2, 2013 by zoot Quote Link to comment Share on other sites More sharing options...
madmax Posted April 2, 2013 Report Share Posted April 2, 2013 (edited) ok and once I do switch to attack-notification branch, then any commits to this branch that I do, wont affect you ? I guess it will commit to only my copy of the 0ad repository ? Edited April 2, 2013 by madmax Quote Link to comment Share on other sites More sharing options...
zoot Posted April 2, 2013 Author Report Share Posted April 2, 2013 Indeed, they will only commit to your local repository. Quote Link to comment Share on other sites More sharing options...
madmax Posted April 2, 2013 Report Share Posted April 2, 2013 (edited) So now the entire 3 or 4 gb repo is being cloned by GitBash into my local drive. I am wondering if it would be faster for me to see the effect of your changes, if I make a diff of the attack-notification branch from github and apply this diff to my SVN copy(which I already have). Then compile and run the game.Perhaps I should save https://github.com/z...tification.diff to a diff file and try to apply it to SVN. Does this diff contain all your changes ?If the build fails, I can always revert to the server copy in SVN. Edited April 2, 2013 by madmax 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.