I made a damage & healing system including bandaging yourself. It looks really cool. Right now there are standard bullet wounds and fall damage. This slows very much the movement of the player and affects aiming. I’d like to expand this later with stuff like internal organ damage, bleeding, bone fractures. All of these could be healed with proper medical tools.
Posts from August 2010
This stuff is fascinating. It seems Carmack & the ID guys made a better approximation hack for sqrt than a theoretically correct approximation made by a mathematician. This is I think Carmack’s essence, he just makes stuff that works.
Particle optimization is better than sex. I definitely like doing it :). The new particle rendering code is a 100 times faster. The trick was to sort the particles according to texture not just render them as they go. Switching textures on the GPU is very costly!
As a bonus you can see on this video also some of the dustprocessor inferno effects.
This took me 7 hours:)
I’ve been since always dreaming about a different approach to game programming in terms of guns. I wanted to simulate the whole soldier and his weaponry. So a gun would not just have a variable ‘ammo’ but it would have an object attached to it called ‘clip’. Furthermore ‘clip’ would have bullets attached to it. All the aspects of a gun would be objects that could be manipulated and moved around. This isn’t so hard to do but it requires a lot more memory and a lot more network bandwidth. Because instead of requiring 2 bytes for ammo count, just to hold the ammo in the gun you would need 4 bytes for a pointer to the clip + at least 1 byte for each bullet inside the clip. Seems bad but the benefits are enourmous:
– the soldier actually carries the clips with him, so you can render them hanging on his ammo belt and render how he grabs the clip and puts in the gun (awesome!)
– different kinds of clips, different sizes, different gunclip types
– each clip can have different kinds of bullets
– you could possibly micromanage the clip load with whatever bullets you want
Furthermore the bullet is not something created by the gun when fired it is an object too that sits in the clip. And when the gun fires the bullet object just flies out of the muzzle. You could possibly even modify each bullet by changing the tip of the bullet to make a dum-dum bullet, make it more narrow for a more piercing effect or manipulate the gun powder – replace the gunpowder with a different mixture or decrease the amount of powder so the bullet is more quiet when shot.
This has been a dream of mine for a long time and I am moving towards this with Link-Dead. Clips and grenades are already managed like this but I want to try the bullets idea too…
I had a dream last night that Link-Dead was a 4 player online co-op game. The 4 players were a heavy dude, a hacker, a soldier and a scout. It was sort of like the A-Team were there are relationships between the characters. One is wacky, the other on doesn’t like flying and doesn’t like the wacky one etc. The gameplay was sort of like Lost Vikings, it was pretty cool, especially with the scripting were you could change events in real-time by applying new scripts. But it’s just a dream. Btw. I’m seriously considering changing Link-Dead’s name to sth else because on first glance it brings too much resemblance to Left4Dead. This is a big NO.
Death to the nonbelievers! Finally I can drink a beer for my efforts!
This is a video showing the new netcode. First I run it without any lag just to show how it works “perfect”. Then I run Quality of Service, a program that simulates a real internet network, to simulate a 400-500ms ping and 25% out-of-order (dropped) packets. This is an environment nobody should attempt playing. Watch the video to see how it works.
For the whole week I was attempting to make a very precise algorithm to deal with smoothness. It worked on paper but not in the game. The animations and movement were very choppy. Finally I made a heuristic-like approach. It seems an approximation is always better than the real thing. This seems to correspond with Carmack’s experiences (http://www.fabiensanglard.net/quakeSource/johnc-log.aug.htm). Although I use a completely different algorithm than in any FPS game. I update the players only based on the key strokes and mouse controls. A full update based on the servers data is made only if the position or other important variables change “significantly”. The measure of this significance is a matter of a good guess. This method “just works” as you see on the video. The errors appear because of packet loss. But they are very quickly fixed and the game can continue.
The netcode is still not complete. There is a lot I have to do in terms of syncing game objects, weapons, bullets etc. I will be doing this in the following week.
All my methods of net sync smoothness fail, this is a really hard task. Finally I got some good results from using an improved method I did in Soldat. Which is: update the client players from the info from server if and only if the position of the player changes *significantly*. This, as Carmack would say, “just works”.
I’ve hit a point where most people decide to quit. 3 days of pain and no results. I’m really struggling with making the netcode work good. There is just too much detail in this game, especially the animations and movement system. But I’m gonna plow through it and make it work, sacrificing my health and sanity.