The Newscast Atlantis
Developers' progress records and announcements.

Page 1 of 3

[Full-blown networking with latency hiding for physics is ready. Also, successful deep cloning of b2World!]
[10.10.2016] // 21:55 (Be the first to comment!)

After numeruous experiments and tweaking, I've achieved some really nice, experimental latency hiding for multiplayer physics!



This was recorded with 100ms worth of ping and 1% packet loss.
Sure, the boxes happen to jump back and forth (due to corrections of mispredictions), but it is still perfectly playable.
You can have dynamic shells, twisting motorcycles, monstrous trucks, erratic players - movement of all is smoothed out nicely.
The hits from my perspective are also more or less counted as they touch the other bodies.
I can assure you that the clients controlling other characters see the bullets hitting their bodies exactly, and not some wall elsewhere.
Also notice how there is no twitching at all when hugging other players (even though they are completely unpredictable).
The other characters are automatized clients with randomized movements (sigh sigh my artificial friends).

Okay then, somebody wants to 1v1 me in my game?

I will write a thorough article about the guts of my netcode in some future if the project receives enough attention.
Important are the pros and cons of my architectural decisions:

+ Making new gameplay features work through the network requires no effort. Praise component-based design, metaprogramming magic and input-based networking.
The exception to that is physics - here, you'd definitely want some dedicated lag concealment techniques. Well, it would still *work*, but reconciliating physical mispredictions without further care looks ugly on the screen.
+ Minimal bandwidth, owing again to determinism of the simulation. 99% of the time, only client inputs are transported.
You could have 10000 continuously moving crates and bullet shells and you'd still be perfectly able to host a server for a dozen of players on an average home network.
- Private state (for example inventory of remote characters) is hard and ugly. This is because to preserve determinism, the client needs the whole state of the simulation.
It will be easy to peep into somebody's backpack, at least in the early versions. I will someday come up with a nice workaround.
+ Impossible to cheat otherwise, unless you write hacks that roughly predict the future state of the simulation and direct the shots accordingly. I guess such hack would be very hard to get right,
but if somebody comes up with one, I hope they publish the source code so I can make it into a badass boss.
+ The player with less ping has the advantage, which I believe will come in handy in an MMO setup.
We totally don't want absurd bullets hitting us because a certain somebody with terrible connection is authoritative over his bullet hits.
- Some bullets however noticeably miss remote players, but it is only the case with bad connections. In particular, that effect is not proportional to the victim's ping, but to yours (the shooter's) only.
+ Exact extrapolation when the client inputs stop changing for RTT worth of steps. It means that if your victim keeps the move-forward button pressed for a while (perhaps escaping in panic),
your hit is scored exactly as it happened on your screen. This also means that if two or more friends ride trucks next to each other whilst continuously accelerating (so just holding one button without interruption),
all see the exact same positions/velocities as they happen on the server in the present (again regardless of the network conditions),
in particular when the cars are more ballistic (like trucks totally are) the players are easily able to align the fronts so as to ride in a formation.
+ Lagless experience (and I mean completely undistinguishable from local single-player) whenever remote players are far away from your character. Even with 3000ms worth of ping.
That's right, embrace flawless gameplay (including grinding with the deterministic AI) when playing alone at nights on the server (or when the others are somewhere completely else).


[Read more...]



[Working connection (ENet), delta compression, stress tests of determinism]
[31.08.2016] // 01:59 (Be the first to comment!)

And so I've teached them simulations to talk to each other.
To revisit my protocol code, two years old at that, was surely a fascinating journey into myself of time past.

As a result, I've already been able to ride a truck with two of my friends as passengers.

There's a catch however: I am still working on client-side input prediction.
This is not at all simple to get right in a game with this kind of dynamics, not to mention physics-based projectiles.
If I let the client be autoritative over bullet collisions...
...as a victim you'll be getting damage even though the bullet flew somewhere else on your screen;
to make it worse, the attacker may even be facing a completely different direction.
These problems arise because the other player sees the past version of you.

Contrary to FPSes, this is a 2D game -
canvas reveals way more imperfection than a 3D world with huge horizons and blazingly fast bullets.

I did this before; it was the scripted (Lua) version of Hypersomnia and it worked not that bad.
If I don't come up with something fancy (like, some astral body being a reflection of the past self?), I will stick to the good old approach and live with the consequences.


(In case you're wondering, yes, I love to have these messy figures from the profiler all over the place.
I recognize it as a form of beauty. I've even redirected the console output to text rendered in-game, as seen in right top corners)


The screenshot above is nothing else than a test of two independent client simulations connected to a local server,
all three in a single process, so tapping F5 once in Visual Studio completely setups my cosmic laboratory.
(The connection is powered by ENet networking library. I will not be using RakNet anymore.)

Here I must necessarily brag about my architecture (or put more gently, my habit to keep the code reasonably clean),
for I am perfectly able to deterministically replay both the server and the two client sessions visible on the screen.

[Read more...]



[Refactoring complete, Linux port arriving soon, working save/load]
[25.07.2016] // 18:20 (Be the first to comment!)

After two months of intense labour, I have finally launched Hypersomnia again!

Throughout this seemingly neverending treatment, the following has been achieved:
  • Made significant state of the simulation devoid of pointers and references (except containers), enabling trivial duplication and serialization.
  • Provided constness guarantees for access to entities and components, ensuring that the model stays unalterable during rendering-time, further enforcing determinism of the simulation.
  • The concerns of an entity and definition thereof were gracefully disentangled owing to my paradigm.
  • Practically the whole entity-component-system became type-safe (on the fundamental level).
  • I learned a whole lot of metaprogramming which may or may not be considered an advantage.
  • Unfortunately, GUI is only partially refactored. Static polymorphism turns out to be a handful, so GUI is temporarily disabled. I will come back later to it.

[Read more...]



[Founded a GitHub organization and moved all repositories]
[12.06.2016] // 17:23 (Be the first to comment!)

Official Github Organization for Hypersomnia Developers
(https://github.com/TeamHypersomnia)



From now on, all repositories currently worked on will reside in the organization.

I know well it's been a while since you've heard from me, but please be patient!
The engine is currently undergoing some architectural breakthrough necessary for serialization and networking.

I've got everything planned though.

By the way... I can already have a nice fight...

[Read more...]



[HUD progress, health, death, healing, aimpunch, improved recoil]
[02.05.2016] // 00:34 (Be the first to comment!)

On to the next account of progress.

I've implemented a working prototype of sentience system.
A sentient entity is that which may receive damage from a hostile force;
if its health value drops to zero or less, it dies necessarily.

I also thought that, at this point, it'd be nice to draw the current health value of each sentient being, close to where it is currently on the screen.
Great - how am I going to position a rectangular bar sprite along a possibly rotating object,
while still being able to tell which one belongs to whom (especially in a crowded area)?
The answer: circular HUD to the rescue!



[Read more...]



[Firearms progress: recoil, traces, particle effects]
[21.04.2016] // 01:22 (Be the first to comment!)

That was quite a break from posting.
I wanted to complete several things before this write-up.

First and foremost, firearm recoil!
The crosshair gets an invisible physical body to whom I apply an impulse whenever a shot is fired.
It is completely deterministic so you could basically learn the force pattern:




In the clip above, my mouse controller remains motionless all the time.
The...

[Read more...]




Page 1 of 3
Total posts: 13

Notify me of new posts via e-mail: