Comments (36)
I just added function for prediction player movement so bots looks a bit overpowered now ^^.
Youtube
from cod4x_server.
sounds like a nice feature. i haven't yet experimented with bots in any way. but i always disliked that i need pezbots mod to test the simplest features. guess it would be nice to have the option to improve the AI :)
maybe somebody is motivated to develop an AI plugin in the future. 👍
from cod4x_server.
That is cool, it's stupid that bots couldn't do that in the first place. Could we see general bot AI improvement overall in Cod4X? It would be good to not need Pezbots anymore in the future for proper bots.
from cod4x_server.
It is hard to write bots AI using gsc, even harder with C. And this movement under control of gsc scripts.
from cod4x_server.
So? You want these features or not?
from cod4x_server.
Sorry i was offline this week :)
So this would be functions that can be executed on a player via gsc to
perform all the possible movement styles? Leanleft/leanright, crouch, jump
whatever?
2016-07-11 5:56 GMT+02:00 Max [email protected]:
So? You want these features or not?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/D4edalus/CoD4x_Server/issues/20#issuecomment-231637241,
or mute the thread
https://github.com/notifications/unsubscribe/ARP0TC66zXlzAFwQE38jLdzrxwTgSE7Sks5qUb8JgaJpZM4JFxoo
.
from cod4x_server.
Yes. You spawn bot as usual using command line or gsc scripts and then you use something like "self moveforward()" and bot begin move. Unfortunately, this commands will not work for players.
from cod4x_server.
Is this confirmed to be implemented in the future? Currently seems to be a bit dead as there is no confirmation yet
from cod4x_server.
I don't know. Still waiting for confirmation...
from cod4x_server.
How are you going to do that? Emitting usercmd packets into the SV_ClientThink() function every frame? That is what I'd prefer here so it looks like a real player moves them. I think Quake3 bots work over the same function.
from cod4x_server.
Yes. SV_ClientThink() applies some logic to bots' usercmds before actual movement so this is best place.
from cod4x_server.
Would be nice if you could do it then.
from cod4x_server.
Okay I have commited the functions IW used to move bots. So you should have it easier now.
from cod4x_server.
Just tested movement. Its ok.
From the other hand, function called each server frame(20 times per second) so its impossible to make smooth bot rotation. Smooth like its 250 FPS ofc.
from cod4x_server.
Well that isn't correct. Clients see updates only every 50msec as well. When you have one update every serverframe it should look similar to other players moving on server. On clientside there happens interpolation between the current snapshot and the prior snapshot.
from cod4x_server.
There is something weird with angles in usercmd. I can't identify its units. On screenshot you can see its value in integer and there should be rotation for 180 degrees from current origin but in fact there is <10 degrees actually in game.
The game shows extremely small numbers(XXe-41) when i'm grabbing vector from player usercmds. This is definetely not integers.
Hmm. Hexadecimal representation of its components always 2 bytes: so its values from 0(0deg) to 65535(360deg)?
from cod4x_server.
Its direction is not constant and somehow related to spawn direction. (Sometimes 0 its west sometimes its not).
from cod4x_server.
Well in the alpha xbox version of CoD4 its a 3 dimensional int vector.
I can examine the binary again and see if that offset in usercmd_t struct is making sense.
from cod4x_server.
Well I am quite convinced that it is right as it is:
http://img.i-g.ninja/489ccdd8471eadb9d7732187112809c6
angles starting at offset 0x8
from cod4x_server.
Yes, its 3 dimensional int vector but only LOWORDs are in use. I have found how to work with them. You were right - rotating smooth like I'm spectating after human.
from cod4x_server.
Wasted 2 or 3 days because of wrong 65535-0 and 0-65535 ucmd angles transitions. But now it looks sexy.
Youtube
from cod4x_server.
Nice you got that to work!
from cod4x_server.
That looks awesome! Soon we can have proper bot matches lol
from cod4x_server.
Except for the horrible desync you seem to be having, that is amazing! Maybe eventually a setting could be added for bot difficulty, ranging from very easy to hard like this. That would make proper bot matches possible.
Do you know what is up with that desync though?
from cod4x_server.
Any idea why in killcam it looks like he is so much time off? Do you really use the current servertime and not something old when sending usercmds?
from cod4x_server.
ucmd.serverTime zeroed at line 10, I'm not touching it. Scripts and killcam are from vanilla CoD.
Thats everything I'm doing for bots in this function for now. (And looks like thats all I need.)
from cod4x_server.
ucmd.serverTime = Sys_Milliseconds();
didn't help.
Maybe this is because game still thinks its 1k ping for bot? (lag icon present) And all actions looks like 1 second faster than actual shots fired.
from cod4x_server.
ucmd.serverTime = svs.time;
I am wondering how you can hit at all when you provide a so much wrong server time.
from cod4x_server.
It hits perfect but impacts on demos and killcams.
Done. No desync anymore.
What is svs.time
exactly? Time from map start? Or whole server?
from cod4x_server.
Whole time server is running for in milliseconds. Most stuff uses it as base. It's resolution is only serverfps however. Time is constant during each frame where Sys_Milliseconds() isn't.
from cod4x_server.
Does it still show the disconnected icon?
from cod4x_server.
No.
from cod4x_server.
So, don't you want to accept #45? It's ready and I want to focus on something more important.
from cod4x_server.
Do you have a video of the bots without desync btw? Or what commands would I need to run to get such a bot in a private game running your PR?
from cod4x_server.
No, I haven't.
You can use my _globallogic.gsc with empty mod on mp_backlot.
from cod4x_server.
that is very cool stuff! i have pulled it to a separate branch for now as it is a lot to look over.
from cod4x_server.
Related Issues (20)
- .ff different from server help HOT 3
- Server received signal: Segmentation fault HOT 2
- Problems with downloads HOT 15
- problem starting bots with my mod HOT 19
- CL_CGameNeedsServerComand:a reliable command was cycled out HOT 4
- [BUG] AmbientPlay is crap since 20.X HOT 12
- problem with compiling cod4x server in linux debian. HOT 5
- [request] The need of stock asset registration skip HOT 2
- Demo Recording Filename HOT 6
- Torjan - Can't be false positive? HOT 2
- Impure client detected! Invalid .IWD files referenced! HOT 3
- Error HOT 1
- Implement NAT Hole punching HOT 7
- Find game files (main, zone) from current working directory rather than where the binary is HOT 1
- Multiple Steamid same playerid HOT 7
- Impure client detected HOT 4
- Compile errors HOT 2
- cannot execute: required file not found debug HOT 4
- kill then start server causes "Warning: NET_IP4Socket: bind: Address already in use" HOT 3
- blank
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cod4x_server.