PK++ Progress 07/02/07

NETCODE
========

Interpolation FIXED! (finally)

What seems to be the case, is that part of the player animation was causing a glitch which resulted in the player location on receiving the player frame to be mislocated. This is now fixed by turning off animation until I get more time to look at it. Right now animation is synchronised, but I am considering having this predicted on the client.

What this means in real terms is that gameplay at low data rates will be smooth. Since PCF did not understand what interpolation was, it broke as you set serverframerate(client) less than the actual server frame rate. This meant that low serverframerate(client) looks very jerky/choppy. It should be noted too that enemyprediction also damages movement on the server.

Given this, I can now interpolate ALL moving items between frames, so everything is smooth.

The important part here is that serverframerate(client) can be much less than the server tick rate. It is considered that good physics occurs on servers set to 60 fps, but 60fps of data for ffa is too much. By lowering serverframerate(client) you can still have 60fps on the server, and still have smooth, low bandwidth gameplay.

By comparison, Q3 and CS both use 20 updates to the client per second (although due to server tickrate), although HPBs can lessen this if required. Gameplay is still smooth on both these games, and no one notices the additional latency caused by the interpolation. It is possible to correct for this using unlagged/anti-lag which PK has the foundations for already. Whether we go for full client-side anti-lag or not will be decided in due course.

Where PK loses out is hiding things you cannot see from the update. The way Q3 works is to only update players which you might be able to see/hear, and not ones way off in the distance. We cannot yet do this in PK, and cannot without the source code. I may have to think of other ways to reduce data if required. If the main issue is reducing data for COOP, then simply I can not update monsters which NO ONE can see or hear – they will still be there on the server though.

I also loaded up Q3 to compare upstream and downstream packet sizes, and PK and Q3 are now similar.

MAPS(!)
=======

SP maps are beautiful, and if in any doubt load up C2L5_Town or any and see how good they look on full detail. However, a number of the maps do not work on dedicated server – and in fact crash PK out completely. This is the reason, for example, why there are no conversions of City on the Water which is a great map.

The loading problem is now FIXED! (this is important!)

ALL SP maps can now be used on dedicated server, which should also fix some issues found by mappers 🙂

Also when loading SP maps in MP now, the items which do not belong in MP are not loaded (such as monster Ambush). Player respawning can now take place from monster respawn points which seem nicely distributed. The intention is that for SP maps which are obviously not set up for MP, items will be placed by code. Generally the level exit will be replaced by a teleport to start – much like Q1 did. This forms a loop of what is initially a linear map. Other item placement issues will be considered later – but what is most important is that the loading of ALL maps into MP works and makes sense.

COOP
=====

More work was completed on AI Brain, but essentially I need to work through each monster, making sure they do not assume a single SP player, and can instead attack one of a group of players. I am not worried about this at all.

I suggest that we have around three type of COOP: SP COOP (SP game with more than one player), MP COOP (ffa with monsters), and COOP Arena (all vs. monsters).

MOUSE
======

I have written my own mouse code, which reduces mouse lag, and adds mouse acceleration and smoothing as required.

MONSTER AND ITEM SCALING
========================

I added two more parameters to the \addthing and \addmonster commands, firstly the number of things/monsters added at once. This seems to lag out clients with larger numbers, so I may have to add them over several frames.

Secondly I added scale to both. It is great fun playing with the scale of various items. In fact our test map, DM_Boss, can quickly become too small, so Killua has made another test map without walls. A 200xscale Panzer_Demon for example is awesomely impressive. Even normal monsters resized to boss-size are worth seeing.

NEXT STEPS
==========

With interpolation out of the way, other fixes are relatively easy, so I should be quicker with them. There may be some hacks of the exe/dll I might want to do, but other than that you should see more progress soon!

PK++ Progress 15/01/07

NETCODE
========

Interpolation now works, although there is a small glitch I need to resolve which might be a rendering issue. Other than that play is smooth at 1 network frame per second, but much more reasonable at about 10-20. PCFs interpolation appears to be very wrong, and it is worth noting that it screws up servers to have it enabled too. Player pitch/yaw is also being interpolated but needs more work.

Extrapolation was added too, although we will need to play with this. It may be possible to auto-compensate for lag, both on the server and client. Extrapolation of course makes things slightly less smooth, but this can be controlled.

I have yet to play with item/weapon prediction.

I have to look at whether I can reduce the amount of data per player.

I also added all the netcode commands to console.

COOP
=====

Killua-chan provided an excellent map, although I believe PeTjA has some minor alterations.

It is possible to add a lot of the monsters already, but their code requires a listen server. Once I have perfected how to deal with multiple players using one monster, I will duplicate to all (probably via the AI Brain code).

My thoughts for COOP are basically either SP COOP or MP COOP, MP COOP perhaps more like ffa with monsters. I also thought about a COOP Arena gamemode.. where as a group of players you have to make it through progressively more difficult levels. Imagine DM_Boss with Thor to start, you have to kill him without you all dying, then level 2 is the same map, but with Thor and Panzer_Demon, and so on…

CODE
=====

Now is a good time to work on structuring the code better – so this is what I am doing, mainly the game and player code. I wish to use polymorphism rather than conditionals for custom gamemode responses (if you know what I mean). This will make thing a lot easier to make new custom gamemodes without screwing up existing code – an important method

PHYSICS
=======

At a glance it might be possible to try some new movement code, but we can try this later.

PKGUID
======

I am still yet to confirm whether I can obtain the CDKEY to MD5/RSA. Without it, making something unqiue generated from the game might be difficult.

DEMOS
======

Netcode improvements make writing this easier.

Progress on PK++

Guys, I thought it would be sensible to make more visable some of the progress being made on PK++. A small few were aware of the work going on, albeit slow, but there is no harm in making it more public.

My intention is to fix some of the issues as quickly as possible and update via PK++. My motivation is to add to the game as much as fix some of the important remaining issues.

If anyone is willing to help out, any contribution is more than welcome! Please contact me through kerberos99@hotmail.com or add me on msn from that address.

Progress on PK++

Guys, I thought it would be sensible to make more visable some of the progress being made on PK++. A small few were aware of the work going on, albeit slow, but there is no harm in making it more public.

My intention is to fix some of the issues as quickly as possible and update via PK++. My motivation is to add to the game as much as fix some of the important remaining issues.

If anyone is willing to help out, any contribution is more than welcome! Please contact me through kerberos99@hotmail.com or add me on msn from that address.