Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
ketmar

k8vavoom: no good thing ever dies! (2020, May 12 build)

Recommended Posts

Posted (edited)
On 3/14/2020 at 10:18 PM, seed said:

Is that so? Is BD's codebase that fugly?

yep. it seems that Sgt. cleaned it up a little for the latest version, but it is still... no, i don't have a word.

contrary to HDoom, btw, which is one of the cleanest and best written decorate code bases i've seen. no, not a joke.

 

On 3/14/2020 at 10:22 PM, Mr.Rocket said:

was just surprised that it ran the mod actually

same here. ;-)

Edited by ketmar

Share this post


Link to post
Posted (edited)

hmm, I can't seem to get +TimeLimit to work.

eg +TimeLimit 1

Which should make the level end in 1 minute.

 

It shows up in the console with the limit set to 1 as it should, but it seems to do nothing at the moment.

Is it because the multiplayer menu is currently disabled?

 

Thanks

Edited by Mr.Rocket

Share this post


Link to post

so, finally, here it is! i couldn't invent some creative slogan, so...

 

this build comes with experimental multiplayer support.
WARNING! MP code is of alpha quality at best. complex mods may not work, mods with ACS may not work, and even
standard setup may fail. there is currently no way to control headless server on windows, and on GNU/Linux you
should have access to the server tty.


* great thanks to id0 for invaluable help in testing network code!
* ALOT of work on MP modes
* enabled and extended multiplayer menu (because networking is in pre-beta testing stage now)
* better handling of known blood types (if our own gore mod is active, block spawning of other known blood entities)
* do not render models with "null" textures; also, added cvar "r_model_ignore_missing_textures" to ignore models with missing textures (and menu option)
* allowed bitshifts for float numbers in DECORATE (sometimes used to convert float to int, 'cause there's no other way to do it there)
* fixed setting RenderStyle property from ACS
* parse point light color string from UDMF (thanks, Khorus)
* better fixer for light sources embedded into floors/ceilings (thanks, Khorus)
* some fixes to weapon zooming (it should NOT change fov cvar, evar!); also, reset client fov on reborn
* spawn MUCH less blood on crush damage (yeah, alot of blood looks great, but it kills the framerate)
* line attacks should hit floors and ceilings again
* subtractive render style should not affect depth buffer
* fixed logic for sound pitching, added option to turn it off (thanks, Remilia Scarlet)
 

Share this post


Link to post
3 hours ago, Mr.Rocket said:

hmm, I can't seem to get +TimeLimit to work.

eg +TimeLimit 1

Which should make the level end in 1 minute.

1. it was broken.

2. it works only for deathmatch games.

Share this post


Link to post
Posted (edited)
  • Here are some minor bugs so far. It seems as that k8vavoom-dedicated.exe wants to stay running in the background, we sort of need to have it in a dialog of some sort.. ~ As-is, it will need to be end-task'd from within task manager.. in Windows, it doesn't appear anywhere other than in task manager, end user needs to know that it's running and be able to close it.  Is there a public source code for the dedicated program? 
  • When running a local DM and a bot finds a secret, it's displayed on the human players screen.
  • Fraglimit and Timelimit seem to only work from the multiplayer menu. ~ I'm not sure what all commands are working from the dedicated server command line, most of them seem to, other than fraglimit and timelimit. ~ hmm, just running from k8vavoom exe, these 2 commands don't seem to be working from CL at all.

 

Windows 10 64bit.

Edited by Mr.Rocket

Share this post


Link to post
Posted (edited)
26 minutes ago, Mr.Rocket said:

Is there a public source code for the dedicated program?

of course, that is exactly the same source as for the "full" engine. ;-) because this *is* the full engine, only with rendering and sound code ifdef-ed out.

 

26 minutes ago, Mr.Rocket said:

bot

please, don't. bots are completely broken, and should not be used. they are there for my own development needs, but by all means consider them totally unsupported. and yes, they are "local players", without network connection, and so without RPC required to dispatch messages.

 

26 minutes ago, Mr.Rocket said:

Fraglimit and Timelimit seem to only work from the multiplayer menu.

the order of the commands matters alot. basically, "maxplayers" initiates a server mode, then other commands setup the parameters, but they only have effect after the "map" command. that is, you have to start the server, then setup it, and then set the map. otherwise you'll see some strange effects (becase "maxplayers" does its own business too). quite a mess, but i used to it, so never bothered to change it. ;-)

 

also, dedicated server is using the same config.cfg as the "full" engine (yet it will never rewrite it), so you can put some common things there.

Share this post


Link to post
Posted (edited)
5 hours ago, ketmar said:

of course, that is exactly the same source as for the "full" engine. ;-) because this *is* the full engine, only with rendering and sound code ifdef-ed out.

Ah ok I see, well there needs to be a way to close it more easily than through task manager lol, it really just needs some ui adjustments to be "visible". :)

 

5 hours ago, ketmar said:

bots are completely broken, and should not be used.

*Noted ;)

 

5 hours ago, ketmar said:

the order of the commands matters alot. basically, "maxplayers" initiates a server mode, then other commands setup the parameters, but they only have effect afte the "map" command. that is, you have to start the server, then setup it, and then set the map. otherwise you'll see some strange effects (becase "maxplayers" does its own business too). quite a mess, but i used to it, so never bothered to change it. ;-)

Yeah I noticed that, I'm working on a launcher for k8vavoom exclusively..

https://imgur.com/a/DlMLtSb

I see now, and will mess with it in a bit! So fraglimit and timelimit need to be after +map ?

 

Love the new version so far!

Cheers!

 

EDIT: lol guess what, fraglimit and timelimit need to be before +map.. :D

eg: -doom2 +MaxPlayers 2  +Deathmatch 2  +NoMonsters 1  +Skill 3  +FragLimit 1 +TimeLimit 1 +map map01 +Addbot bot1

It's working now.. ;) so something to go in the docs :P

 

Oh btw, in case you're wondering, because -bdw is a graphic/client side command, when the launcher is used to host a dedicated server, -bdw will be removed from command line. Otherwise, the dedicated server seems to reject the connecting client.

But if it's a client side server, then the option will remain there to enable or disable said graphic mods.

If there's reason enough, I haven't added anything having to do with the external dedicated server app yet, so..

 

hmm, seems like the Deathmatch intermission screen could stand to be displayed a little longer than the 1 second that it currently is heh..

It probably needs at least a 5 to 10 second countdown, so everyone has a chance to see what their score is, ya know?

 

 

Edited by Mr.Rocket

Share this post


Link to post
Posted (edited)
9 hours ago, Mr.Rocket said:

well there needs to be a way to close it more easily than through task manager lol, it really just needs some ui adjustments to be "visible".

sure. in GNU/Linux, it still prints to the terminal, so i simply didin't noticed that on windows it won't open console window. ;-) i'll fix it later.

 

9 hours ago, Mr.Rocket said:

I'm working on a launcher for k8vavoom exclusively

yay! great, thank you! ;-)

 

9 hours ago, Mr.Rocket said:

lol guess what, fraglimit and timelimit need to be before +map

ah, i didn't made myself clear, sorry. you have to specify everything before changing the map, and then new map with "map" will use what you specified. that is, you got it exactly right. ;-)

 

9 hours ago, Mr.Rocket said:

because -bdw is a graphic/client side command

nope. it is a command to load a full-featured built-in mod (and blood is a mod too, so "-nogore" disables loading it). if you start the server with "-bdw", then you have to start the client with "-bdw" too (i.e. they both should either have it, or not). it doesn't matter if it is dedicated, the mod still should be loaded.

 

and even if something is only gfx, it still should be loaded to dedicated server. client and server should include absolutely identical list of loaded wads. it doesn't matter what they contains, they still should be loaded, and in the exactly same order. otherwise, even if you will manage to beat the checker (it is not hard, it only checks names ;-), Bad Things will happen. messed sprites, mangled sounds, and other chaotic things.

 

the engine is using simple ints to identify alot of things (including textures, sprites, etc.). those ids are depend of loaded wads, and they should be the same on both ends. that's why the list of mounted archives should be completely identical. otherwise ids will differ, and you will get things like SSGs dripping from the ceiling instead of blood (lol).

 

also, the server is Teh Authority. it means that any mod (including weapon mod like BDW) should be loaded onto server for actual processing (because all actions are done there), and onto client for rendering (because client only rendering what server telling it to, and so client needs all the gfx ;-).

 

sorry if i'm talking about obvious things you already know. then maybe some other people are interested. ;-)

 

so i don't think that there is any need to do something special for dedicated server, you can (and actually should ;-) use exactly the same command line for both exes.

 

9 hours ago, Mr.Rocket said:

hmm, seems like the Deathmatch intermission screen could stand to be displayed a little longer than the 1 second that it currently is heh..

it should be a normal intermission screen, with 4 second unskippable pause, and then it will be skipped as usual (i.e. one player skipped it -- everybody skipped it). at least that is how i wanted it to be. i'll check if i broke it (i certainly did ;-).

 

as i absolutely don't play DM games, that mode may be undertested. so thank you for your reports! the more people will report, the better DM mode will be. ;-)

Edited by ketmar

Share this post


Link to post
1 hour ago, ketmar said:

sure. in GNU/Linux, it still prints to the terminal, so i simply didin't noticed that on windows it won't open console window. ;-) i'll fix it later.

Ah ok cool, I'll add it to the launcher later then, because right now it would be a real pain to have to end task it all the time heh.

1 hour ago, ketmar said:

because client only rendering what server telling it to

At the time, I was running the dedicated through batch file for some quick tests, this must have been before I found that it was running in the background.

Will go back to working with the dedicated server app later though after you get it updated a bit. ~ aside from the dedicated server stuff, the launcher is running via game server host and it's working just fine. ;)

2 hours ago, ketmar said:

it should be a normal intermission screen, with 4 second unskippable pause, and then it will be skipped as usual (i.e. one player skipped it -- everybody skipped it). at least that is how i wanted it to be. i'll check if i broke it (i certainly did ;-).

Yeah, even single player/coop intermission is super quick!

 

Will pm you the launcher beta version shortly so you can take a look.

 

Cheers

Share this post


Link to post
1 hour ago, Mr.Rocket said:

Will go back to working with the dedicated server app later though after you get it updated a bit.

ok. i'll prolly send you a fixed build later, so you will be able to test it before "official release". ;-)

Share this post


Link to post

@Mr.Rocket actually, i updated the official build, why not. ;-) now dedicated server should open the console window.

@-TDRR- and quickfix! ;-)

Share this post


Link to post
6 hours ago, ketmar said:

actually, i updated the official build, why not. ;-) now dedicated server should open the console window.

Ah nice! I'll add the option to run dedicated in the launcher. :)

Share this post


Link to post
Posted (edited)

i wanted to write a proper article, but i am too lasy. still, i wrote an introduction, and now it sits on my HDD. so, i'll waste some of your time with it: introduction to k8vavoom MP code design and implementation.

 

Spoiler

k8vavoom network layer built on top of UDP protocol. it is using "virtual channels" to
send and receive packets of data (i.e. it is message-oriented, not steaming, like TCP).
each virtual channel is independent of others, but inside the channel, all messages are
guaranteed to be delivered in strict sequential order. comm layer does all the work on
multiplexing messages, resending lost packets, and maintain the order.

there are 1023 virtual channels. first three are used to send control messages, map updates
(height, texture, lighting and other map changes), and player updates (position and view
angles). one channel is used to communicate various internal data. other channels are
dynamically assigned to map entities.

to send world updates, the network layer dynamically builds so-called "fat PVS" (list of
sectors, visible to camera with 360-degrees FOV). it is used to decide which entities are
"active", and need to be replicated over the network. "active" entity gets its own virtual
channel, and creates "entity snapshot" (current values of all entity fields that will be
replicated). this is to avoid sending unchanged values -- usually, only position, orientation,
and animation frame need to be sent repeatedly, all other fields sent only once (becase

those fields mostly unchanged during the entity lifetime).

as we have a limited number of channels, maps like Nuts cannot be fully replicated. so the
code has a system to decide which objects are "more interesting" than the others. basically,
updater prefers the object closest to the player. players has the higher priority, then comes
monsters and projectiles, then pickups, then decorations, and dead bodies comes last. on each
update frame, the code checks if it has enough channels for updates. if there are more entities
than free channels, update manager "evicts" furthest objects, and reusing freed channels for
new updates.

in this scheme of things, client never does any gameplay changes, it only renders what the
server sends. but it is possible to "detach" some objects and leave their processing to the
client. this is what k8vavoom does with blood entities: basic blood spawning object created on
the server, and then it becomes "detached". the server destroys the object, but on the client
side it lives, spawns flying blood and so on.

currently, client doesn't perform any player movement prediction, it only sends the desired
movement speed to the server, and waits for the answer. this creates noticeable latency.
but it is possible to start moving the player on the client side, and correct the prediction
when any new position received. most of the time the prediction will be correct, and there will
be zero latency (actually, not zero, but no more than with a local game). this will require
timestamping the events (easily done, because the game has internal timer). also, timestamped
events will allow to implement "lag compensation" (temporarily rewing the world back in time
to trace hitscan attacks). client-side prediction and lag compensation are used in all modern

network shooters, and we can do it too!

 

Share this post


Link to post
Posted (edited)

i implemeted experimental support for "simulated proxies". this is network entity that spawned on the server, sent to client, and then client simulates its physics. the server only takes its authority back when such entity is going to die.

 

this is good for various projectiles: most of the time, a projectile is simply flying forward with the given velocity, so there is no need to spam clients with its new position. also, simulating it on the client will give it much smoother movement (because physics will be caluclated with client FPS). so, now various balls and rockets are simulated on the client side, and the server only takes it back when it explodes.

 

the implementation is a bunch of hacks, but it is ok for the first draft. and the result is visible even on the localhost (because server FPS is 35, and client FPS is 60+, so imp fireballs are moving much smoother). there can be a little delay before explosion (and it may explode in a different place in the crowded room), but there's nothing the engine could do with that (and most other engines does it this way too).

Share this post


Link to post

Hey, Thanks for taking the time to write that up, very interesting!

As well as further tests with simulated proxies, which sounds like it may be a bit smoother, is it a keeper?

 

I'm currently trying to decide if I should have the dedicated server window encapsulated in a windows form.

Strictly for the purpose of the launcher with simple start server, stop server button click. 

Share this post


Link to post
10 minutes ago, Mr.Rocket said:

I'm currently trying to decide if I should have the dedicated server window encapsulated in a windows form.

Strictly for the purpose of the launcher with simple start server, stop server button click.

i am planning to implement some way to control the dedicated server from the outside later. but i don't know how/when yet.

 

also, i don't think that you can incapsulate windows console window in such way. in windows, console window is not even a "real" window internally, it only knows about several predefined messages (and they are hard-coded). i think that for now your best bet is to find the process and simply terminate it (it is ok to "kill" the server in such way).

 

15 minutes ago, Mr.Rocket said:

As well as further tests with simulated proxies, which sounds like it may be a bit smoother, is it a keeper?

ahem? here my engrish failed, i've never seen the word "keeper" in such context.

Share this post


Link to post
Posted (edited)
22 hours ago, ketmar said:

i don't think that you can incapsulate windows console window in such way.

 

You sure about that? 

 

22 hours ago, ketmar said:

i've never seen the word "keeper" in such context.

It just means, is it worth keeping? is it working good enough to keep.. I suppose the word "keeper" is some English slang.. sorry about that. ;)

 

Edited by Mr.Rocket

Share this post


Link to post
Posted (edited)
25 minutes ago, Mr.Rocket said:

You sure about that?

absolutely not, my windows knowledge if very old and rusty. ;-) it wasn't possible with XP, and wasn't possible with Vista, i think. that's mostly the latest windows i've seen. back then, console windows ignored all attempts to reparent them.

 

25 minutes ago, Mr.Rocket said:

It just means, is it worth keeping?

ah, i see. sure, it makes projectile movement alot smoother. most of the time it works as expected. and when it doesn't, it is only a small visual glitch, and you already have much bigger problems anyway (alot of objects or huge lag already made the game virtually unplayable).

 

25 minutes ago, Mr.Rocket said:

I suppose the word "keeper" is some English slang.. sorry about that. ;)

no problems, i love to learn new things, and i love to ask questions. ;-)

Share this post


Link to post
Posted (edited)
10 minutes ago, ketmar said:

console windows ignored all attempts to reparent them.

Well, it wasn't easy to figure this out heh.

There's another launcher I started on before this one and I called it DoomBox, it will support several source engines, it has IRC built in and DOSBox. DOSBox is setup to run Doom2 and works really well. But there was always a problem, DOSBox its self would never center to screen (there was no actual command to do it), you always had to move the window.. But with the above code, that will be fixed, and depending on the threads, I should be able to run DOSBox Doom2 inside the DoomBox launcher. ;) But of course an option to run fullscreen as well.

Share this post


Link to post
Posted (edited)

I decided to clean up my previous post about the dedicated server stuff, I don't want to litter up your thread. ;)

Besides I may be removing the server console from the form after some tests.

I may not be able to completely keep focus on the process, so it may turn out that the dedicated server console will only be launched from the launcher as a stand alone app as it is after all.. :\

 

Will let you know how things turn out and hopefully have an update ready for you by tonight. :)

Share this post


Link to post
1 hour ago, Mr.Rocket said:

I don't want to litter up your thread

ah, it is even ok to offtop here (to some extent ;-), it is like "dev diary" anyway. and not only my diary. just don't make it so hard that official moderators will have to clean it up (and that limit is high on doomworld ;-). i myself love to derail other threads, so people are free to derail mine. ;-)

Share this post


Link to post
42 minutes ago, ketmar said:

ah, it is even ok to offtop here (to some extent ;-), it is like "dev diary" anyway. and not only my diary. just don't make it so hard that official moderators will have to clean it up (and that limit is high on doomworld ;-). i myself love to derail other threads, so people are free to derail mine. ;-)

lol I'll just keep to myself on that one. :P

Share this post


Link to post
Posted (edited)

Anyway, the dedicated server will be ran from the launcher but not in the launcher..

Share this post


Link to post
Posted (edited)

i am experimenting with client-side prediction now (but i don't think that it will be in the next build), so remote server control is not at the top of TODO. besides, i didn't decided how to implement it properly, and how to auth "server owner" yet. the easiest way is to use UDP, buth auth it still need to be designed.

 

may be just drop in tweetNaCl, and encrypt all traffic, lol.

 

p.s.: actually, i'll prolly encrypt it with ChaCha later. not because of "hacking protection", but for the authentication.

Share this post


Link to post
Posted (edited)

Just so you'll know, I have no idea wtf ChaCha is lol, I'm guessing it's just an encryption library of sorts.

Encrypting all traffic doesn't sound like a bad idea though.

Share this post


Link to post
Posted (edited)

Was there a command for public or private server when hosting through the in-game server?

I'm guessing it's the menu option for "report to master server" ? but I don't know the command for it.

 

EDIT:

ah found it, master_allowed "1".. I'll make it a checkbox.

 

If so, is there also a "server name" command, eg: +ServerName  "My Super Duper Cool k8vavoom DM Server".

And perhaps a +MOTD "Thanks for joining! ~ Free Popcorn with $5 cover charge!" etc..

Or are we just using strictly IP's for now?

 

If none if the above, then there's a couple feature requests. ;)

 

Thanks

 

Edited by Mr.Rocket

Share this post


Link to post
Posted (edited)
9 hours ago, Mr.Rocket said:

Just so you'll know, I have no idea wtf ChaCha is lol, I'm guessing it's just an encryption library of sorts.

it is a stream cypher by prof. D.J.Bernstein. the same person who created NaCl (on which libsodium is based), Poly1305 message auth algo, and so on. also, qmail, djbdns and other software.

 

3 hours ago, Mr.Rocket said:

I'm guessing it's the menu option for "report to master server" ? but I don't know the command for it.

it's easy. press "?" (with shift), and cvar name that the given menu item changes will be printed in the console.

 

WARNING! it doesn't work right with input fields, and most MP menus are done in non-standard way, so you'll see something like "_netgame__max_players_", for exampe, which is just a temp var to save item value when menu is closed. yet it works for all options in option menus, and for "report to master" menu item. ;-)

 

3 hours ago, Mr.Rocket said:

If so, is there also a "server name" command

sure. it is called "+HostName". MOTD is not there yet, tho. name is limited to ~120 bytes, and won't interpret UTF-8 in the built-in browser (i.e. limit it to ASCII).

 

as for MOTD, i don't know. i mean, it is possible to implement it, but it doesn't fit into the current game UI, and i am too lazy to change the UI, and therefore i am too lazy to implement MOTD. maybe later. ;-)

 

3 hours ago, Mr.Rocket said:

ah found it, master_allowed "1".. I'll make it a checkbox.

there's also "master_address". as the master is not something Very Secret, people may want to use different masters, so it may be worth adding too.

 

 

p.s.: "Thanks for joining! ~ Free Popcorn with $5 cover charge!" of course, i read it as "free porn".

Edited by ketmar

Share this post


Link to post

...and i implemented very simple packet encryption. because why not? it doesn't need any working brain cells anyway.

Share this post


Link to post
Posted (edited)
On 3/21/2020 at 6:16 AM, ketmar said:

p.s.: "Thanks for joining! ~ Free Popcorn with $5 cover charge!" of course, i read it as "free porn".

lol

15 hours ago, ketmar said:

...and i implemented very simple packet encryption. because why not? it doesn't need any working brain cells anyway.

Nice!

 

There's something thats been bothering me a little lately.. 

Is there any way to speed up the loading of k8vavoom just a little? it seems like it takes up to almost 5 seconds before the Doom splash screen is even displayed on the screen.

I mean I'm sure there's a lot going on at load time, but is there anyway to speed up the process after execution?

 

Edited by Mr.Rocket

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×