Zehra | How do you get the shotID from a server shot, but not in the death event, nor the shot GUID? | 00:12 |
---|---|---|
Zehra | https://www.bzflag.org/documentation/developer/bzfs_api/events/bz_eshotfiredevent/ vs https://www.bzflag.org/documentation/developer/bzfs_api/events/bz_eservershotfiredevent/ | 00:18 |
Zehra | shotFiredEvent has shotID, serverShotFired has GUID. | 00:19 |
Zehra | In the playerDieEvent, it is possible to use the shotID to get the shotGUID, but I'd like to do the reverse of that. | 00:20 |
Zehra | And no, with what I'm doing, it is not viable/workable using the shotGUIDs, their records aren't useful enough for what I'm doing. | 00:21 |
Zehra | So is there a known way of getting the shotIDs from GUIDs? | 00:23 |
Zehra | Since the shotEnded event doesn't provide positional data, the GUIDs expire too early and I don't wish to excessively force "updates" to clients.(A rather ugly solution I'd much rather avoid.) | 00:25 |
*** Cobra_Fast is now away: vacant | 00:29 | |
*** Cobra_Fast is back | 00:29 | |
Zehra | And https://www.bzflag.org/documentation/developer/bzfs_api/events/bz_eallowservershotfiredevent/ doesn't provide the shotGUID or shotID. | 00:42 |
*** Cobra_Fast is now away: vacant | 00:48 | |
*** Cobra_Fast is back | 00:48 | |
BZNotify | bzflag: Zehra opened issue #332 "[BZFS API] Function for getting shotID from shotGUID or additional data in bz_eServerShotFiredEvent" (https://github.com/BZFlag-Dev/bzflag/issues/332) | 01:30 |
*** Zehra <Zehra!~Yukari@user/yukari> has quit IRC (Remote host closed the connection) | 02:36 | |
*** yuitimothy is back | 02:41 | |
*** mudfreak <mudfreak!~fx@user/mudfreak> has quit IRC (Server closed connection) | 02:48 | |
*** mudfreak <mudfreak!~fx@user/mudfreak> has joined #bzflag | 02:48 | |
*** Zehra <Zehra!~Yukari@user/yukari> has joined #bzflag | 03:04 | |
*** Cobra_Fast is now away: vacant | 03:04 | |
*** Cobra_Fast is back | 03:04 | |
allejo | I can't help but feel that shotID is a legacy thing that we wanted to move away from and that's why shotGUIDs were introduced. but other parts of the API probably won't have support for that since it's "newish" | 03:05 |
allejo | what info are you trying to get out of shots in general and when? | 03:06 |
Zehra | I'm using the API for firing 'fixed' shots. (Simply the vector for them is {0.0, 0.0, 0.0}.) | 03:07 |
Zehra | This gives them an "infinity" lifetime, until they roll over it seems. (256 shots and it seems the last one gets overwritten.) | 03:08 |
Zehra | What happens is that even though these shots are "visible"/"active" to players, the server returns the GUID of "0" as non-existent shots. | 03:09 |
Zehra | although this creates the issue of trying to use them as shots attributed to a flag | 03:10 |
Zehra | since no data can be accessed from them anymore | 03:10 |
Zehra | but I get on the death event the "shotID", with the killer being the server. | 03:10 |
Zehra | I can use that, but I can't get the shotID before the death event... which means for trying to attribute shots by the shotID, it doesn't work. | 03:11 |
allejo | there's no way around the killer being the server for a *server side* shot :p | 03:11 |
Zehra | nah, that's not what I'm looking for ;) | 03:12 |
Zehra | I'm looking to get the "shotID", so I can easily reassign the killer to a player. | 03:12 |
Zehra | except i can only get the shotGUID from the server shot and not the shotID :p | 03:13 |
Zehra | It could work with persisting the "GUIDs", but it doesn't make much sense. | 03:13 |
Zehra | and i can't look up the shotID from the GUID. | 03:14 |
Zehra | It's a weird use case for a glitch, but I suppose others may use it for more complex features. | 03:15 |
Zehra | we don't have custom shot lifetimes, which does make it a bit difficult for another work-around. | 03:17 |
allejo | are you trying to reassign shot owners then? | 03:22 |
Zehra | yes | 03:22 |
allejo | reassigning owners of shots causes all sorts of problems iirc. the way to handle that is to reassign killerID in the PlayerDieEvent | 03:25 |
allejo | if bzfs has the limit of 256 shots on the field at a given time, and it "forgets"/erases the oldest shot to prevent overflowing, you'd probably have to keep track of that information yourself somehow in your plugin | 03:27 |
allejo | or modify bzfs to be able to handle more shots, though I'm not sure what repurcussions there would be for that edit, if any | 03:27 |
allejo | these are shots that won't move, right? could you keep a map of the locations where these shots exist and if a player dies at that location from a server side shot, then bam. however, that would conflict with other plugins that use server side shots | 03:29 |
allejo | do shotGUIDs survive longer than shotIDs? | 03:31 |
Zehra | shotGUIDs last much shorter than shotIDs from testing. | 03:38 |
Zehra | and my bad, misunderstood by reassigning shot owners. (I'm using the playerDieEvent for this.) | 03:38 |
Zehra | they appear to easily last over a minute or more, shotGUIDs last perhaps a several seconds at most, but not much longer | 03:40 |
*** Cobra_Fast is now away: vacant | 03:41 | |
*** Cobra_Fast is back | 03:41 | |
allejo | I'll have to look into shotGUIDs again to see how/where they're being tracked/stored. it'd make sense to improve on that | 03:43 |
Zehra | perhaps, but also it seems that it's mainly somewhat of an oddity with the client, compare to the server | 03:44 |
Zehra | looking into tracking player position and comparing death position vs shot position, i did consider it quite a bit, but reliability issues were my concern | 03:45 |
Zehra | especially since in essence, these shots aren't tracked at all | 03:46 |
Zehra | (Although I do usually over-engineer the plug-ins I write.) | 03:46 |
*** yuitimothy is now away: I've done some soul-searching and I still can't find it. | 03:49 | |
*** _I_Died_Once <_I_Died_Once!~I_Died_On@c-73-184-170-223.hsd1.ga.comcast.net> has quit IRC (Ping timeout: 246 seconds) | 03:50 | |
*** yuitimothy is back | 03:51 | |
Agatha | Sidenote, but 256 seems pretty small to me. | 03:51 |
Zehra | (256 + (20 * 200)) | 03:51 |
Zehra | Agatha, it used to be 30 shots before. :O | 03:52 |
Zehra | not to mention, a single shot knocks the tank out, and with shield it takes only 2. | 03:52 |
Zehra | In theory it's way more, but we just don't quite use it all. | 03:53 |
Zehra | In "WorldWeapons.h", we have: #define _MAX_WORLD_SHOTS 255 | 03:56 |
Agatha | A bit weird there's even a limit at all, you ask me. Maybe as a security measure? Could be a million on today's hardware, at least for server (client too, but not the network between them). | 03:57 |
Zehra | Too many shots lag the players, known factor, also the way the hitscan is done is very different too. | 03:58 |
Zehra | a.k.a. most FPS games are virtually instant hit, so easy to calculate where it hits, next calculation..etc | 03:59 |
*** Zehra <Zehra!~Yukari@user/yukari> has quit IRC (Quit: Quit.) | 04:12 | |
*** FastLizard4 is back | 04:37 | |
*** FastLizard4 is now away: AWAY from keyboard | 05:15 | |
*** yuitimothy is now away: I've done some soul-searching and I still can't find it. | 05:37 | |
*** yuitimothy is back | 05:37 | |
*** yuitimothy is now away: I've done some soul-searching and I still can't find it. | 05:51 | |
*** yuitimothy is back | 05:57 | |
*** Juest <Juest!~Juest@user/Juest> has quit IRC (Ping timeout: 245 seconds) | 08:00 | |
*** Juest <Juest!~Juest@user/Juest> has joined #bzflag | 08:03 | |
*** yuitimothy is now away: I've done some soul-searching and I still can't find it. | 08:05 | |
*** yuitimothy is back | 08:05 | |
*** Sgeo <Sgeo!~Sgeo@user/sgeo> has quit IRC (Read error: Connection reset by peer) | 09:29 | |
*** yuitimothy is now away: I've done some soul-searching and I still can't find it. | 10:55 | |
blast007 | Now I kinda want to see a two-team CTF map with 128 shockwave world weapons on each side that trigger on flag capture :) | 11:19 |
*** yuitimothy is back | 11:30 | |
*** I_Died_Once <I_Died_Once!~I_Died_On@c-73-184-170-223.hsd1.ga.comcast.net> has joined #bzflag | 11:31 | |
*** yuitimothy is now away: I've done some soul-searching and I still can't find it. | 11:48 | |
*** yuitimothy is back | 11:49 | |
*** yuitimothy is now away: I've done some soul-searching and I still can't find it. | 12:28 | |
*** yuitimothy is back | 12:29 | |
*** yuitimothy is now away: I've done some soul-searching and I still can't find it. | 13:05 | |
*** FastLizard4 is back | 13:30 | |
*** yuitimothy is back | 13:50 | |
*** FastLizard4 is now away: AWAY from keyboard | 14:10 | |
*** tupone <tupone!~tupone@gentoo/developer/tupone> has quit IRC (Server closed connection) | 14:20 | |
*** tupone <tupone!~tupone@gentoo/developer/tupone> has joined #bzflag | 14:20 | |
*** ashvala <ashvala!~quassel@104.131.125.108> has quit IRC (Server closed connection) | 14:23 | |
*** ashvala <ashvala!~quassel@104.131.125.108> has joined #bzflag | 14:23 | |
*** FastLizard4 is now away: GONE - Screen Detached and Disconnected from IRC (I'm probably asleep, at work, or doing something in real life) | 14:29 | |
*** yuitimothy is now away: I've done some soul-searching and I still can't find it. | 15:15 | |
*** Sgeo <Sgeo!~Sgeo@user/sgeo> has joined #bzflag | 16:01 | |
*** yuitimothy is back | 16:13 | |
Agatha | Map idea: enormous maze with proximity shockwave mines spread throughout. You have to solve the maze, and memorize where the shockwaves are, even if they're like an hour into the maze. No radar, of course. 10/10 would play | 16:24 |
blast007 | "Turn left at the penguin with the bowtie, go straight past the man wearing a red shirt, ..." | 16:27 |
Agatha | oh no blast, you see it will be a maze of twisty passages, all alike. And dark, of course. | 16:46 |
Agatha | Come to think of it, wonder if @Grue would be up for it. | 16:46 |
blast007 | black walls, with nolightning, noshadows, noradar | 16:59 |
allejo | Agatha: I made a script to generate mazes a few years back. it turned out to be lackluster because you can always just follow a wall and it'll eventually get you out | 17:25 |
Agatha | Sounds like you need to explore disconnected components in your maze generation algorithm. | 17:25 |
allejo | ooo i hadn't thought of that | 17:28 |
allejo | i was reading up on generating labyrinths recently and was going to write a script on that | 17:28 |
blast007 | allejo: A maze is no match for Mashle | 17:34 |
allejo | hahahahah | 17:34 |
*** yuitimothy is now away: I've done some soul-searching and I still can't find it. | 18:01 | |
Juest | wow! | 18:17 |
*** FastLizard4 is back | 19:34 | |
*** FastLizard4 is now away: AWAY from keyboard | 19:50 | |
*** FastLizard4 is back | 20:44 | |
*** yuitimothy is back | 21:47 | |
*** yuitimothy is now away: I've done some soul-searching and I still can't find it. | 22:12 | |
*** yuitimothy is back | 22:13 | |
*** Flash_ <Flash_!~Flash@user/flash> has joined #bzflag | 22:19 | |
*** FastLizard4 is now away: AWAY from keyboard | 22:20 | |
*** Flash <Flash!~Flash@user/flash> has quit IRC (Ping timeout: 258 seconds) | 22:22 | |
*** yuitimothy is now away: I've done some soul-searching and I still can't find it. | 22:25 | |
*** yuitimothy is back | 22:26 | |
*** Flash_ is now known as Flash | 22:55 | |
SpringTank | then we have to program a maze solving mouse algo for autopilot | 22:57 |
*** macsforme <macsforme!~macsforme@rahab.fairserve.net> has quit IRC (Server closed connection) | 23:20 | |
*** macsforme <macsforme!~macsforme@rahab.fairserve.net> has joined #bzflag | 23:20 | |
*** ChanServ sets mode: +v macsforme | 23:20 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!