Pages: 1 ... 3 4 [5] 6 7
  Print  
Author Topic: The server-side demos thread, rebooted!  (Read 110600 times)
GrosBedo
Member


Cakes 20
Posts: 710


« Reply #100 on: February 29, 2012, 09:57:10 PM »

Ok this is confirmed, my problem really comes from gentity_t->health field. I debugged by changing in the gamecode's g_active.c:

Code:
ent->client->ps.stats[STAT_HEALTH] = ent->health; // FIXME: get rid of ent->health...
to:
Code:
ent->health = ent->client->ps.stats[STAT_HEALTH]; // FIXME: get rid of ent->health...

And now it works. But it's not a solution for me because it needs a gamecode edit.

What is interesting to note is that health is the only field that is not totally managed in stats[], and so is redundant. Proof is the FIXME message above.

Okay, I think memcpy will be the way to go.

/EDIT: AH also I think it wasn't remove to allow for special entities with health, such as obelisks or destructable items.
Logged
Neon_Knight
In the year 3000
***

Cakes 49
Posts: 3775


Trickster God.


« Reply #101 on: February 29, 2012, 10:06:17 PM »

How many work is needed to get this done?
Logged


"Detailed" is nice, but if it gets in the way of clarity, it ceases being a nice addition and becomes a problem. - TVT
Want to contribute? Read this.
GrosBedo
Member


Cakes 20
Posts: 710


« Reply #102 on: February 29, 2012, 10:21:47 PM »

How many work is needed to get this done?

If you mean the whole server-side demos functionnality, I can tell you now: a lot. And that probably explains why noone bothered to do it before.
Logged
Neon_Knight
In the year 3000
***

Cakes 49
Posts: 3775


Trickster God.


« Reply #103 on: February 29, 2012, 10:27:13 PM »

Hmmm... basically it needs many months of work?
Logged


"Detailed" is nice, but if it gets in the way of clarity, it ceases being a nice addition and becomes a problem. - TVT
Want to contribute? Read this.
GrosBedo
Member


Cakes 20
Posts: 710


« Reply #104 on: February 29, 2012, 11:20:17 PM »

No it already works. And pretty well. I'm just fixing one last thing and after I'll polish the first public release.
Logged
GrosBedo
Member


Cakes 20
Posts: 710


« Reply #105 on: March 01, 2012, 01:47:12 AM »

OK, I give up on fixing the health bug engine-side. I tried to declare the entire gentity_t structure and make a getter function, but that didn't work. It seems sharedEntity_t can't be treated as a gentity_t, and I can see no other way. I'll just make the simple gamecode patch.

/EDIT: no in fact I can't even code it inside the gamecode in an elegant way because there's no client-side var that can tell if the server is replaying a demo or not. So first one should create such a variable (eg: g_demoPlayback, there's already a sv_demoState) in the server's gamecode.
« Last Edit: March 01, 2012, 02:14:54 AM by GrosBedo » Logged
GrosBedo
Member


Cakes 20
Posts: 710


« Reply #106 on: March 01, 2012, 06:13:10 AM »

Polishing, polishing...

Good news about mods, the ExcessivePlus bug that kept restarting the map is from the sv patch, it seems it keeps restarting the map because some parameters don't fit in (it restarts the map to automatically adjust the needed values). This is a good news because it can be fixed, and it will.
Logged
GrosBedo
Member


Cakes 20
Posts: 710


« Reply #107 on: March 01, 2012, 02:35:30 PM »

Still polishing, now gametype and mod are stored in the demo, loaded if available and automatically set back to their original values at the end of the demo playback.

Also I fixed the bot's camera playback. I was quite lucky on this one, I was looking for something very different. I just removed the bit SVF_BOT from the bots players, and it seems that then it forces the engine to not consider them as bots but as normal democlients and so their standard fields are accessed (viewangles?) rather than bot's special fields (such as "eyes"...).

And by the way I'm fixing a lot of other small things such as adding the sv_hostname in the demo filenames, along with a filename cleaner to avoid illegal characters, and so on...
Logged
GrosBedo
Member


Cakes 20
Posts: 710


« Reply #108 on: March 02, 2012, 07:23:59 PM »

Still polishing, autorecording now works perfectly, and mods support also (only tested on ExcessivePlus, but it works great).
Logged
GrosBedo
Member


Cakes 20
Posts: 710


« Reply #109 on: March 03, 2012, 04:14:50 PM »

Polishing, polishing and polishing... Starting to look quite good and pretty stable, I'm quite pleased. Demos recorded on ExcessivePlus are perfectly replayed.
Logged
GrosBedo
Member


Cakes 20
Posts: 710


« Reply #110 on: March 03, 2012, 06:43:10 PM »

Added some detailed infos in demos files, this should help in keeping an history, or to dig old demos (always hard to keep a track of when and where it was done), and could also help to debug bugs:

Code:
DEMO: Details of svdemos/demotest32.svdm_71 recorded 2012-03-04 01:37:26 timezone Europe de lӏuest (UTC timezone: 2012-03-04 00:37:26 W09) on server " ALocalTest": sv_fps: 25 start_time: 31040 clients: 12 fs_game: excessiveplus g_gametype: 4 map: oasago2 timelimit: 20 fraglimit: 0 capturelimit: 8
Logged
GrosBedo
Member


Cakes 20
Posts: 710


« Reply #111 on: March 04, 2012, 10:04:37 AM »

Polishing a lot, fixixng a lot, cleaning a lot. Every main functionality has now its very own function (instead of a big if or switch) along with detailed comments, and I hope this will also avoid bugs in the future (by avoiding having too many vars declared for a single function).
Logged
Gig
In the year 3000
***

Cakes 45
Posts: 4386


WWW
« Reply #112 on: March 04, 2012, 05:08:07 PM »

Apart Excessive Plus, it would be good to test it also with some other mod, for both OA (e.g. AfterShock) and Quake3 (e.g. BazookaQ3, AlternateFire... etc.)
Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
GrosBedo
Member


Cakes 20
Posts: 710


« Reply #113 on: March 04, 2012, 07:30:51 PM »

Apart Excessive Plus, it would be good to test it also with some other mod, for both OA (e.g. AfterShock) and Quake3 (e.g. BazookaQ3, AlternateFire... etc.)

Of course, I'm just taking E+ as the basis for my mod support development. If it works for E+, it should basically work for any other mod, I'll just do some adjustments if needed.
Logged
GrosBedo
Member


Cakes 20
Posts: 710


« Reply #114 on: March 04, 2012, 08:35:16 PM »

PRE-RELEASE: I don't have the time to finish right now completely the patch, so here is a pre-release. This version is very close to the final release, it's pretty stable.

GBO server-side demos patch v0.8.10
http://zsensible.free.fr/openarena/gbopatch/openarena-engine-source-0.8.x-28-amanieu-sv-serversidedemo_v0.8.10-moved-functions-fixed.zip

There are already compiled win32 64bits binaries inside. For other platforms, you have to compile by yourself as I don't have a linux box close to me.

If you try it and feedback (which would make me very glad and help me a lot to fix issues!), please remember to always set sv_democlients to 0 prior to recording or replaying a demo (demo_play will automatically set sv_democlients but sometimes it does not reset it, particularly when there's a crash), and please remember that it's normal that the player's health is not updated in the HUD. These issues should be fixed in the final release.

Also, if you encounter a crash or a bug, please toggle "developer" cvar to 1, this will enable a lot of demo debugging infos.
« Last Edit: March 05, 2012, 09:24:59 AM by GrosBedo » Logged
GrosBedo
Member


Cakes 20
Posts: 710


« Reply #115 on: March 07, 2012, 10:48:13 AM »

UPDATE: Here is another pre-release, with these changes:

- Fully automatic management of sv_democlients, which is now read-only.
- /timescale supported (weird behaviour for values < 0.1 to be fixed).
- /cl_freezeDemo supported

GBO server-side demos patch (sourcecode) v0.8.15:
http://zsensible.free.fr/openarena/gbopatch/openarena-engine-source-0.8.x-28-amanieu-sv-serversidedemo_v0.8.15-democlients-autoset-fixed.zip

As previously said, if you try it and encounter a bug, please set /developer 1, and attach the bugged demo.
Logged
GrosBedo
Member


Cakes 20
Posts: 710


« Reply #116 on: March 07, 2012, 03:11:18 PM »

I just discovered two things with my latest patch:

- the end of the game is respected whatever the timelimit or capturelimit or fraglimit is (though I didn't test with a lower value than when the game ended, will have to test)
- enabling sv_autoDemo kicks players every map change because of a wrong guid? This is a major show-stopper, I'll have to fix that.
Logged
hairball
Half-Nub


Cakes 2
Posts: 52


« Reply #117 on: March 07, 2012, 05:21:29 PM »

Hey GrosBedo,

I merged your latest server side patch with the openarena_engine.git project.

https://github.com/undeadzy/openarena_engine_serverdemo

The only real change is that it uses FS_IsServerDemoExt().
Logged
Gig
In the year 3000
***

Cakes 45
Posts: 4386


WWW
« Reply #118 on: March 09, 2012, 06:42:25 AM »

GrosBedo, I'm sorry I haven't had the time to test the serverside demo thing yet. And I don't know when I will have some time.

Just guessing... when your server-side demo format will be quite "stable", maybe Bioxide may find a way to make such stuff integrate with OAMME?

PS: Does somebody know a download link for "GTV for OA"? I noticed the link DO NOT LINK[/b]) h t t p s : / / openarena . wikia . com/wiki/Manual/Demos#Additional_tools]here is broken, and I'd like to replace it with a working one.
« Last Edit: March 09, 2012, 06:54:38 AM by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
grey matter
Member


Cakes 8
Posts: 381

>9k


« Reply #119 on: March 10, 2012, 06:22:23 AM »

http://www.superbots.org/viewtopic.php?f=25&t=707 includes GTV for OA
--> http://www.multiupload.com/CPECWG6CXJ and http://superbots.free.fr/superbots/files/OpenArena-Server-PowerPack_v1.1.2.zip

I haven't actually tested it, but there are gtv executables within the download.
Logged

This space is for rent.
GrosBedo
Member


Cakes 20
Posts: 710


« Reply #120 on: March 10, 2012, 12:40:03 PM »

@hairball: thank's a lot, the FS_IsServerDemoExt() was indeed a change to make (I commented it in the code)!

I am grateful for your port, but anyway this patch is not yet clean, and many core ioquake3 files have been edited when there's no need (this is because Tremulous used a weird old+edited version of ioquake3), and so I'd prefer to port it to the latest ioquake3 only when it will be cleaned.

Anyway I am currently creating a github repo, and I will upload all the history of my patch so that later people can take a look at any version to see better how this patch was contructed.

@Gig: I will reupload a newer version of GTV for OA later, but first I need to setup my permanent hosting (I don't want to host it again on a temporary one...). Anyway, GTV for OA is quite deprecated since my server-side demos patch is more reliable and can also be used as a GTV substitute, and maybe an opensource GTV-like will be done using the work outlined here (I will discuss that later on).

Also please don't excuse yourself for not testing my patch! Noone is forced to test my patch, and you're already doing a lot for the community even while you're pretty busy IRL Wink

Anyway I would really LIKE servers administrators to test this patch since they are the ones who will be using this feature!
Logged
GrosBedo
Member


Cakes 20
Posts: 710


« Reply #121 on: March 10, 2012, 03:32:18 PM »

Another pre-release, this one is much more stable and almost finalized. In fact, I won't really work on it very much anymore, I would like to add a few more features but they aren't necessary. Last thing I really want is to clean the code, but this won't change the features nor the stability.

All the previous bugs are fixed, mainly:
- no more are players disconnected when sv_autoDemo is set to 1
- health is now updated on HUD (this one was tough!)
- no more delay when replaying or stopping a demo (before, the code needed to use a delay, now you type demo_start and it starts the demo right away, no delay). Same when stopping a demo (and escaping a demo with escape key does not produce subsequent errors when replaying other demos afterwards).
- fully automatic management of sv_democlients and sv_maxclients vars. You can now safely just demo_play and demo_record without caring about these cvars.

This version is v0.9.3, but now anyway the very last version can always be found on github:

https://github.com/lrq3000/openarena_engine_serversidedemos

Also, there are win32 binaries for Windows users to easily test (sorry linux users, I don't have a linux box close to me!):
https://github.com/downloads/lrq3000/openarena_engine_serversidedemos/openarena-engine-serverdemo-v0.9.3-win32.zip

If you are a server administrator, please test the patch!
Logged
GrosBedo
Member


Cakes 20
Posts: 710


« Reply #122 on: March 10, 2012, 03:35:04 PM »

@admin: Arg, I can't edit my frontpage posts anymore! I didn't know there was a timelimit for edition in this forum.

Please can an admin edit the frontpage post to remove the version and replace the download link to the github's? (Also if you could change PRE-RELEASE to just RELEASE...). I would be very grateful!
Logged
Gig
In the year 3000
***

Cakes 45
Posts: 4386


WWW
« Reply #123 on: March 10, 2012, 06:17:14 PM »

Fromhell added this limit some months ago, due to some users that decided to abandon the community making *all* their previous posts empty (making such threads not easy to understand).

Anyway, I don't like this thing... e.g. the "front post" of the "0.8.x binaries" thread still contains the link to now-old version 22 executables, which had a major bug (mods do not work at all!).
Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
hairball
Half-Nub


Cakes 2
Posts: 52


« Reply #124 on: March 10, 2012, 06:42:24 PM »

@hairball: thank's a lot, the FS_IsServerDemoExt() was indeed a change to make (I commented it in the code)!
Yeah I saw your comment. Smiley

I am grateful for your port, but anyway this patch is not yet clean, and many core ioquake3 files have been edited when there's no need (this is because Tremulous used a weird old+edited version of ioquake3), and so I'd prefer to port it to the latest ioquake3 only when it will be cleaned.
Was there any major cleanup needed?  The only thing I saw that stuck out was the ARRAY_LEN removal which 0.9.3 adds back.

By the way, I synced my copy of your patch with 0.9.3 in github.
Logged
Pages: 1 ... 3 4 [5] 6 7
  Print  
 
Jump to: