Skip to content
View vtxe02023274's full-sized avatar

Block or report vtxe02023274

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
vtxe02023274/README.md
Leng Niu: game server developer, netcode, protocols and 2D game tools

English · 繁體中文

About me

  • I work on the server side of online games: network protocols, game logic, in-game economies and the tools that keep a live server running
  • I build netcode for real-time games: authoritative servers, client prediction, lag compensation and bandwidth tuning
  • I make 2D game asset tools for maps, sprites and bitmap fonts that run in the browser or on the command line
  • I work with MySQL / SQL Server for game data: schema design, backups and performance

Featured projects

Authoritative server for 2D side-scrolling multiplayer: client prediction with zero corrections, interpolation, lag compensation, delta snapshots and view culling.

TypeScript WebSocket · Live demo

Describe game packets once in YAML, including bit fields and conditional fields, then generate encoders and decoders for Java, C#, TypeScript and C++, a Wireshark dissector and a reference document. diff flags changes that break old clients and fuzz writes test corpora.

TypeScript Java C# C++ YAML

Isometric and staggered map editor in the browser. Reads and writes Tiled maps and renders them pixel for pixel like Tiled.

TypeScript Canvas · Live demo

View Aseprite files and export sprite sheets, GIFs per tag, scaled and per layer, in the browser or from the command line.

TypeScript CLI · Live demo

More: fntview (BMFont bitmap font viewer and converter, SDF / MSDF) · tiledcheck (lint Tiled maps locally or in GitHub Actions)

Open source contributions

85 merged pull requests, including:

  • phaserjs/phaser#7404: getTileAtWorldXY on staggered maps returns the tile under the point; odd rows were one tile off and the top half of a tile often hit the row above
  • pixijs/pixijs#12324: add a safariFontDelay option so HTMLText can skip the fixed 100ms font wait in Safari
  • colyseus/schema#245: reject collections of collections with a clear error when the schema is defined
  • WerWolv/ImHex#2936: the pattern language accepts the Instruction type in every syntax, not only default
  • NLog/NLog#6380: parse integer literals outside the Int32 range in conditions instead of throwing OverflowException
  • yhirose/cpp-httplib#2703: a Range request skips the ranges that start past the end of the content and answers 206 with the rest, as RFC 9110 says, instead of rejecting the whole set with 416
79 more
  • melonjs/melonJS#1759: place tile objects on isometric maps where Tiled draws them
  • melonjs/melonJS#1766: project isometric collision shapes with the map tile ratio instead of a fixed 2:1
  • diasurgical/DevilutionX#8808: fix the build with UNPACKED_MPQS=ON by always including the mod identity header
  • adamhathcock/sharpcompress#1497: flush the final block when a DeflateStream is disposed with leaveOpen: true
  • fallahn/tmxlite#187: resolve tileset and template paths relative to their own file so templates in subfolders load
  • philterd/phileas-dotnet#200: stop the ZIP code filter from flagging five digits hyphen-joined to a longer identifier such as 2026-00847
  • mini-software/MiniExcel#1052: honor ReadEmptyFieldsAsDefault for CSV files read with a header row
  • MapsterMapper/Mapster#1036: escape control characters in char and string constants so translated expressions and generated code compile
  • RevenantX/LiteNetLib#621: cut strings before a surrogate pair when truncating to maxLength so NetDataWriter no longer throws on emoji at the limit
  • ncalc/ncalc#645: keep Guid values in ToExpressionString output instead of dropping them
  • quartznet/quartznet#4363: a calendar with no base calendar no longer equals the same calendar layered over one, making the six calendar Equals symmetric
  • mini-software/MiniExcel#1059: strip enclosing quotes before unescaping CSV fields so fields made only of quotes round-trip
  • kaplayjs/kaplay#1184: make AudioPlay.time() follow playback speed, detune and seek instead of reporting a stale position
  • porsager/postgres#1286: retry a LISTEN reconnect when its first attempt fails
  • nissl-lab/npoi#1938: XSSFWorkbook.ForceFormulaRecalculation keeps the value that was assigned
  • quartznet/quartznet#4380: port the symmetric calendar Equals fix to the 3.x line, shipping in 3.22.11
  • ncalc/ncalc#646: escape quotes, backslashes and line breaks when serializing string literals, so ToExpressionString output parses back
  • RevenantX/LiteNetLib#622: throw instead of silently writing a wrapped length when an array has more than 65535 elements for its ushort length header
  • quartznet/quartznet#4398: calendars in different time zones no longer compare equal, so the five typed calendar Equals check TimeZone like BaseCalendar does
  • adamhathcock/sharpcompress#1503: write tar mtimes before 1970 or after 2242 in base-256 for GNU format instead of overwriting the size field, and read GNU tar's base-256 times
  • fallahn/tmxlite#188: zstd-compressed tile layers no longer fall through to the zlib path, so maps saved with zstd load their tiles
  • mini-software/MiniExcel#1066: column names past IV, such as IW and XFD, now resolve to their real column index instead of failing
  • xoofx/Tomlyn#143: write the fractional seconds of DateTime and DateTimeOffset values, so sub-second times round-trip instead of being cut to whole seconds
  • xoofx/SharpYaml#182: decimal members read with UseSchema keep their full precision instead of going through double and stopping at about 15 digits
  • scriban/scriban#695: string.slice1 and the Liquid slice filter return an empty string when a negative start lands before the string, instead of throwing
  • duckdb/duckdb-node-neo#538: DATE infinity values print as infinity and -infinity, matching DuckDB, instead of as dates one day past the DATE range
  • fallahn/tmxlite#189: stop on truncated zlib data instead of growing the buffer until allocation fails, and stop reading past the end of short base64 layer data
  • genaray/Arch#324: exclusive queries no longer match archetypes that also have a component whose id sits in a higher bitset word, which showed up once a project had more than 32 component types
  • mini-software/MiniExcel#1067: the data reader's GetChars returns the field length when called with a null buffer, as IDataRecord documents, instead of always returning 0
  • duckdb/duckdb-node-neo#547: TIMESTAMP_S and TIMESTAMP_MS infinity values print as infinity and -infinity, matching DuckDB, instead of as out-of-range timestamps
  • adamhathcock/sharpcompress#1506: tar entry names, link targets and the ustar prefix keep their leading and trailing spaces instead of being trimmed, so entries such as " notes.txt" and "notes.txt " no longer collapse into one file
  • perpetualKid/GetText.NET#60: fix the built-in plural rules for Arabic, Icelandic and Tachelhit, so counts such as 103, 21 or 0 pick the right translated form
  • ncalc/ncalc#648: ToExpressionString writes DateTime values in a form the #...# date literal parser accepts and keeps milliseconds, so expressions with dates parse back in 12-hour cultures too
  • colyseus/schema#261: encode a lone surrogate (a string cut in the middle of an emoji) as U+FFFD so the length header matches and the values after it decode correctly
  • fallahn/tmxlite#190: read tile probability as Tiled's relative weight, so fractional weights such as 0.5 no longer become 0 and a weight of 2 no longer ranks below the default
  • fallahn/tmxlite#191: text objects without a color attribute default to black like Tiled, so text drawn with Tiled's default color no longer loads as white
  • mini-software/MiniExcel#1072: CSV rows with more fields than the header row, such as a trailing separator, now leave out the extra fields instead of throwing KeyNotFoundException
  • philterd/phileas-dotnet#204: the redaction format replaces %l with the label or an empty string and supports %v for the original value, instead of leaving both in the output
  • perpetualKid/GetText.NET#61: GetParticularPluralString fills the count into the translated string like GetPluralString, and GetParticularString uses the catalog's FormatProvider, so context plurals no longer show a raw {0}
  • Hexagon/croner-rust#94: cron descriptions say "every N" only when a stepped field holds the same values as */N, so ranges such as 1-6/2 are no longer described as every 2 months
  • adhocore/gronx#88: an open-ended weekday step such as 1/2 runs up to 7, so it now also matches Sunday like 1-7/2
  • perpetualKid/GetText.NET#62: compiled plural rules evaluate && and || as short-circuiting logical operators like the interpreted rules, so 2 && 4 is true and a guarded division by zero no longer throws
  • Hexagon/croner-rust#98: cron descriptions no longer call a step wider than its field "every N", so */100 minutes reads as minute 0, and every second or minute of stepped hours reads "Every minute, of every 2 hours"
  • mini-software/MiniExcel#1076: the exception for too many empty cells in a range names OpenXmlConfiguration.MaxSynthesizedCells and how to turn it off, and the limit is documented in the README and upgrade notes
  • perpetualKid/GetText.NET#63: plural rules give <, >, <= and >= higher precedence than == and != like GNU gettext, so 3 != 2 < 1 evaluates to 1 instead of 0
  • Hexagon/croner-rust#99: cron descriptions of a stepped year range name its years, so 2024-2030/2 reads "every 2 years from 2024 to 2030" instead of dropping the range
  • RevenantX/LiteNetLib#627: NetPacketProcessor writes a null array of nested, INetSerializable or delegate-registered types as an empty array instead of throwing NullReferenceException
  • mini-software/MiniExcel#1080: template fill keeps merged ranges whose top-left cell has no <c> element, such as blank cells written by ClosedXML, instead of dropping them
  • yhirose/cpp-httplib#2702: the Digest auth client matches challenge parameter names case-insensitively, so Realm, Nonce or Algorithm=SHA-256 are no longer ignored, which made the client give up or fall back to MD5
  • ncalc/ncalc#656: an escaped backslash before u stays a literal backslash, so 'C:\\users\\u0041' evaluates to C:\users\u0041 again instead of C:\usersA, and serialized strings with such text parse back
  • RevenantX/LiteNetLib#628: NetSerializer throws when a nested-type array or list has more than 65535 elements instead of writing a wrapped count and every element, which shifted all following fields on the reading side
  • perpetualKid/GetText.NET#64: plural rules with tokens left after the expression, such as n 1 or n != 1), are rejected instead of silently cut short, and a .mo file with an invalid rule leaves the catalog unchanged instead of half loaded
  • Hexagon/croner-rust#100: cron descriptions of a list of steps use the values it matches, so /3,/6 reads as every 3 minutes instead of listing all 20 minutes, and stepped lists covering the whole field, such as */2,1-59/2, read as every minute
  • porsager/postgres#1356: dates before year 1 and after year 9999 are sent in the form PostgreSQL accepts (year 0044 BC, 10000), so a value read from the database can be written back
  • fallahn/tmxlite#192: template instances keep their own rotation, visibility, tile and text even when the value equals the default, like Tiled, so an instance can undo a template's rotation or hidden flag
  • Thraka/SadConsole#384: lowering a ScrollBar's maximum clamps its value, so removing items from a ListBox scrolled to the bottom no longer throws IndexOutOfRangeException
  • fallahn/tmxlite#193: image collection tiles that use only part of their image (Tiled 1.9+) read their sub-rectangle position and size instead of the whole image
  • perpetualKid/GetText.NET#65: the extractor writes an interpolation's alignment the way it is formatted at run time, so $"{x, 10}" is extracted as {0,10} and finds its translation, and a nested interpolated string no longer lends its alignment or format to the outer one
  • porsager/postgres#1363: a max_pipeline below 1 is read as 1, so with max_pipeline: 0 (the v3 way to turn pipelining off) queries waiting for a connection are sent instead of hanging forever
  • fallahn/tmxlite#194: the legacy terrain attribute of a tile keeps its empty corners, so values such as 0,,, or ,,0, read as four corners with -1 for the empty ones instead of shifting into the wrong places
  • phaserjs/phaser#7401: BitmapText and DynamicBitmapText round their glyph vertices like other game objects, so text at fractional positions is sharp with roundPixels: true
  • phaserjs/phaser#7403: a tile with flipY on a WebGL tilemap layer is flipped in place instead of being drawn off to the side
  • phaserjs/phaser#7406: the camera's worldView uses the camera origin, so with zoom and an origin other than 0.5 culling works on the area that is actually rendered
  • phaserjs/phaser#7407: a nested Container drawn after a sibling with its own blend mode no longer picks up that blend mode
  • phaserjs/phaser#7408: createFromObjects places objects on isometric maps where Tiled shows them, for any tile ratio, with tile objects anchored at their bottom center
  • phaserjs/phaser#7409: getTilesWithinShape works on isometric layers, testing each tile's diamond instead of returning an empty list
  • chickensoft-games/GodotEnv#316: installs Godot 4.8 and newer on macOS, which ship separate arm64 and x86_64 editors instead of a universal build
  • porsager/postgres#1365: a helper in a set or select list builds after an earlier item that uses case, and, is, left() or filter (...), instead of throwing x.replace is not a function
  • yhirose/cpp-httplib#2704: a multipart part whose filename* carries a language tag (UTF-8'en'%41.txt) is accepted as RFC 8187 allows, instead of failing the whole request with 400
  • MapsterMapper/Mapster#1042: negative constants and unnamed enum values stay one operand in generated code, so (DayOfWeek)(-1) and (-5).ToString() no longer turn into a subtraction or a negated string that does not compile
  • fallahn/tmxlite#195: infinite maps saved with the XML layer format now load the tiles inside their <chunk> elements instead of coming back empty
  • mini-software/MiniExcel#1081: aaa, aaaa (day of the week) and e (era year) are read as date codes, so formats such as m/d (aaa) and e/m/d return a DateTime instead of the serial number
  • yhirose/cpp-httplib#2707: If-Range with a date resumes a download only when the date matches the file's Last-Modified exactly, as RFC 9110 requires, so a file replaced by an older one is sent in full instead of as a mismatched range
  • mini-software/MiniExcel#1083: template fill keeps the sheet's conditional formatting instead of dropping every rule
  • adamhathcock/sharpcompress#1514: ZipArchive reads the Unix modification time from the central directory UT field written by Info-ZIP, so it matches ZipReader instead of falling back to the local DOS time
  • dynamicexpresso/DynamicExpresso#379: parse exponents in float and decimal literals such as 1e3f and 2.5e-3M, and .5d, like C#
  • fallahn/tmxlite#196: work out a tileset's columns from the image width like Tiled when the columns attribute is missing, so maps saved by Tiled 0.15 or older no longer crash with a division by zero
  • perpetualKid/GetText.NET#66: the extractor escapes an interpolation's format clause like the rest of the message id, so $@"{time:hh\:mm}" no longer writes an invalid \: escape that msgfmt rejects
  • yhirose/cpp-httplib#2708: a redirect to the same host in different letter case (localhost to LOCALHOST) counts as the same origin, so the client's auth and Cookie headers are kept instead of being stripped as for a cross-host redirect

Tech stack

Java C++ C# TypeScript Node.js Netty MySQL SQL Server Windows Server


繁體中文

專注在線上遊戲的伺服器端:封包協定、連線同步、遊戲邏輯與營運工具,也做網頁和命令列都能用的 2D 遊戲素材工具。

專案 說明
sidescroll-net 橫向捲軸多人連線的權威伺服器:客戶端預測、內插、延遲補償、快照差量與視野裁切(線上試玩)
pktspec 用一份 YAML 描述遊戲封包,產生 Java、C#、TypeScript、C++ 讀寫程式、Wireshark 外掛與文件
isotiles 網頁版等角與交錯式地圖編輯器,讀寫 Tiled 地圖(線上試用)
aseview Aseprite 檢視與匯出 sprite sheet、GIF,網頁與命令列都能用(線上試用)

其他作品:fntview、tiledcheck(說明見上方英文區)。已有 85 個 PR 合併進 Phaser、PixiJS、ImHex、NLog、cpp-httplib 等開源專案。

如果有幫到你,歡迎點個星星 · If something here helps you, a star is always appreciated

Pinned Loading

  1. aseview aseview Public

    View Aseprite files in the browser and export sprite sheets, GIFs and per-layer sheets that Phaser and PixiJS can load

    TypeScript

  2. fntview fntview Public

    View, check, convert and make BMFont bitmap fonts in the browser, including SDF and MSDF

    TypeScript

  3. isotiles isotiles Public

    Isometric and staggered tile map editor in the browser that reads and writes Tiled maps

    TypeScript

  4. pktspec pktspec Public

    Describe game packets once in YAML, with bit fields and conditional fields, then generate Java, C#, TypeScript and C++ codecs, a Wireshark dissector and docs, plus diff and fuzz tools

    TypeScript

  5. sidescroll-net sidescroll-net Public

    Authoritative server, client prediction and delta snapshots for 2D side-scrolling multiplayer games

    TypeScript

  6. tiledcheck tiledcheck Public

    Check Tiled maps for missing files, out of range tiles and other problems before they reach your game

    TypeScript