Jump to content


Various Things...

Jon Denver

Recommended Posts

Lazyness? I unno, it's alot of code to look through. :p


So I've gotten some itty bitty changes in (read: tiny weapon changes), compiled, all that good stuff hooked up and working. Now I wanna go deeper. :)


I'm kinda confused about keys that do things. When I press a key, where's it get recognized? I tried my damnedest to find the code for the zooming function on the disruptor, but got lost and just found firing functions. -_-


The camera. Where's that stuff at?


Still a little confused as to the whole client-server dealie. The client wants to perform a function (Move, Fire weapon, what have you), client sends the request to the server, then the server tells the clients what happened and what function to perform... right? :confused: How exactly should one code things in?


int vmMain(), It looks like this is where it all starts. Is it called from jamp.exe every, whats the wording... CPU cycle?


Thats it, for now. :)

Link to comment
Share on other sites

There is only one real practical tip I can give you for the stage your at:


Find in files


Just do LOTS of searches for the word which your interested in - on all source files in the project.


...so for example, your interested in camera stuff. Just do a search for 'camera' in the code. A lot of the entries found could be misleading, but as you do it more and more, you'll eventually learn where the important stuff is.


It takes a while, and you need a lot of patience and determination, but you can learn - bit by bit - how the code works just be doing something as simple as doing searches on keywords.


...of course, you need to learn C programming too! ;)

Link to comment
Share on other sites

You're overestimating the level of interaction between the client and the server. The only things that are sent from the client are commands, cvar data, and the input packet that's created by the client game engine.


The server sends the client an updated playerstate for that player's entity, entitystates for the other entities, event data, and cvar updates.


Everything else is extraploted from that data on both the server and the client.


All the camera control stuff is handled by the client system on a per client frame basis.


If you could be more specific, I can be more specific in my answer. :)

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...