Forum

Freeaim

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Freeaim

Postby Skippy » Wed Sep 26, 2007 1:08 pm

Once again, I need some help.

I'm trying to impliment a freeaim system (moving the mouse moves the gun, but not your view) in my darkplaces mod. This basically means I want to be able to move the crosshair around the screen without turning the player, and then slowly adjusting the player rotation to match. This is basically required to get the effect I want for my mod, since the manouverability of each player needs to be directly controlled.

Also, if I do get this sort of thing in, is there a way to project a crosshair along the predicted path? Sort of like what airquake does, but I'd like to have 2 crosshair components set at different distances so you can line them up or use them as reference points for aiming.

Anyone ever done this/know a way to do it?

EDIT:
Also, attaching the camera to the player model, and having the player model visible. I know Quake Royale could do this, but does anyone have and idea on how one would do this?
Skippy
 
Posts: 4
Joined: Fri Sep 14, 2007 3:36 am

Postby Urre » Thu Sep 27, 2007 8:17 am

Ah, finally someone else than me in the Quake community with some taste.</ass> You know, I kind of did this in a (afaik) lost testmod, which made the playermodel visible, with proper up/down looking and everything, you could even shoot yourself in the foot, literally (polygon collisions). The problem I had not predicted, which I'm sure you've forgotten about as well, is that all that needs to be clientside, or all aiming and movement will be lagged in multiplayer games, and you won't get even close to the awesome immersive experience you're after. When I made my testmod (called Supertorso, cause it was based on the idea of segmented models from Quake 3, but took it a step further, with making the arms separate segments as well), ClientSide QC wasn't implemented to DP yet, so I got sad and just threw it away. Nowadays, there's inofficial CSQC support in DP, which no one (thus far) has had the guts to try and figure out, the entity side of it that is. So, there's few people who can help you. The best you could probably do is ask a fellow called TimeServ, he made a few clientside mods for FTEQW, unsure if they had any entities (probably just HUD and effects mods), but you could always try. He works with FTE, rather than DP, so ideas and implementation will most likely differ a lot.

A good ol' word of warning: You *want* to be fairly experienced as a coder and/or QC junkie before you get too deep into this.

Good luck, and I hope to see all and any progress reported either here or a new thread!
I was once a Quake modder
User avatar
Urre
 
Posts: 1109
Joined: Fri Nov 05, 2004 2:36 am
Location: Moon

Postby Skippy » Thu Sep 27, 2007 12:05 pm

Eep.

I was under the impression that aim was already clientside. The closest thing I have seen to this would be airquake, where you control the camera and movement seperate, but I would reverse it having the camera lock to the body rather than the turret/weapon.

I'm probably in way over my head with the mod I'm trying to do. Maybe I'll make some practice mods to get some more skills.
Skippy
 
Posts: 4
Joined: Fri Sep 14, 2007 3:36 am

Postby FrikaC » Thu Sep 27, 2007 2:31 pm

Aim is indeed clientside in Quake, but you can only make mods to it by making new clients (or using the new CSQC as Urre mentioned).

Otherwise you have the standard Quake aiming mechanism, which is you move the mouse and the view rotates as normal. AirQuake's system use this standard behavior as a component of their overall behavior - your view rotates the same but your client entity is actually projected back and orbits another entity, based on your client's view angle. Chasecam mods do a similar thing and make the client believe, by sending the client SVC_SETVIEW, that his client entity is some other entity (this screws up the scoreboard, but it works). As he moves the mouse, the server projects back the entity it made the client think was his, and again the same orbitting effect is achieved.

Other mods like TAoV and Prydon Gate have much more complex camera systems, but they're all working from the same basic premise as above, witch the added fact is if you don't really care about network traffic you can just spam send SVC_SETANGLE, this message is used when fixangle is set, when the client normally travels through a portal, this automatically makes the client face a new direction.

In almost all QuakeC mod cases the view is generally offloaded to a server controlled additional entity. As such the server (and thus the QuakeC, as QuakeC is normally server only) has complete control of it. Because it is server controlled, the client feedback of the camera will take quite a while from his actions client side being transmitted to the server and the back from the server to the client.
FrikaC
Site Admin
 
Posts: 1026
Joined: Fri Oct 08, 2004 11:19 pm

Postby Urre » Fri Sep 28, 2007 10:55 am

Yes, aiming *is* clientside, but you can't alter its behaviour, and rarely use it for anything but simple aiming, because all information you get from the aiming will be lagged on the server. So for example if you use it for lagged gun turning (like in Q2 and many other games), it will not lag until after half a second or something, so the effect basicly dies. It works fine on a LAN, since networking is fast enough for you to never notice anything. This obviously also means it works even better in singleplayer, so if your mod is singleplayer only, with no coop or anything, you'd be just fine using SSQC for anything.
I was once a Quake modder
User avatar
Urre
 
Posts: 1109
Joined: Fri Nov 05, 2004 2:36 am
Location: Moon


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest