I made a much needed change to how networking works. Now, the client tickrate is completely separate from not only its graphics tickrate, but also the network send/receive tickrates.
I've noticed that interpolation is a little bit jerky, especially when jumping. I'm hoping to fix this by implementing cubic spline interpolation, replacing linear.
On a side note, I think I'll try to post a substantial blog update once a week. I had originally planned to do a daily update, but I realized that writing even a simple post takes more time and effort than I gave credit.
Monday, September 23, 2013
Wednesday, September 18, 2013
Daily Update: Networking Code Progress
These past couple of days, I've been working on getting the network code in a better state.
Yesterday, I added a couple features such as the reliable packet layer, player list, and chat messages. The Console subsystem I wrote for a previous project is becoming incredibly useful for debugging and development. It allows me to bind any key to a test function, as well as any c++ variable to a console variable(cvar). This means, instead of recompiling the project to try out a player gravity of 0.8, you can simply type something like 'sv_gravity 0.8' into the console. As you might be able to tell from the screenshot, the Console is very much influenced by the Quake/HalfLife engine :)
Today, I added entity interpolation and a basis for client prediction.
I'm really happy with the interpolation code I wrote. The way the engine is structured, the game logic tickrate is completely separate from the graphics tickrate. So even though the server and client's logic run at 20 frames a second, the entities are drawn on the screen interpolating smoothly at over 100 frames per second. All I need to do is structure this new code to be applicable to all objects, not just other players.
In addition, I added basic client prediction to your character. It works in the sense that the player's input is immediate, but because there is no interpolation for your own player it still feels jerky. I'll be fixing this soon for sure.
Feeling good about progress right now! My sleep schedule is really off, but I can say I'm productive.
Immediate TODO:
hold tab to show player names |
console dropdown |
Yesterday, I added a couple features such as the reliable packet layer, player list, and chat messages. The Console subsystem I wrote for a previous project is becoming incredibly useful for debugging and development. It allows me to bind any key to a test function, as well as any c++ variable to a console variable(cvar). This means, instead of recompiling the project to try out a player gravity of 0.8, you can simply type something like 'sv_gravity 0.8' into the console. As you might be able to tell from the screenshot, the Console is very much influenced by the Quake/HalfLife engine :)
Today, I added entity interpolation and a basis for client prediction.
I'm really happy with the interpolation code I wrote. The way the engine is structured, the game logic tickrate is completely separate from the graphics tickrate. So even though the server and client's logic run at 20 frames a second, the entities are drawn on the screen interpolating smoothly at over 100 frames per second. All I need to do is structure this new code to be applicable to all objects, not just other players.
In addition, I added basic client prediction to your character. It works in the sense that the player's input is immediate, but because there is no interpolation for your own player it still feels jerky. I'll be fixing this soon for sure.
Feeling good about progress right now! My sleep schedule is really off, but I can say I'm productive.
Immediate TODO:
- Generalize interpolation code
- Smooth out player prediction
- Do some online testing with four people
Tuesday, September 17, 2013
The Origin of Mephisto
Back when I was still in school, Kyle and I started working on a game. It was a simple idea at first, a typical metroidvania, but it didn't stay simple for long because of feature creep our awesome ideas. After two years of off and on work we ended up with a pretty nifty game engine prototype. Its features included procedurally generated dungeons, UDP-based online networking (for co-op play), animated 3D backgrounds, and a sweet custom lighting engine. For various reasons, we stopped working on it and the game we planned on making fell to the wayside. We kept meaning to come back to it, but didn't really have the time to make it happen.
Now, years later, it's finally time to finish what we started.
plan
Although we spent a good amount of time on our original engine, it was a huge learning experience for both of us. We were both relatively new to game development and the code really showed it. As a result, we decided to scrap the original engine (mephisto.v1) and we're rewriting everything from scratch. Luckily, we're both much more experienced than we were before, and we've got some new, fresh ideas.
inspiration
Diablo
Castlevania
Metroid
Roguelikes
Spelunky
planned features
Cooperative, fast-paced online play
Procedurally generated levels
Roguelike Elements
todo:
s/codename\.mephisto/Actual Game Name/g
a screenshot of our original engine
plan
Although we spent a good amount of time on our original engine, it was a huge learning experience for both of us. We were both relatively new to game development and the code really showed it. As a result, we decided to scrap the original engine (mephisto.v1) and we're rewriting everything from scratch. Luckily, we're both much more experienced than we were before, and we've got some new, fresh ideas.
inspiration
Diablo
Castlevania
Metroid
Roguelikes
Spelunky
planned features
Cooperative, fast-paced online play
Procedurally generated levels
Roguelike Elements
todo:
s/codename\.mephisto/Actual Game Name/g
Subscribe to:
Posts (Atom)