Zum Hauptinhalt springen
LIVE
CVSS 8.7CVE-2026-138346 | In Y Soft SAFEQ Cloud PC Client for Windows and macOS before 2026.09.03.4, under specific conditions, an attacker who already has access to a workstation running the PC Client, and who has specific knowledge of the customer's environment and the targeted workstation, could access files on another workstation running the PC Client within the same organization, including locally stored print jobs (local storage or hybrid mode). Access from outside the customerCVSS 9.4CVE-2026-138199 | A vulnerability was found in D-Link DIR-629 1.03.B01 CN. This affects the function dhcps4start of the file /etc/services/DHCPS/dhcpserver.php of the component DHCP Server. The manipulation of the argument domain results in os command injection. The attack may be performed from remote. The exploit has been made public and could be used.CVSS 5.3CVE-2026-138170 | A security flaw has been discovered in itsourcecode Event Management System 1.0. This issue affects some unknown processing of the file /admin/view_event.php. Performing a manipulation of the argument ID results in sql injection. The attack may be initiated remotely. The exploit has been released to the public and may be used for attacks.CVSS 5.1CVE-2026-138169 | A vulnerability was identified in itsourcecode Insurance Management System 1.0. This vulnerability affects unknown code of the file updateNominee.php. Such manipulation of the argument nominee_id leads to sql injection. The attack can be launched remotely. The exploit is publicly available and might be used.CVSS 5.3CVE-2026-138168 | A vulnerability was determined in itsourcecode Insurance Management System 1.0. This affects an unknown part of the file updateClient.php. This manipulation of the argument client_id causes sql injection. The attack can be initiated remotely. The exploit has been publicly disclosed and may be utilized.CVSS 4.8CVE-2026-138167 | A vulnerability was found in OpenHands software-agent-sdk up to 1.64.1. Affected by this issue is the function FileSettingsStore.load of the file openhands/agent_server/persistence/store.py of the component agent_server. The manipulation results in incorrect authorization. Attacking locally is a requirement. The exploit has been made public and could be used.CVSS 6.9CVE-2026-138166 | A vulnerability has been found in wxiaoqi Spring-Cloud-Platform up to 3.0. Affected by this vulnerability is the function RsaKeyHelper.generateKey of the file ace-modules/ace-admin/src/main/resources/application.yml of the component JWT Authentication. The manipulation of the argument rsa-secret leads to use of hard-coded cryptographic key . It is possible to initiate the attack remotely. The exploit has been disclosed to the public and may be used. The proCVSS 10.0CVE-2026-138165 | A flaw has been found in D-Link R15 up to 1.22. Affected is an unknown function of the file /flupl/nodered of the component Upload Handler. Executing a manipulation of the argument filename can lead to os command injection. The attack may be performed from remote. The exploit has been published and may be used.
Alle im Drawer
Intelligence View
⚡ tsecurity.de Intelligence

Browser strategy game backend: no tick loop

Old Light is a browser strategy game: a whole galaxy you play in a tab, with star systems to claim, an economy to grow, fleets to build, and other players…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Quelle & Fakten · 9 Min. Lesezeit
Quelle: dev.to
Rubrik: Sichere Programmierung

Old Light is a browser strategy game: a whole galaxy you play in a tab, with star systems to claim, an economy to grow, fleets to build, and other players (plus the AI empires that live alongside them) to fight for territory. This post is about what you don't see while playing: the backend that keeps it all running.



Three things make that backend tricky, and almost every decision below comes from one of them.





  1. It's real-time. There are no turns. Your economy keeps growing and your fleets keep moving even after you close the tab, so the server has to keep the world running on its own.


  2. The browser is the client, and you can't trust it. Anything the browser sends could be faked, so the server, not the client, decides what is true.


  3. It has to scale. I want it to hold around 1000 players at once. Each player is also surrounded by AI empires (roughly three per human), so 1000 players really means about 4000 active "actors" in the world. Every feature has to survive being multiplied by that number.



Here are five decisions that shaped the backend. The whole stack is TypeScript: Express, Postgres (via TypeORM) and socket.io on the server, Pixi.js on the client.






The economy has no tick loop



The obvious way to run a live economy is a timer that fires every second and adds resources to every star. That approach falls over once the world gets big: 4000 actors, each with several stars, updated every single second, forever, even for players who are offline and not looking.



So there's no timer. Instead, resources are calculated when someone asks for them. Each star saves two things: its last known balance, and the time that balance was saved. When you need the current value, the server does simple arithmetic:




current = saved balance + (rate per minute × minutes since it was saved)






capped so storage can't overflow. Stripped to its core, the function is:




project(star, now = new Date()) {
const cap = storageCap(star);
const ratePerMin = productionRate(star); // summed from the star's buildings

const minutesElapsed = (now.getTime() - star.settledAt.getTime()) / 60_000;
const balance = Math.min(cap, star.balance + ratePerMin * minutesElapsed);

return { balance, settledAt: now };
}






No timer touches the database. We only save a new balance on the rare occasions when something actually changes the rate, like finishing a building upgrade. Reading the value never writes anything.



There's a catch hiding in that formula. "Balance plus rate times time" is only correct if the rate held steady for the whole stretch of time, and in Old Light it often doesn't. Finishing a building raises its energy upkeep, and if that tips a system into an energy deficit, its income rate drops until you build enough power to recover. So the rate can fall partway through the very window you're projecting across.



If you naively multiply the current rate across the whole gap, you paint over that slow period as if it never happened and hand the player resources they never actually earned. The fix is to never let one projection span a rate change. The moment anything changes the rate, the server first settles: it banks the accrual at the old rate, up to that exact instant, and saves it. Only then does it apply the change. Every projection after that starts fresh from the boundary, so each stretch of time is only ever multiplied by the rate that was really in effect.






The client is hostile



The frontend runs on the player's own machine, so I don't really control it. Anyone can open the browser's dev tools, read how it works, change values, and fire off whatever requests they like. The server treats every message as if it came from someone trying to cheat.



It never trusts what a request claims. A "build this on my star" message doesn't get to say who is sending it; the server takes the identity from the connection's own login, never from a field in the message:




// trusts the client to say who it is -> forgeable
const player = lookup(request.playerId);

// the player is whoever this authenticated connection belongs to
const player = connection.player;






Get that wrong and anyone can act as anyone else just by editing a number.



It also re-checks everything the client already checked, and confirms each request makes sense for the state of the game right now:





  • Can you afford it? The greyed-out button is a convenience, not a guard. The server works out the cost again before it builds.


  • Is the move even legal? You can't skip ahead and queue a jump to level 15 on a command center that's only level 10. The server accepts the next level up and nothing else.



And it decides what you're allowed to know. Public facts like who owns which star go to everyone, but your fleet size and your income are sent only to you, and to a rival only once they've scouted you. Hiding a number in the client is not hiding it: the only number a rival can't read is one the server never sent.






Combat is a pure function



When two fleets fight, the whole battle is decided by one plain function. No database, no shared state, just inputs and outputs:




function resolveBattle(input, rng) {
/* returns who survived */
}






input is the ship counts on each side. rng is the function that supplies randomness. That second argument matters more than it looks: in the real game we pass in Math.random, and in tests we pass in a fake "random" that returns a fixed, known sequence.



Since randomness is the only thing coming from outside, the function is completely predictable once you control it.



That makes tests that never flake. Feed in a known sequence and the exact survivor counts come out every time, so a failing test means a real bug, not bad luck.



It also makes a balance simulator possible. I can run the same function ten thousand times with real randomness to see how often each side wins, then tune the game before shipping a change. The test suite and the simulator run the identical battle logic.



Each shot is two coin flips, did it hit, then did it win:




if (rng() >= hitChance) continue; // missed
if (rng() >= winChance) continue; // hit, but lost the exchange
target.dead = true; // hit and won






And a scouting fleet with no warships skips combat entirely:




if (!hasCombatShips(input.attackerShips)) {
return {/* nobody fought, both sides unchanged */};
}









The AI empires are predictable on purpose



Old Light fills the galaxy with AI empires. They run through the exact same code as human players: same actions, same rules, same limits. The server never asks "is this a human or a bot?" because they are the same kind of thing.



Each AI's personality (offensive or defensive) and its speed aren't random and aren't stored in a column. They're computed from the world's seed number with a hash:




function empireIdentity(worldSeed, empireId) {
const coin = (hash(`${worldSeed}:identity:${empireId}`) % 10_000) / 10_000; // a number 0-1
return coin < 0.5 ? "offensive" : "defensive";
}






A hash turns text into a number that looks random but is always the same for the same input. So a given empire always lands on the same personality, with no clock, no live dice roll and no database lookup involved. Its character is fixed the moment it's born.



That same idea fixes a scaling problem. Updating every AI once a minute would mean a big spike of work all at the top of each minute. Instead, each AI is sorted into one of 60 buckets using the same hashing trick, and only one bucket runs each minute:




const thisMinutesAIs = allAIs.filter(
(id) => hash(`${worldSeed}:bucket:${id}`) % 60 === currentBucket,
);






Every AI still gets a turn about once an hour, but the work is spread smoothly across the whole hour instead of arriving all at once.






Every code path gets multiplied by 4000



My rule of thumb: take any new piece of code, imagine ~4000 actors hitting it, plus the biggest input a player could send. If that math is scary, the code is wrong. Three rules follow from that:



Don't load a whole table and filter in code. Ask the database for only the rows you need. To find jobs that are finished, query for "finished before now," which the database has an index for and can skip the rest:




findDue(now) {
return this.repo.find({ where: { completesAt: LessThanOrEqual(now) } });
}






Don't run a query inside a loop. To load data for 100 stars, make one query for all 100 and then look them up in memory, not 100 separate queries:




const resourcesByStar = await loadResourcesFor(starIds); // one query
return stars.map((s) => enrich(s, resourcesByStar.get(s.id))); // fast memory lookups






Don't tell everyone about everything. Sending a message to every connected player is expensive. Private updates (your money, your buildings) go only to you, and the server doesn't even build that update if you're offline:




if (playerIsOffline(player.id)) return; // nobody listening, skip the work
sendTo(player.id, buildPrivateUpdate(player));






Public news, like who now owns which star, goes out as a single shared message, never one message per tiny change.






What ties it together



The server owns the truth and stays cheap while thousands of actors lean on it, and it never takes the client's word for any of it. In practice that meant calculating values instead of ticking them, keeping the core logic in plain functions I could test and reuse, and treating randomness as an input rather than reaching for it mid-function.



You never see any of this while playing; it's all plumbing. The one piece you can feel is the last one: claim a star, build something, then close the tab, and your economy keeps accruing while you're gone. Come back tomorrow and the galaxy moved without you.






Play Old Light a real-time galaxy that keeps running while you're away. Claim your first system and see the backend from the player's side.

Information ergänzen Fachhinweis, Update, Korrektur oder Quelle zur Meldung beitragen
Gäste-Hinweise werden kurz redaktionell geprüft und danach hier angezeigt.

Community-Hinweise zur Meldung

0 freigegeben
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!
Informations-Bewertung:

💬 Community-Diskussion & Kommentare

🌐 Zum Hauptchat

Starte die Diskussion im Social-Chat Broadcast Stream oder reiche oben über „Information ergänzen“ einen Fachbeitrag ein.

Cyber Threat Intelligence & Forensik

ATT&CK-Navigator · IoC-Radar & Graph

CTI Threat Relationship Graph
Akteure · Techniken · Beziehungen
2 Knoten · 1 Relationen
CVE / Incident Threat Actor Software MITRE ATT&CK CWE Weakness IoC
Community Rating &amp; Social Proof
⭐ Leser-Wertung
–
Ø / 5.0
Noch keine Leser-Bewertungen
War dieser Artikel hilfreich?
0
Jetzt Bewertung abgeben
Detail-Bewertung (optional)
Inhalt & Qualität
Quelle & Glaubwürdigkeit
Aktualität
Security Briefing Kostenlos · 1-Klick-Abmeldung

Intelligence Digest — kostenlos

Täglich die wichtigsten Security-News · jederzeit abbestellbar

Verwandte Story-Cluster & Quellen (Vektor-KI)

6 Cluster
23 Quellen
CVE-2026-135540 | Mozilla Firefox up to 115.45/153.7/160 JIT memory corruption (Nessus ID 388625)
VulDB Updates vor 2 Std.
22 weitere Quellen
VulDB Updatesvor 2 Std.CVE-2026-135539 | Mozilla Firefox up to 115.45/153.7/160 CSS Object Model use after free (Nessus ID 388625) VulDB Updatesvor 2 Std.CVE-2026-135542 | Mozilla Firefox up to 115.45/153.7/160 Layout buffer overflow (Nessus ID 388625) VulDB Updatesvor 2 Std.CVE-2026-135541 | Mozilla Firefox up to 115.45/153.7/160 XSLT use after free (Nessus ID 388625) VulDB Updatesvor 2 Std.CVE-2026-135544 | Mozilla Firefox up to 115.45/153.7/160 Navigation memory corruption (Nessus ID 388625) VulDB Updatesvor 2 Std.CVE-2026-135545 | Mozilla Firefox up to 153.7/160 Editor memory corruption (Nessus ID 388625) VulDB Updatesvor 2 Std.CVE-2026-135543 | Mozilla Firefox up to 115.45/153.7/160 Networking memory corruption (Nessus ID 388625) VulDB Updatesvor 2 Std.CVE-2026-135547 | Mozilla Firefox up to 115.45/153.7/160 Networking sandbox (Nessus ID 388625) VulDB Updatesvor 2 Std.CVE-2026-135549 | Mozilla Firefox up to 115.45/153.7/160 XSLT use after free (Nessus ID 388625) VulDB Updatesvor 2 Std.CVE-2026-135548 | Mozilla Firefox up to 115.45/153.7/160 Layout use after free (Nessus ID 388625) VulDB Updatesvor 3 Std.CVE-2026-135533 | Mozilla Firefox up to 115.45/153.7/160 Layout Tables off-by-one (Nessus ID 388625) VulDB Updatesvor 3 Std.CVE-2026-135536 | Mozilla Firefox up to 115.45/153.7/160 DOM Editor uninitialized pointer (Nessus ID 388625) VulDB Updatesvor 3 Std.CVE-2026-135535 | Mozilla Firefox up to 115.45/153.7/160 Skia input validation (Nessus ID 388625) VulDB Updatesvor 3 Std.CVE-2026-135537 | Mozilla Firefox up to 115.45/153.7/160 Layout Text/Fonts out-of-bounds (Nessus ID 388625) VulDB Updatesvor 3 Std.CVE-2026-135525 | Mozilla Firefox up to 115.45/153.7/160 WebRender use after free (Nessus ID 388625) VulDB Updatesvor 3 Std.CVE-2026-135526 | Mozilla Firefox up to 115.45/153.7/160 Networking use after free (Nessus ID 388625) VulDB Updatesvor 3 Std.CVE-2026-135527 | Mozilla Firefox up to 115.45/153.7/160 DOM/HTML use after free (Nessus ID 388625) VulDB Updatesvor 3 Std.CVE-2026-135528 | Mozilla Firefox up to 153.7/160 HTTP race condition (Nessus ID 388625) VulDB Updatesvor 3 Std.CVE-2026-135530 | Mozilla Firefox up to 115.45/153.7/160 HTTP sandbox (Nessus ID 388625) VulDB Updatesvor 3 Std.CVE-2026-135529 | Mozilla Firefox up to 153.7/160 Text sandbox (Nessus ID 388625) VulDB Updatesvor 3 Std.CVE-2026-135520 | Mozilla Firefox up to 115.45/153.7/160 CanvasWebGL sandbox (Nessus ID 388625) VulDB Updatesvor 3 Std.CVE-2026-135524 | Mozilla Firefox JavaScript Engine use after free (Nessus ID 388625) VulDB Updatesvor 3 Std.CVE-2026-135521 | Mozilla Firefox up to 115.45/153.7/160 Navigation sandbox (Nessus ID 388625)
22 Quellen
CVE-2026-72260 | Linux Kernel up to 6.6.147/6.12.100/6.18.39/7.1.4 ASoC mediatek mt8192 pm_runtime_get_sync unusual condition (WID-SEC-2026-2852)
VulDB Updates vor 1 Std.
21 weitere Quellen
VulDB Updatesvor 1 Std.CVE-2026-72264 | Linux Kernel up to 7.1.4 tridentfb trident_pci_probe memory leak (WID-SEC-2026-2852) VulDB Updatesvor 1 Std.CVE-2026-72263 | Linux Kernel up to 7.1.4 ASoC snd_sof_load_topology memory leak (WID-SEC-2026-2852) VulDB Updatesvor 1 Std.CVE-2026-72265 | Linux Kernel up to 7.1.4 fbdev nvidiafb_probe memory leak (WID-SEC-2026-2852) VulDB Updatesvor 1 Std.CVE-2026-72266 | Linux Kernel up to 6.6.144/6.12.96/6.18.39/7.1.4 vesafb vesafb_probe memory leak (WID-SEC-2026-2852) VulDB Updatesvor 1 Std.CVE-2026-72267 | Linux Kernel up to 7.1.4 carminefb alloc_carmine_fb memory leak (WID-SEC-2026-2852) VulDB Updatesvor 1 Std.CVE-2026-72269 | Linux Kernel up to 7.1.4 fbdev uvesafb_probe memory leak (WID-SEC-2026-2852) VulDB Updatesvor 1 Std.CVE-2026-72268 | Linux Kernel up to 7.1.4 fbdev tdfxfb_probe memory leak (WID-SEC-2026-2852) VulDB Updatesvor 1 Std.CVE-2026-72271 | Linux Kernel up to 7.1.4 i740fb i740fb_probe memory leak (WID-SEC-2026-2852) VulDB Updatesvor 1 Std.CVE-2026-72270 | Linux Kernel up to 7.1.4 fbdev s3_pci_probe memory leak (WID-SEC-2026-2852) VulDB Updatesvor 1 Std.CVE-2026-72272 | Linux Kernel up to 7.1.4 fbdev/radeon radeonfb_pci_register memory leak (WID-SEC-2026-2852) VulDB Updatesvor 2 Std.CVE-2026-72249 | Linux Kernel up to 7.1.4/7.2-rc2 flowtable input validation (WID-SEC-2026-2852) VulDB Updatesvor 2 Std.CVE-2026-72250 | Linux Kernel up to 7.2-rc2 netfilter net/ipv6/reassembly.c nf_ct_frag6_reasm state issue (WID-SEC-2026-2852) VulDB Updatesvor 2 Std.CVE-2026-72252 | Linux Kernel up to 7.2-rc1 nft_set_pipapo out-of-bounds write (WID-SEC-2026-2852) VulDB Updatesvor 2 Std.CVE-2026-72253 | Linux Kernel up to 7.2-rc1 nf_conntrack_sip skb_dst null pointer dereference (WID-SEC-2026-2852) VulDB Updatesvor 2 Std.CVE-2026-72255 | Linux Kernel up to 7.1.4 nf_queue __nf_queue reference count (WID-SEC-2026-2852) VulDB Updatesvor 2 Std.CVE-2026-72256 | Linux Kernel up to 7.1.4 xt_cluster xt_cluster_mt initialization (WID-SEC-2026-2852) VulDB Updatesvor 2 Std.CVE-2026-72257 | Linux Kernel up to 7.1.4 q6apm graph_callback null pointer dereference (WID-SEC-2026-2852) VulDB Updatesvor 2 Std.CVE-2026-72258 | Linux Kernel up to 6.6.144/6.12.96/6.18.39/7.1.4 ASoC denial of service (WID-SEC-2026-2852) VulDB Updatesvor 2 Std.CVE-2026-72259 | Linux Kernel up to 6.6.144/6.12.96/6.18.39/7.1.4 ASoC/mediatek mt8192 of_reserved_mem_device_init allocation of resources (WID-SEC-2026-2852) Phoronixvor 2 Std.Linux Overhauls Documentation For Reporting Kernel Security Bugs DEV Communityvor 4 Std.ForgeOS Booted on a Real Server: Linux Kernel Below, Only Our Own Code Above
17 Quellen
Garmin fenix 8 47mm drops $250 to $749.99 for Cyber Monday, $49 under Ultra 4
The Mac Observer vor 19 Min.
16 weitere Quellen
Latest from TechRadarvor 39 Min.I've been waiting for a better deal on the Philips LatteGo 4400 — and Amazon has delivered a record-low price for Cyber Monday Latest from TechRadarvor 1 Std.Looking to get a last-minute gaming gift before Cyber Monday is over? Latest from Windows Centralvor 2 Std.Why I bought a handheld over a gaming laptop on Cyber Monday Latest from TechRadarvor 2 Std.I found the most capable PC under $300 for Cyber Monday — Origimagic's C7 Windows 11 Pro machine packs dual Thunderbolt 4, 2.5Gb LAN, a Core 3 100U, 16GB of RAM, and a 512GB SSD OS X Dailyvor 2 Std.Cyber Monday Deals: $300 Off 16″ PROLED MacBook Pro, $100 Off AirPods Pro 3, $100 Off iPad Air, & More Latest from TechRadarvor 2 Std.Cyber Monday home office deals 2026 live — our top workspace picks from FlexiSpot, Dell, Anker, Logitech and more as Black Friday sale rolls on Latest from TechRadarvor 2 Std.The best Cyber Monday deals in the UK in 2026: top picks from Amazon, Argos, Ninja, Lego and more Latest from TechRadarvor 2 Std.Cyber Monday Australia laptop deals for 2026: score up to 52% off Lenovo, Apple, Dell, HP and more Latest from TechRadarvor 3 Std.Amazon Australia Cyber Monday deals CNETvor 3 Std.This Pocket Battery Recharges Your Phone 4 Times, and it’s Only $38 for Cyber Monday Latest from TechRadarvor 4 Std.Firebat's M1 is a cracking Ryzen AI 9 HX 470 mini PC for AI workloads — and it's packing OCuLink, 32GB of RAM, and a 1TB SSD for $1020 this Cyber Monday Latest from TechRadarvor 3 Std.The Lenovo IdeaCentre Tower Copilot+ PC with Core Ultra 7 CPU isn't discounted for Cyber Monday — and it's still the desktop computer I'd buy for work for $1049 The Vergevor 3 Std.Qobuz is my streaming service of choice and it’s on sale during Cyber Monday CNETvor 12 TagenThis Paramount Plus Cyber Monday Deal Gets You Ad-Free Viewing for Only $3 Per Month CNETvor 4 Std.Cyber Monday Meta Quest 3S Deal Knocks $53 Off and Gets You $50 Free Amazon Credit The Vergevor 5 Std.These early Cyber Monday gaming laptop deals offer the most GPU for the least money
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Browser strategy game backend: no tick loop

Thematisch verwandte Begriffe: Browser, strategy, game, backend · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
Widgets & Themen
Widgets werden geladen…
Nächster Beitrag