I've now moved beyond the queue-driven part of the assignment. I just recently was able to achieve a second account on the XNA creators club with which to actually test my game, so for the majority of the past few weeks, all of my networking has been purely theoretical. Which is quite worrisome for me, but with any luck I can plug it into a separate computer tomorrow and the universe will not implode and my laptop will not set on fire. If I'm really, really lucky, maybe then the game would even run. But that's stretching things a bit.
Theoretically speaking, I even have prediction in my current "networked" game. If a remote player receives a ship update, it's local copy will have a "desired state" that gets updated, and then the physical state interpolates (A very, very simple version of Dead Reckoning, I recon. [See what I did there?])
It's not quite so simple, though. Extra prediction is added in, when packets come across and set new states or create new objects (at least I think I have this for new objects? Making a mental note to go back and check that) it takes the estimated trip time (which XNA so nicely provides) and moves the given state forward based on the trip time so that the received state is as close to the state back on the original sending machine as possible. Then both the desired state (with the last given input) and the actual physical state are updated side-by-side while the psychical state continues to interpolate to the desired state (in terms of position, velocity, acceleration, rotation, rotational velocity, the whole shebang)
So, at the very least if I turn in a pile of steaming waste at the end of the quarter, at least I had my prediction model running, and I guess that's worth something?
I also almost forgot (since I'm not actually networked yet, you see...) about object creation/destruction, which I have now somewhat-sloppily yet successfully packaged into the game. I'm very uneasy about how it works only because it seems a bit to hard-coded for my liking, I would appreciate a more flexible and abstracted system, but given my time constraints and my still-growing familiarity of OmegaRaceX I just first need something to work before I can then go back and make everything all nice and fancy looking.
I just have to also split time between this project and creating a particle Shader for Real Time Graphics. I found some source code that should be able to help me with the setup of that project, at least, but this next week is going to be killer... hopefully not literally.
Anything else I've added? Well, not that I can think of at the moment. I'll finish up the lobby tomorrow and plug this sucker in and see if it works.
Fingers crossed, right?
-Kevin
No comments:
Post a Comment