The case of the immortality hack.

Hi!

Wanted to share a short story on how strange game development can be sometimes.

For a while now the game has been suffering from a strange immortality bug. Sometimes, seemingly random, the game puts players into “godmode”, unable to receive damage. Big oops!

When i develop for LBZ, i use cppcheck, valgrind, and internal debugger, and GDB as tools to help me identify and fix problems. Usually i am helped by the fact that i have been working on this game for 15 years, so usually know what is happening pretty quickly. But not this weird immortality bug, my tools were telling me nothing, and my instincts completely failed me. Sometimes the solution just comes from a weird place… In this case it began with a hacked skype account:

LSDuck was receiving strange URL’s from one of his contacts and got in touch with him…

XXXXXXX: but u probably know about it?
XXXXXXX: block 0hp left?
Loozzer S. Duck: wait.. you know how to provoke it?
XXXXXXX: yeah
Loozzer S. Duck: it happens when you get killed while blocking?
XXXXXXX: no
XXXXXXX: it’s blocking while someone teleports to u

Great scott! I had been searching (for weeks) for a way to “trigger” the bug, and this guy just takes 5 minutes out of his day and gives us the answer! great!

So…. now we know how to make it happen: block on one character, then let another character teleport to him.
So i dive back into my tools, and start debugging. Several HOURS later i am convinced that it has something to do with setting the player variable “player_IsBlocking” to 1…. if i dont set it, it does not happen, and when i do set it… well… bug!
So i am working hard on debugging the engine, and then LSDuck starts searching in the moves…. A whole lot of confusion later, LSDuck says to me “I’ve found the problem, the teleport move has no damage configured. When i configure damage the bug is gone…”
Suddenly a light switches on in my mind, but i have to cook for my wife, so i can’t test my idea…. So i ask LSDuck to test which part of the damage configuration causes the troubles.
I cook, i eat, i do dishes, and i return to coding. LSDuck found out that the damage class setting triggers the bug. He can even make kiballs, that make whomever they hit immortal! (hmmm might be a feature here!)

So…. what made the players immortal? When you block a move, the damage given to you is divided by the damage class… when the damage class was not configured it stays zero… so your damage gets divided by zero. This produces infinity. Boom! Player with infinite health…

Lesson learned: “Always have sensible defaults for when things are not configured!”

As LSDuck said: “here’s a quote: the ways of the universe are weird…”

8882: Less crashes, more speed.

Hi folks!

Just a quick update:

Improvements:

  • More speed @ startup (5 seconds on a proper linux machine)
  • Network protocol timeout, if communication goes wrong, the match gets ended instead of confusing and weird.

 

The following problems were fixed:

  • A crash at the “upgrading” screen was fixed, if you cant update, see https://lbz3d.com/updaterfix
  • Crash when using certain moves that utilize the damageplayer function
  • Window can open off-screen
  • A potential crash when logging into the chatroom
  • A crash when exiting a level has been addressed  Sadly, this one still happens
  • Network protocol error resulting in communication breakdown on levels with destruction
  • Some event scripts were called wrong, this crashed, now it just stops the script.

 

Hope this helps some of the folks  that had to deal with a crashing game!

 

8875: “Go forth and cache no more!” he said…

Hi folks,

 

Update 8875 has been released. This update includes a whole bunch of bugs fixes.

I refactored the engine to not use disc based cache anymore, the cache was causing problems and crashes and the speedup from cache was very little (saved 2 seconds startup time).

Also, most of the string usage now uses more modern c++ styled strings instead of char * arrays.

For the team i included:

  • Better move positioning handling: engine will not override your settings anymore.
  • Word highlighting in the editor. (click a word in LGS, it highlights.)
  • Move graphics can now be defined in move XML with a single <graphic> tag… and inlining LGS works here.
  • Re-did water rendering to stop it from crashing on 32Bit systems.

Long story short: Game should be more stable now, enjoy!

8873: A simpler updater

Hi folks.

I uploaded a new update that should improve future updates.  By simplifying the updater process we are hoping to prevent another 8838 disaster.

I also noticed pretty late (sorry about that) that the version uploaded to indiedb.com was not updated correctly. This has been corrected. If you have been struggling to get the the game updated, this should help you.  Go to https://lbz3d.com/updaterfix for instructions if you need more help.

For the rest this has mostly been a bug-fix release.

  • Fixed a crash when a wrong resolution is entered into the config file
  • Sphere’s are rotated properly again.
  • The corescripts library gets loaded more carefully, this should help people who are developing for the game.